We have moved at community.getvera.com

Author Topic: Say action - different problems and solutions  (Read 22081 times)

Online Brientim

  • Sr. Hero Member
  • ******
  • Posts: 2497
  • Karma: +78/-7
Re: Say action - different problems and solutions
« Reply #30 on: January 05, 2013, 08:24:26 am »
That was very quick.   :o

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Say action - different problems and solutions
« Reply #31 on: January 05, 2013, 08:24:59 am »
So my idea would be the following for cutting the buffer:
1 - first find # characters in the string and cut after these characters (that means the user can decide where to cut)
2 - if not enough (and/or # characters not found), cut after a .
3 - if not enough, cut at the end of the last word
« Last Edit: January 05, 2013, 08:29:07 am by lolodomo »

Online Brientim

  • Sr. Hero Member
  • ******
  • Posts: 2497
  • Karma: +78/-7
Re: Say action - different problems and solutions
« Reply #32 on: January 05, 2013, 08:55:18 am »
I suppose there are few options:
what you have stated where there is a distinct character to find and used to cut. I see there only issue here is the user would need to know the active character position/block length to enable them to enter the character with the blocks. E.g if first block ends @80, the next block finishes @180.

Provide multiple inputs max length 99 characters and then concatenate with a space. 

I'd work on the premise it maybe best to do this automatically without user intervention.

What should be the maximum entry allowed, 200, 300? Whatever it is allocated, the input box would need to be resized to enable a user to see full text especially if option 1 is implemented.

Offline parkerc

  • Beta Testers
  • Sr. Hero Member
  • *****
  • Posts: 2479
  • Karma: +35/-48
  • Life Moves Pretty Fast....
Re: Say action - different problems and solutions
« Reply #33 on: January 05, 2013, 09:01:33 am »
Agreed.

Limiting a SAY to 100 would be good, and if more are needed then the uses can choose to add '+' another SAY input box..

(How would this work in a scene)?

Offline parkerc

  • Beta Testers
  • Sr. Hero Member
  • *****
  • Posts: 2479
  • Karma: +35/-48
  • Life Moves Pretty Fast....
Re: Say action - different problems and solutions
« Reply #34 on: January 05, 2013, 09:07:56 am »
@Lolodomo

I'm probably pushing my luck now, but for a future release maybe move 'Speach' to its own tab and think about a dynamic 'Say' TTS builder .? (With some of these as presets - http://forum.micasaverde.com/index.php/topic,12408.0.html)

The best speeches for me are the ones that Vera makes up itself ;)

Online Brientim

  • Sr. Hero Member
  • ******
  • Posts: 2497
  • Karma: +78/-7
Say action - different problems and solutions
« Reply #35 on: January 05, 2013, 09:13:13 am »
The penny drops and hits me.  I had not thought about scenes. As I do not currently use Vera for any AV equipment I not on the habit of doing this on Vera.

How would it deal with multiple entries in a scene. One thing at a time.
« Last Edit: January 05, 2013, 09:29:47 am by Brientim »

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Say action - different problems and solutions
« Reply #36 on: January 05, 2013, 09:33:32 am »
If calling several times Say (in a scene), there will be a restore previous context between each call.

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Say action - different problems and solutions
« Reply #37 on: January 06, 2013, 04:48:47 am »
I'd work on the premise it maybe best to do this automatically without user intervention.

What should be the maximum entry allowed, 200, 300? Whatever it is allocated, the input box would need to be resized to enable a user to see full text especially if option 1 is implemented.

Ok, I will do it automatically but the rendering could be worst than something done cleverly by the user.
I will define no limit.
Regarding the UI, for the scene advanced tab, it is controled by MCV, I cannot change it.
For the player tab (Sonos), I miss space. As suggested, the best could be to add a new tab dedicated to TTS. But these TTS fields are here only for testing purpose. So I am not sure it is interesting to loose time on this.

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Say action - different problems and solutions
« Reply #38 on: January 06, 2013, 05:00:50 am »
@Lolodomo

I'm probably pushing my luck now, but for a future release maybe move 'Speach' to its own tab and think about a dynamic 'Say' TTS builder .? (With some of these as presets - http://forum.micasaverde.com/index.php/topic,12408.0.html)

The best speeches for me are the ones that Vera makes up itself ;)

This is of course an interesting usage of the Say command and I will myself define some Say commands in my scenes. But in my opinion, it cannot be included in the plugin because everybody has its own needs, starting by the language to be used. The best would be that everybody add their examples to your topic.

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Say action - different problems and solutions
« Reply #39 on: January 06, 2013, 05:34:25 am »
Unfortunately I discovered that my solution produces a strange rendering of the end of the file.
I imagine it is due to the fact that the Sonos buffers a certain number of MP3 packets before playing them.
I think the solution would be to add real MP3 packets to the file, packets corresponding to silence.

Anyone has skills to let me know what could be a valid MP3 silent packet ?

Offline hek

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 714
  • Karma: +60/-1
Re: Say action - different problems and solutions
« Reply #40 on: January 06, 2013, 03:54:11 pm »
I think the following actually works...

Code: [Select]
cat input.mp3 silence.mp3 > output.mp3

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Say action - different problems and solutions
« Reply #41 on: January 25, 2013, 07:51:14 pm »
I have now fixed the Say action when text is longer than 100 characters.

Offline teonebello

  • Sr. Member
  • ****
  • Posts: 405
  • Karma: +0/-0
  • Macs, Home Automation, Bikers
Re: Say action - different problems and solutions
« Reply #42 on: January 26, 2013, 02:13:32 am »
I have now fixed the Say action when text is longer than 100 characters.

How it works?

Thanks
Matteo

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Say action - different problems and solutions
« Reply #43 on: January 26, 2013, 04:03:10 am »
I have now fixed the Say action when text is longer than 100 characters.

How it works?

Thanks
Matteo

Text is cut in fragments of 100 characters max. To do that a space is searched.
Then each fragment is translated by Google to produce a mp3 file.
Finally all files are concatenated in a unique mp3 file that is played by the Sonos.

Offline teonebello

  • Sr. Member
  • ****
  • Posts: 405
  • Karma: +0/-0
  • Macs, Home Automation, Bikers
Re: Say action - different problems and solutions
« Reply #44 on: January 26, 2013, 05:24:40 am »
I have now fixed the Say action when text is longer than 100 characters.

How it works?

Thanks
Matteo

Text is cut in fragments of 100 characters max. To do that a space is searched.
Then each fragment is translated by Google to produce a mp3 file.
Finally all files are concatenated in a unique mp3 file that is played by the Sonos.

That is simply great! Thanks

Which version of the Plug in should i install to test it?