The Vera Community forums have moved!

Advanced => Plugins & Plugin Development => Programming => Sonos Plugin => Topic started by: lolodomo on August 01, 2015, 05:40:00 am

Title: New TTS engine: Microsoft Translator
Post by: lolodomo on August 01, 2015, 05:40:00 am
Microsoft Translator is now available as a TTS engine for the Sonos plugin : http://code.mios.com/trac/mios_sonos-wireless-music-systems/browser/trunk
You will have to upload 4 files: I_Sonos1.xml + J_Sonos1.js + L_SonosTTS.lua + S_Sonos1.xml. Take them from the ZIP file.

To setup the engine, you will have first to do step 1 and step 2 described here: https://www.microsoft.com/translator/getstarted.aspx
You have more details here: https://msdn.microsoft.com/en-us/library/mt146806.aspx (you have to do step 1 to 4)
As a result, you will get your credentials.
Then, you just have to set your client id and client secret in the TTS tab of the plugin.

The quality of the speech is very good, even better than Google for French. The speech is just a little too fast in my opinion. Microsoft server seems to be very fast to provide the MP3 file.

In your scenes, you have to use "MICROSOFT" to identify this engine.
Title: Re: New TTS engine: Microsoft Translator
Post by: wezley69 on August 01, 2015, 10:59:19 am
What information needs to be provided in step 2 on MS Translator?  URL etc?
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on August 01, 2015, 11:23:21 am
I just imrpoved error checking. Please update, my previous version lead to TTS not working after a first failure (for example due to bad credentials).
A warning is now logged when the audio file cannot be retrieved and Sonos audio is not cut at all in this case.
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on August 01, 2015, 11:30:17 am
What information needs to be provided in step 2 on MS Translator?  URL etc?

I should have provided this other link: https://msdn.microsoft.com/en-us/library/mt146806.aspx
You have to do step 1 to 4.

Quote
    Client ID: Give your application a unique name for calling the API. Do not use spaces in your Client ID.
    Name: The name of the application will be displayed to the user when asking the user's permission to access their account (spaces are allowed).
    Client Secret: This is the password your application uses to call the API. You may provide your own or use the provided password.
    Redirect URI: Complete this with any valid URL that uses https, for example https://microsoft.com. This field is not used by the Microsoft Translator API.
    Enable Subdomain Access: Translator does not use subdomain access so you can leave this box unchecked.
    Description: Optional description for the application, visible only to you.

Title: Re: New TTS engine: Microsoft Translator
Post by: tomgru on August 01, 2015, 12:35:56 pm
doesn't seem to be working... at least trying to test from the device instance.

first question... do you have to update the ID and Secret in each sonos device (e.g. each speaker or connect)?  This looks to be the case, as setting at one doesn't propagate to the others.

Second... doesn't look like you have to perform a reload after, but i tried that as well and still doesn't work.

Third, does it matter if the Client ID has caps in it (but no spaces)?

I also notice that when you select Microsoft, the google URL remains.  I tried deleting it, but it still comes back, along with the Microsoft settings.
Title: Re: New TTS engine: Microsoft Translator
Post by: tomgru on August 01, 2015, 12:53:47 pm
In your scenes, you have to use "MICROSOFT" to identify this engine.

One more :-)

I see where to do this in the advanced tab...but where would I put this if my scene uses LUA to handle the TTS?

thanks again for getting on this so quick.
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on August 01, 2015, 01:01:35 pm
In your scenes, you have to use "MICROSOFT" to identify this engine.

One more :-)

I see where to do this in the advanced tab...but where would I put this if my scene uses LUA to handle the TTS?

thanks again for getting on this so quick.

Take a look to the wiki page, you have an example on how using OSX TTS server. That is the parameter "Engine".
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on August 01, 2015, 01:10:01 pm
doesn't seem to be working... at least trying to test from the device instance.

You probably miss something because I am sure it is working and even very well ;D

Quote
first question... do you have to update the ID and Secret in each sonos device (e.g. each speaker or connect)?  This looks to be the case, as setting at one doesn't propagate to the others.

Yes, on each device you wish to request TTS.

Quote
Second... doesn't look like you have to perform a reload after, but i tried that as well and still doesn't work.

It could be required after the first time you reload your Vera with the new version.
I believe it is even not required but I am not 100% sure.
Then you can change your TTS settings without reloading if you use the TTS tab and the Set button at the bottom of this tab.

Quote
Third, does it matter if the Client ID has caps in it (but no spaces)?

Yes, try for example TTSvera.

Quote
I also notice that when you select Microsoft, the google URL remains.  I tried deleting it, but it still comes back, along with the Microsoft settings.

The screen has 2 zones, the top part with the Say button to run TTS and the bottom part with the Set button to setup the TTS parameters.
So of course your Google URL will remain as it is the parameter for the Google engine.
First set your TTS settings and finish by pushing the Set button; then use the Say button to run TTS with the new settings.



Please check your Vera logs and tell me what error message you have (using my last version that logs errors).
If it does not work, that is certainly because you don't set properly your credentials.
Title: Re: New TTS engine: Microsoft Translator
Post by: tomgru on August 01, 2015, 01:28:27 pm
ok... tried changing the Name and ID just to see... same issue.  Says active. Maybe I missed a step on that side.... logs look good:

08      08/01/15 10:27:12.146   JobHandler_LuaUPnP::HandleActionRequest device: 145 service: urn:micasaverde-com:serviceId:Sonos1 action: Say <0x32e26680>
08      08/01/15 10:27:12.147   JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=145 <0x32e26680>
08      08/01/15 10:27:12.147   JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:micasaverde-com:serviceId:Sonos1 <0x32e26680>
08      08/01/15 10:27:12.147   JobHandler_LuaUPnP::HandleActionRequest argument action=Say <0x32e26680>
08      08/01/15 10:27:12.147   JobHandler_LuaUPnP::HandleActionRequest argument Text=this is a second test <0x32e26680>
08      08/01/15 10:27:12.148   JobHandler_LuaUPnP::HandleActionRequest argument Language=en <0x32e26680>
08      08/01/15 10:27:12.148   JobHandler_LuaUPnP::HandleActionRequest argument Engine=MICROSOFT <0x32e26680>
08      08/01/15 10:27:12.148   JobHandler_LuaUPnP::HandleActionRequest argument Volume=56 <0x32e26680>
08      08/01/15 10:27:12.158   JobHandler_LuaUPnP::HandleActionRequest argument SameVolumeForAll=false
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on August 01, 2015, 02:13:09 pm
To be honest, I have not tested through a lua call but only through the plugin UI.

Is it working for you from within the UI (TTS tab of the plugin) ?

Did you upload the 4 updated files, reload and clear your WEB browser cache ?

Please enable the debug log to see if the new function is called.
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on August 01, 2015, 02:22:36 pm
I just tested to create a new scene with a Say action, just filling text, language and engine with MICROSOFT. It works.
Title: Re: New TTS engine: Microsoft Translator
Post by: mda on August 01, 2015, 02:26:31 pm
@lolodomo Would it be possibly to please update the DLNA plug-in for Microsoft tts as well? Thanks !
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on August 01, 2015, 02:30:33 pm
@lolodomo Would it be possibly to please update the DLNA plug-in for Microsoft tts as well? Thanks !

Yes, I will do when the change is 100% finished for the Sonos plugin.
Title: Re: New TTS engine: Microsoft Translator
Post by: JS007 on August 01, 2015, 03:23:57 pm
thank you, that worked for me

is there a way to pick other voices?
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on August 01, 2015, 03:27:04 pm
is there a way to pick other voices?

Apparently no; only one voice per language.
Title: Re: New TTS engine: Microsoft Translator
Post by: JS007 on August 01, 2015, 03:32:13 pm
is there a way to pick other voices?

Apparently no; only one voice per language.

oh that works, I thought those meant for alerts in other langauges, but they have different voices, did not ever try that before, thanks, will go with French :)
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on August 01, 2015, 03:39:32 pm
oh that works, I thought those meant for alerts in other langauges, but they have different voices, did not ever try that before, thanks, will go with French :)

Tel me what you think for French, that is better with Google or Microsoft ?
Title: Re: New TTS engine: Microsoft Translator
Post by: JS007 on August 01, 2015, 03:44:10 pm
oh that works, I thought those meant for alerts in other langauges, but they have different voices, did not ever try that before, thanks, will go with French :)

Tel me what you think for French, that is better with Google or Microsoft ?

never tried it with google, always picked english as I did not know they changed the voice

am getting the errors again, not sure if ms down or did not like me testing with same message over and over and they are giving me a time out in case I am a bot :)

"Saturday, August 1, 2015 - 2:44 PM Central Time
Unable to play 'Say.144.mp3' - the track is not encoded correctly."

reboot did not help, I will give it like 30 min and try again
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on August 01, 2015, 06:05:45 pm
On my side, I did a lot of requests today, probably more than I will never do in the future, and it always worked well.

You are on UI5 or UI7, Vera3/VeraLite or Vera Edge ? Maybe the HTTP server of our Vera is a lttile different.
If you use the last version of the code, your error means that at least a non empty MP3 file was retrieved from Microsoft server and saved inside Vera memory. Then that is only the playing by Sonos of a MP3 file distributed by the Vera HTTP server that apparently fails in your case.
Title: Re: New TTS engine: Microsoft Translator
Post by: JS007 on August 01, 2015, 10:36:04 pm
On my side, I did a lot of requests today, probably more than I will never do in the future, and it always worked well.

You are on UI5 or UI7, Vera3/VeraLite or Vera Edge ? Maybe the HTTP server of our Vera is a lttile different.
If you use the last version of the code, your error means that at least a non empty MP3 file was retrieved from Microsoft server and saved inside Vera memory. Then that is only the playing by Sonos of a MP3 file distributed by the Vera HTTP server that apparently fails in your case.

I am ui7 on the edge, just tried again and still not working, weird it worked at first, then as changing voices(languages) it stopped and gave that error

and trying again it gives that error every time no matter what I pick now

it makes it to sonos as I see the error in the logs on sonos

Saturday, August 1, 2015 - 9:33 PM Central Time
Unable to play 'Say.144.mp3' - the track is not encoded correctly.

gonna set my vera to default, load a backup from when did upgrade and try again with reloading plugin
Title: Re: New TTS engine: Microsoft Translator
Post by: JS007 on August 01, 2015, 10:43:00 pm
this is interesting

when I tried to do the reset to default, it said I do not have permision

so went to a (user and account info) page so it would ask me to logon to vera, then tried it and now works again

so must be a permission thing about not being logged into vera, on the test tts page

then is stopped working again after a few tried, I am gonna do a fresh install of vera back to default as I just did a release right before this, maybe something is flaky

Title: Re: New TTS engine: Microsoft Translator
Post by: tomgru on August 01, 2015, 11:17:04 pm
To be honest, I have not tested through a lua call but only through the plugin UI.

Is it working for you from within the UI (TTS tab of the plugin) ?

Did you upload the 4 updated files, reload and clear your WEB browser cache ?

Please enable the debug log to see if the new function is called.

I tried reinstalling everything... and still no go.  and when I watch the sonos dashboard, I don't see an mp3 trying to be played at all.  Notice in new logs it "can't get session token".  Last logs:  (do you need verbose logs?):

08/01/15 20:13:10.717   JobHandler_LuaUPnP::HandleActionRequest device: 145 service: urn:micasaverde-com:serviceId:Sonos1 action: Say <0x32990680>
08   08/01/15 20:13:10.717   JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=145 <0x32990680>
08   08/01/15 20:13:10.717   JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:micasaverde-com:serviceId:Sonos1 <0x32990680>
08   08/01/15 20:13:10.718   JobHandler_LuaUPnP::HandleActionRequest argument action=Say <0x32990680>
08   08/01/15 20:13:10.718   JobHandler_LuaUPnP::HandleActionRequest argument Text=this is  a test <0x32990680>
08   08/01/15 20:13:10.718   JobHandler_LuaUPnP::HandleActionRequest argument Language=en <0x32990680>
08   08/01/15 20:13:10.718   JobHandler_LuaUPnP::HandleActionRequest argument Engine=MICROSOFT <0x32990680>
08   08/01/15 20:13:10.718   JobHandler_LuaUPnP::HandleActionRequest argument Volume=26 <0x32990680>
08   08/01/15 20:13:10.719   JobHandler_LuaUPnP::HandleActionRequest argument SameVolumeForAll=false <0x32990680>
08   08/01/15 20:13:10.719   JobHandler_LuaUPnP::HandleActionRequest argument timestamp=1438485180392 <0x32990680>
02   08/01/15 20:13:11.170   luup_log:145: Sonos: warning: Microsoft TTS: can't get session token <0x32990680>
Title: Re: New TTS engine: Microsoft Translator
Post by: JS007 on August 01, 2015, 11:47:51 pm
this is interesting

when I tried to do the reset to default, it said I do not have permision

so went to a (user and account info) page so it would ask me to logon to vera, then tried it and now works again

so must be a permission thing about not being logged into vera, on the test tts page

then is stopped working again after a few tried, I am gonna do a fresh install of vera back to default as I just did a release right before this, maybe something is flaky

I did a fresh install of vera, then loaded backup, then plugin, then fix files and still having same issue.... not sure what else to try

this is my firmware version :  You are running the latest version: 1.7.1320

35   08/01/15 22:58:24.532   ImplAction::HandleActionRequest SSonos1_Sonos1_Say_run returned 0 <0x73d68520>
10   08/01/15 22:58:24.532   luvd_get_info_data_request creating file buffer /data_request?id=lu_action&output_format=xml&DeviceNum=144&serviceId=urn:micasaverde-com:serviceId:Sonos1&action=Say&Text=test%20this&Language=en&Engine=MICROSOFT&Volume=&GroupZones=&SameVolumeForAll=false pMem 0x15f2000/23011328 diff: 11567104 <0x73d68520>
10   08/01/15 22:58:24.533   luvd_get_info_data_request done /data_request?id=lu_action&output_format=xml&DeviceNum=144&serviceId=urn:micasaverde-com:serviceId:Sonos1&action=Say&Text=test%20this&Language=en&Engine=MICROSOFT&Volume=&GroupZones=&SameVolumeForAll=false ret 0 size 125 pMem 0x15f2000/23011328 diff: 11567104 took 0 info 0x73d67d28 <0x73d68520>
10   08/01/15 22:58:24.535   luvd_open /data_request?id=lu_action&output_format=xml&DeviceNum=144&serviceId=urn:micasaverde-com:serviceId:Sonos1&action=Say&Text=test%20this&Language=en&Engine=MICROSOFT&Volume=&GroupZones=&SameVolumeForAll=false FileBuffer 0x1111f40 <0x73d68520>
31   08/01/15 22:58:25.100   AlarmManager::Run 0x108a238 notified of a change entry 0x1360ae0 id 131 deleted 0 <0x74f68520>
31   08/01/15 22:58:25.101   AlarmManager::Run callback for alarm 0x108a238 entry 0x1360ae0 type 7 id 131 param=0x1125ac8 entry->when: 1438487905 time: 1438487905 tnum: 0 slow 1 tardy 0 <0x74f68520>
35   08/01/15 22:58:25.101   LuaInterface::CallFunction_Timer func:endSayAlert device:144 <0x74f68520>
01   08/01/15 22:58:25.371   luup_log:144: Sonos: error: UPnP_request (SetCrossfadeMode, urn:schemas-upnp-org:service:AVTransport:1): status=1 statusMsg=500 result=[s:ClientUPnPError712] <0x74f68520>

Sonos error :
Saturday, August 1, 2015 - 10:58 PM Central Time
Unable to play 'Say.144.mp3' - the track is not encoded correctly.
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on August 02, 2015, 03:10:49 am
02   08/01/15 20:13:11.170   luup_log:145: Sonos: warning: Microsoft TTS: can't get session token <0x32990680>

For you, that is perfectly clear, that is a problem of credentials.

What Vera model and Vera UI are you using ?

In case you are running UI7 and in case they introduced bugs firmware after firmware, please check that your 2 credentials information (ClientId and ClientSecret) are correctly set to variables in the advanced tab. Remember that for this advanced tab (at least with UI5), you have to clear your WEB browser cache to get an update.

If this is not a UI7 problem, then you just don't set correctly your ClientID and ClientSecret, or maybe you don't create your application as you should. You must get the first and the third information in the page which are named in French 'ID client" and "Secret du client". We don't care about the "Nom" and "URI de redirection" has to be set to https://microsoft.com
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on August 02, 2015, 03:21:34 am
01   08/01/15 22:58:25.371   luup_log:144: Sonos: error: UPnP_request (SetCrossfadeMode, urn:schemas-upnp-org:service:AVTransport:1): status=1 statusMsg=500 result=[s:ClientUPnPError712] <0x74f68520>

@JS007: just to understand, are you new with TTS and Sonos plugin ? I mean did it work for you correctly one day in the past with Google TTS engine and your Edge/UI7 ?

All this is just for me a clear remember that I should resist and avoid switching to UI7...

Ok, by the way, the error you get with SetCrossfadeMode is not normal. It is done just after TTS to restore the previous context. What Sonos model do you own ? That would be weird but maybe this feature is not supported by your Sonos model.
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on August 02, 2015, 06:02:46 am
I committed few changes. If the TTS request failed, a control is done to check if the used language is available. So the logged error can be a little more detailed.
Title: Re: New TTS engine: Microsoft Translator
Post by: hek on August 02, 2015, 06:26:02 am
Thank you @lolodomo! You are a saver.

Even if I had to sign up for a M$ account to get the speaking back.
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on August 02, 2015, 06:31:39 am
Thank you @lolodomo! You are a saver.

Even if I had to sign up for a M$ account to get the speaking back.

As I fixed Google at the same time, you will be able to compare the two and choose the best.
For French, I think I prefer Microsoft.
It is also interesting to try various country languages for example for English, voices are different.
Title: Re: New TTS engine: Microsoft Translator
Post by: wezley69 on August 02, 2015, 11:59:57 am
This seems to stop working even when testing from the TTS page.  Seems to work a few times there then stops.  Reload is needed to have it work a few times.  I set the volume level to 46 for testing from the same page.
Default language: en
Default Engine: Micorsoft
Google TTS: left as google
Microsoft Client ID: mine
Microsoft Client Secret: mine


I tried this in the scenes without success.   I added Testing as the text, en as the language, engine as MICROSOFT, and the volume to 46.  Nothing happens.
Title: Re: New TTS engine: Microsoft Translator
Post by: JS007 on August 02, 2015, 02:49:55 pm
01   08/01/15 22:58:25.371   luup_log:144: Sonos: error: UPnP_request (SetCrossfadeMode, urn:schemas-upnp-org:service:AVTransport:1): status=1 statusMsg=500 result=[s:ClientUPnPError712] <0x74f68520>

@JS007: just to understand, are you new with TTS and Sonos plugin ? I mean did it work for you correctly one day in the past with Google TTS engine and your Edge/UI7 ?

All this is just for me a clear remember that I should resist and avoid switching to UI7...

Ok, by the way, the error you get with SetCrossfadeMode is not normal. It is done just after TTS to restore the previous context. What Sonos model do you own ? That would be weird but maybe this feature is not supported by your Sonos model.

Google was working up till a few days ago (been using for awhile flawlessly with Google)

when I first set to use Microsoft it worked, then after a few tries of changing language it stopped, the work a couple times after that login from above, but has not worked sense, not even afer a rebuild and reinstall

I copied in the four files from trunk-219 and it did work for a bit

the Sonos PLAY:1 Speaker is the one I use  (ui7 edge fw:1.7.1320)

now I can not say it ever worked on this firmware version under Google as did not notice had stopped working until this vera release, in fact I thought the vera release broke google at first, not sure how to downgrade to test older vera firmware with new plugin code
Title: Re: New TTS engine: Microsoft Translator
Post by: JS007 on August 02, 2015, 03:07:32 pm
ok, this one did not work, test 6, then the next one test 7 worked

no difference between configs, just change to 6 pressed say, then to 7 and pressed say, on 7 worked, on 4,5,6 did not (tried a about a dozen times after the working one and none worked again)

if you need more of log let me know, I saved it off

TEST 6   (did not work)
08   08/02/15 14:01:56.315   JobHandler_LuaUPnP::HandleActionRequest device: 144 service: urn:micasaverde-com:serviceId:Sonos1 action: Say <0x73d2e520>
08   08/02/15 14:01:56.315   JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=144 <0x73d2e520>
08   08/02/15 14:01:56.316   JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:micasaverde-com:serviceId:Sonos1 <0x73d2e520>
08   08/02/15 14:01:56.316   JobHandler_LuaUPnP::HandleActionRequest argument action=Say <0x73d2e520>
08   08/02/15 14:01:56.317   JobHandler_LuaUPnP::HandleActionRequest argument Text=this is a tts test6 <0x73d2e520>
08   08/02/15 14:01:56.317   JobHandler_LuaUPnP::HandleActionRequest argument Language=en <0x73d2e520>
08   08/02/15 14:01:56.318   JobHandler_LuaUPnP::HandleActionRequest argument Engine=MICROSOFT <0x73d2e520>
08   08/02/15 14:01:56.318   JobHandler_LuaUPnP::HandleActionRequest argument Volume=71 <0x73d2e520>
08   08/02/15 14:01:56.318   JobHandler_LuaUPnP::HandleActionRequest argument SameVolumeForAll=false <0x73d2e520>
50   08/02/15 14:01:56.319   luup_log:144: Sonos: debug: Say: this is a tts test6 <0x73d2e520>
50   08/02/15 14:01:56.320   luup_log:144: Sonos: debug: TTS queueAlert for device 144 <0x73d2e520>
50   08/02/15 14:01:56.320   luup_log:144: Sonos: debug: Microsoft TTS: device 144 language en <0x73d2e520>
10   08/02/15 14:01:56.444   GlobalLog: mongoose ctx: 0xdd46a0 s: d:29796 <0x72f2e520>
10   08/02/15 14:01:56.446   mg_callback from IP:127.0.0.1:34847 /port_3480/data_request id=lu_status&DataVersion=541619621&MinimumDelay=1000&Timeout=60&LoadTime=1438541619&rand=0.4476009610740712 start id: 254 <0x72f2e520>
12   08/02/15 14:01:56.446   luvd_get_info_data_request starting /data_request?id=lu_status&DataVersion=541619621&MinimumDelay=1000&Timeout=60&LoadTime=1438541619&rand=0.4476009610740712 pMem 0x1740000/24379392 diff: 11800576 <0x72f2e520>
10   08/02/15 14:01:56.447   JobHandler_LuaUPnP::HandleRequest id lu_status request pMem 0x1740000/24379392 diff: 11800576 <0x72f2e520>
50   08/02/15 14:01:56.504   luup_log:144: Sonos: debug: savePlaybackContexts: device=144 uuids=RINCON_B8E937ECD11A01400 <0x73d2e520>
50   08/02/15 14:01:56.505   luup_log:144: Sonos: debug: controlAnotherZone targetUUID=RINCON_B8E937ECD11A01400 sourceDevice=144 <0x73d2e520>
50   08/02/15 14:01:56.506   luup_log:144: Sonos: debug: controlAnotherZone result=144 <0x73d2e520>
50   08/02/15 14:01:56.506   luup_log:144: Sonos: debug: refreshNow: device=144 <0x73d2e520>
50   08/02/15 14:01:56.507   luup_log:144: Sonos: debug: GetZoneGroupState('http://192.168.1.171:1400/ZoneGroupTopology/Control', 'urn:schemas-upnp-org:service:ZoneGroupTopology:1') Called with parameter count=1 <0x73d2e520>
50   08/02/15 14:01:56.507   luup_log:144: Sonos: debug: UPnP_request: url=[http://192.168.1.171:1400/ZoneGroupTopology/Control], body=[


TEST 7 (worked)
08   08/02/15 14:02:01.024   JobHandler_LuaUPnP::HandleActionRequest device: 144 service: urn:micasaverde-com:serviceId:Sonos1 action: Say <0x73d2e520>
08   08/02/15 14:02:01.024   JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=144 <0x73d2e520>
08   08/02/15 14:02:01.025   JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:micasaverde-com:serviceId:Sonos1 <0x73d2e520>
08   08/02/15 14:02:01.025   JobHandler_LuaUPnP::HandleActionRequest argument action=Say <0x73d2e520>
08   08/02/15 14:02:01.025   JobHandler_LuaUPnP::HandleActionRequest argument Text=this is a tts test7 <0x73d2e520>
08   08/02/15 14:02:01.031   JobHandler_LuaUPnP::HandleActionRequest argument Language=en <0x73d2e520>
08   08/02/15 14:02:01.031   JobHandler_LuaUPnP::HandleActionRequest argument Engine=MICROSOFT <0x73d2e520>
08   08/02/15 14:02:01.032   JobHandler_LuaUPnP::HandleActionRequest argument Volume=71 <0x73d2e520>
08   08/02/15 14:02:01.032   JobHandler_LuaUPnP::HandleActionRequest argument SameVolumeForAll=false <0x73d2e520>
50   08/02/15 14:02:01.033   luup_log:144: Sonos: debug: Say: this is a tts test7 <0x73d2e520>
50   08/02/15 14:02:01.034   luup_log:144: Sonos: debug: TTS queueAlert for device 144 <0x73d2e520>
50   08/02/15 14:02:01.035   luup_log:144: Sonos: debug: Microsoft TTS: device 144 language en <0x73d2e520>
10   08/02/15 14:02:01.242   luvd_get_info_data_request creating file buffer /data_request?id=lu_status&DataVersion=541619649&MinimumDelay=1000&Timeout=60&LoadTime=1438541619&rand=0.25168364846448526 pMem 0x1740000/24379392 diff: 11800576 <0x72d2e520>
10   08/02/15 14:02:01.244   luvd_get_info_data_request done /data_request?id=lu_status&DataVersion=541619649&MinimumDelay=1000&Timeout=60&LoadTime=1438541619&rand=0.25168364846448526 ret 0 size 802 pMem 0x1740000/24379392 diff: 11800576 took 0 info (nil) <0x72d2e520>
10   08/02/15 14:02:01.244   mg_callback /data_request stop id: 258 <0x72d2e520>
10   08/02/15 14:02:01.286   UPnPCallbackEventHandler 4 start PIDLOG2 29796 <0x7432e520>
10   08/02/15 14:02:01.296   UPnPCallbackEventHandler 4 start PIDLOG2 29796 <0x7412e520>
10   08/02/15 14:02:01.302   UPnPCallbackEventHandler 4 start PIDLOG2 29796 <0x7432e520>
10   08/02/15 14:02:01.312   UPnPCallbackEventHandler 4 start PIDLOG2 29796 <0x7412e520>
50   08/02/15 14:02:01.396   luup_log:144: Sonos: debug: savePlaybackContexts: device=144 uuids=RINCON_B8E937ECD11A01400 <0x73d2e520>
50   08/02/15 14:02:01.396   luup_log:144: Sonos: debug: controlAnotherZone targetUUID=RINCON_B8E937ECD11A01400 sourceDevice=144 <0x73d2e520>
50   08/02/15 14:02:01.397   luup_log:144: Sonos: debug: controlAnotherZone result=144 <0x73d2e520>
50   08/02/15 14:02:01.397   luup_log:144: Sonos: debug: refreshNow: device=144 <0x73d2e520>
50   08/02/15 14:02:01.398   luup_log:144: Sonos: debug: GetZoneGroupState('http://192.168.1.171:1400/ZoneGroupTopology/Control', 'urn:schemas-upnp-org:service:ZoneGroupTopology:1') Called with parameter count=1 <0x73d2e520>
50   08/02/15 14:02:01.399   luup_log:144: Sonos: debug: UPnP_request: url=[http://192.168.1.171:1400/ZoneGroupTopology/Control], body=[
Title: Re: New TTS engine: Microsoft Translator
Post by: JS007 on August 02, 2015, 04:01:03 pm
Thank you @lolodomo! You are a saver.

Even if I had to sign up for a M$ account to get the speaking back.

As I fixed Google at the same time, you will be able to compare the two and choose the best.
For French, I think I prefer Microsoft.
It is also interesting to try various country languages for example for English, voices are different.

is the new code still the link in the top post of this thread? trunk-219?
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on August 02, 2015, 04:24:06 pm
Thank you @lolodomo! You are a saver.

Even if I had to sign up for a M$ account to get the speaking back.

As I fixed Google at the same time, you will be able to compare the two and choose the best.
For French, I think I prefer Microsoft.
It is also interesting to try various country languages for example for English, voices are different.

is the new code still the link in the top post of this thread? trunk-219?

No, 221 now.
http://code.mios.com/trac/mios_sonos-wireless-music-systems/browser/trunk
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on August 02, 2015, 04:32:37 pm
I updated the link everywhere. It may explain your problems.
Title: Re: New TTS engine: Microsoft Translator
Post by: wezley69 on August 02, 2015, 05:13:59 pm
Tried 221 and now getting this when trying to access TTS page: Error executing function Sonos_showTTS():

Attached is the log.
Title: Re: New TTS engine: Microsoft Translator
Post by: JS007 on August 02, 2015, 05:18:39 pm
No, 221 know.
http://code.mios.com/trac/mios_sonos-wireless-music-systems/browser/trunk

ok, changed to new code 221 and google now works :)

Microsoft I get the "luup_log:144: Sonos: warning: Microsoft TTS: can't get session token <0x7414c520>"

I am using the same client id and secret that was sometimes working on older code 219, so key should be ok

but at least google working on the edge again and with more voice choices

Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on August 02, 2015, 05:29:12 pm
Tried 221 and now getting this when trying to access TTS page: Error executing function Sonos_showTTS():

Attached is the log.

Take the JS file from the ZIP. Upload it, reload and clear your browser cache.
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on August 02, 2015, 05:33:34 pm
ok, changed to new code 221 and google now works :)

Microsoft I get the "luup_log:144: Sonos: warning: Microsoft TTS: can't get session token <0x7414c520>"

I am using the same client id and secret that was sometimes working on older code 219, so key should be ok

Weird. Same problem as @tomgru.
What's your client id ? Only letters are accepted if I correctly remember. No space.
Title: Re: New TTS engine: Microsoft Translator
Post by: JS007 on August 02, 2015, 06:03:33 pm
ok, changed to new code 221 and google now works :)

Microsoft I get the "luup_log:144: Sonos: warning: Microsoft TTS: can't get session token <0x7414c520>"

I am using the same client id and secret that was sometimes working on older code 219, so key should be ok

Weird. Same problem as @tomgru.
What's your client id ? Only letters are accepted if I correctly remember. No space.
sent info on PM, feel free to test with them
Title: Re: New TTS engine: Microsoft Translator
Post by: wezley69 on August 02, 2015, 06:07:16 pm
JD file?  JS file? 

Your 221 link is no longer to a zip file.
Title: Re: New TTS engine: Microsoft Translator
Post by: JS007 on August 02, 2015, 06:11:03 pm
JD file?  JS file? 

Your 221 link is no longer to a zip file.

the zip link is at bottom of that page, took me a bit to find it too


Download in other formats:
    Zip Archive <-----

Title: Re: New TTS engine: Microsoft Translator
Post by: wezley69 on August 02, 2015, 06:24:08 pm
@JS007 - Thank you and the JD file he is referring to?
Title: Re: New TTS engine: Microsoft Translator
Post by: JS007 on August 02, 2015, 06:34:53 pm
@JS007 - Thank you and the JD file he is referring to?

thinking was referring to those 4 files, if you try to right click on file names on new link and say "save link as"  they will be corrupt as not real file, so need to grab them from the zip

" I_Sonos1.xml + J_Sonos1.js + L_SonosTTS.lua + S_Sonos1.xml. Take them from the ZIP file."
Title: Re: New TTS engine: Microsoft Translator
Post by: wezley69 on August 02, 2015, 07:14:12 pm
@JS007 - Thank you again!  Working now.
Title: Re: New TTS engine: Microsoft Translator
Post by: JS007 on August 02, 2015, 08:08:30 pm
ok, changed to new code 221 and google now works :)

Microsoft I get the "luup_log:144: Sonos: warning: Microsoft TTS: can't get session token <0x7414c520>"

I am using the same client id and secret that was sometimes working on older code 219, so key should be ok

Weird. Same problem as @tomgru.
What's your client id ? Only letters are accepted if I correctly remember. No space.

did a restore from backup, then reinstalled plugin, now get this again rather then the session token

this may just be a ui7 thing, as long as google works on ui7 ( which it is, thanks for fixing that ), I am good unless you want to keep trying to get microsoft to work on ui7 edge

10   08/02/15 19:03:28.463   sbrk JobHandler_LuaUPnP::HandleActionRequest from IP:228.9.17.119 pMem 0x1626000/23224320 diff: 12406784 <0x73a1e520>
08   08/02/15 19:03:28.463   JobHandler_LuaUPnP::HandleActionRequest device: 144 service: urn:micasaverde-com:serviceId:Sonos1 action: Say <0x73a1e520>
08   08/02/15 19:03:28.464   JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=144 <0x73a1e520>
08   08/02/15 19:03:28.464   JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:micasaverde-com:serviceId:Sonos1 <0x73a1e520>
08   08/02/15 19:03:28.465   JobHandler_LuaUPnP::HandleActionRequest argument action=Say <0x73a1e520>
08   08/02/15 19:03:28.465   JobHandler_LuaUPnP::HandleActionRequest argument Text=test tts 882 <0x73a1e520>
08   08/02/15 19:03:28.465   JobHandler_LuaUPnP::HandleActionRequest argument Language=en <0x73a1e520>
08   08/02/15 19:03:28.466   JobHandler_LuaUPnP::HandleActionRequest argument Engine=MICROSOFT <0x73a1e520>
08   08/02/15 19:03:28.466   JobHandler_LuaUPnP::HandleActionRequest argument Volume=82 <0x73a1e520>
08   08/02/15 19:03:28.467   JobHandler_LuaUPnP::HandleActionRequest argument SameVolumeForAll=false <0x73a1e520>
50   08/02/15 19:03:28.468   luup_log:144: Sonos: debug: Say: test tts 882 <0x73a1e520>
50   08/02/15 19:03:28.468   luup_log:144: Sonos: debug: TTS queueAlert for device 144 <0x73a1e520>
50   08/02/15 19:03:28.469   luup_log:144: Sonos: debug: Microsoft TTS: device 144 language en <0x73a1e520>
02   08/02/15 19:03:28.931   luup_log:144: Sonos: warning: Microsoft TTS: failed! <0x73a1e520>
50   08/02/15 19:03:28.932   luup_log:144: Sonos: debug: TTS endPlayback for device 144 <0x73a1e520>
50   08/02/15 19:03:28.953   luup_log:144: Sonos: debug: restorePlaybackContexts: device=144 <0x73a1e520>
35   08/02/15 19:03:28.954   ImplAction::HandleActionRequest SSonos1_Sonos1_Say_run returned 0 <0x73a1e520>
10   08/02/15 19:03:28.955   luvd_get_info_data_request creating file buffer /data_request?id=lu_action&output_format=xml&DeviceNum=144&serviceId=urn:micasaverde-com:serviceId:Sonos1&action=Say&Text=test%20tts%20882&Language=en&Engine=MICROSOFT&Volume=82&GroupZones=&SameVolumeForAll=false pMem 0x1626000/23224320 diff: 12406784 <0x73a1e520>
10   08/02/15 19:03:28.956   luvd_get_info_data_request done /data_request?id=lu_action&output_format=xml&DeviceNum=144&serviceId=urn:micasaverde-com:serviceId:Sonos1&action=Say&Text=test%20tts%20882&Language=en&Engine=MICROSOFT&Volume=82&GroupZones=&SameVolumeForAll=false ret 0 size 125 pMem 0x1626000/23224320 diff: 12406784 took 0 info 0x73a1dd28 <0x73a1e520>
10   08/02/15 19:03:28.957   luvd_open /data_request?id=lu_action&output_format=xml&DeviceNum=144&serviceId=urn:micasaverde-com:serviceId:Sonos1&action=Say&Text=test%20tts%20882&Language=en&Engine=MICROSOFT&Volume=82&GroupZones=&SameVolumeForAll=false FileBuffer 0x13a06e8 <0x73a1e520>
10   08/02/15 19:03:30.000   GlobalLog: mongoose ctx2: 0xc2f508 s: d:8446 <0x7361e520>

.
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on August 03, 2015, 02:23:00 am
@JS007 - Thank you again!  Working now.

Including Microsoft Translatif ?
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on August 03, 2015, 02:31:16 am
@JS007: if you got the "failed" error message (and you installed trunc 221), that means that the session token was retrieved. I have no idea why it does not work for you or only work sometimes.

@tomgru: are you using Edge/UI7 too ?

Client ID must contain only letters, numbers, _ or -.
Title: Re: New TTS engine: Microsoft Translator
Post by: JS007 on August 03, 2015, 02:38:03 am
@JS007: if you got the "failed" error message (and you installed trunc 221), that means that the session token was retrieved. I have no idea why it does not work for you or only work sometimes.

@tomgru: are you using Edge/UI7 too ?

Client ID must contain only letters, numbers, _ or -.

I did get it to work one time with 221 while playing, then all other times it failed, but Google works every-time, so just leaving that as default, that works perfect for me
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on August 03, 2015, 02:51:57 am
@JS007: if you got the "failed" error message (and you installed trunc 221), that means that the session token was retrieved. I have no idea why it does not work for you or only work sometimes.

@tomgru: are you using Edge/UI7 too ?

Client ID must contain only letters, numbers, _ or -.

I did get it to work one time with 221 while playing, then all other times it failed, but Google works every-time, so just leaving that as default, that works perfect for me


The access token is normally valid during a certain time (10 minutes). I use the saved token while the time has not expired. Maybe your session token expired earlier !? I will make a change to add a second try getting a new session token in case the first try failed.
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on August 03, 2015, 03:36:00 am
@JS007: please try trunc version 222 (only L_SonosTTS.lua has changed). I added a second try with new session token and I added warnings (that are in fact logs) to help debugging.
Title: Re: New TTS engine: Microsoft Translator
Post by: JS007 on August 03, 2015, 04:06:03 am
@JS007: please try trunc version 222 (only L_SonosTTS.lua has changed). I added a second try with new session token and I added warnings (that are in fact logs) to help debugging.

nope, google still works, but not ms

edit by lolodomo: logs suppressed
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on August 03, 2015, 06:03:32 am
@JS007; good point is that authentication is working perfectly for you. The problem is the wget command to retrieve the MP3 seems to fail.

Please try again with trunc version 223 (only L_SonosTTS.lua changed), I added few traces. I would like to see if similar URL to get languages is working or not.
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on August 03, 2015, 06:10:43 am
@JS007: please send logs only to me through PM, I am not sure it is safe to share your session token with everybody. We can read your client id but apprently not your client secret.
Title: Re: New TTS engine: Microsoft Translator
Post by: JS007 on August 03, 2015, 11:25:02 am
@JS007: please send logs only to me through PM, I am not sure it is safe to share your session token with everybody. We can read your client id but apprently not your client secret.

sent logs, the first try actually worked, future tries failed... I sent log example of both
Title: Re: New TTS engine: Microsoft Translator
Post by: JS007 on August 03, 2015, 11:28:08 am
@JS007: please send logs only to me through PM, I am not sure it is safe to share your session token with everybody. We can read your client id but apprently not your client secret.

np, when all done testing I will change the id and secret, thanks
Title: Re: New TTS engine: Microsoft Translator
Post by: tomgru on August 03, 2015, 12:10:37 pm
Fyi, l'm un U15.
Title: Re: New TTS engine: Microsoft Translator
Post by: wezley69 on August 03, 2015, 05:36:40 pm
@lolodomo - No MS not working. I was just happy having Google back!
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on August 04, 2015, 02:58:00 am
@JS007: please try with trunc version 224, I added a new log that displays the command that is run to get the MP3 file.
As soon as it fails, please take the last log entry that starts with "Microsoft TTS: command=" and run it manually in a SSH console after suppressing the "--quiet". Please describe the result. Be careful, the log entry is on several lines. Just suppress \ to have everything on a unique line if you prefer.
We should have more details about what is the reason of the failure.

PS: you have only 10 minutes to run the command again and again. After that delay, the command will fail normally due to token expired.
Title: Re: New TTS engine: Microsoft Translator
Post by: JS007 on August 04, 2015, 06:12:00 am
@JS007: please try with trunc version 224, I added a new log that displays the command that is run to get the MP3 file.
As soon as it fails, please take the last log entry that starts with "Microsoft TTS: command=" and run it manually in a SSH console after suppressing the "--quiet". Please describe the result. Be careful, the log entry is on several lines. Just suppress \ to have everything on a unique line if you prefer.
We should have more details about what is the reason of the failure.

PS: you have only 10 minutes to run the command again and again. After that delay, the command will fail normally due to token expired.

not sure if I did this right

the line in log

02   08/04/15 5:02:39.719   luup_log:144: Sonos: warning: Microsoft TTS: command=rm /www/Say.144.mp3 ; wget --output-document /www/Say.144.mp3 \
--quiet \

response

root@MiOS:~# rm /www/Say.144.mp3 ; wget --output-document /www/Say.144.mp3
rm: can't remove '/www/Say.144.mp3': No such file or directory
BusyBox v1.19.4 (2015-01-30 01:47:09 PST) multi-call binary.

Usage: wget [-c|--continue] [-s|--spider] [-q|--quiet] [-O|--output-document FILE]
        [--header 'header: value'] [-Y|--proxy on/off] [-P DIR]
        [--no-check-certificate] [-U|--user-agent AGENT] URL...

Retrieve files via HTTP or FTP

        -s      Spider mode - only check file existence
        -c      Continue retrieval of aborted transfer
        -q      Quiet
        -P DIR  Save to DIR (default .)
        -O FILE Save to FILE ('-' for stdout)
        -U STR  Use STR for User-Agent header
        -Y      Use proxy ('on' or 'off')

root@MiOS:~#
Title: Re: New TTS engine: Microsoft Translator
Post by: JS007 on August 04, 2015, 06:33:06 am
trying to run again, see you said more of cmd below first line

edit : sent logs via pm

if I ran that wrong, if you could send me a pm of how it should look, I can give it another try
Title: Re: New TTS engine: Microsoft Translator
Post by: fyford on August 04, 2015, 08:08:18 am
tried it and both Google & MS works for me using 'Say the weather'

Thanks
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on August 04, 2015, 08:16:03 am
@JS007: I tried myself and saw that a bad session token provided lead to a "400 bad request" error like you got. So, for a reason I don't understand, I think your session token is rejected by Microsoft while Microsoft just delivered it to you !

I am starting missing ideas to be honest :(
I know that you registered your application to Microsoft using a secret you entered yourself. Maybe you could just try with the default secret generated by Microsoft for you. It is what I did.

What is very strange is that it works sometimes for you ...
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on August 04, 2015, 08:16:55 am
tried it and both Google & MS works for me using 'Say the weather'

Thanks

Good to know that it works for several users and not only myself.
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on August 04, 2015, 09:16:59 am
@JS007: could you run "wget" in a SSH console and provide the result please in case it is different from mine:

BusyBox v1.17.3 (2012-01-09 12:40:42 PST) multi-call binary.

Usage: wget [-c|--continue] [-s|--spider] [-q|--quiet] [-O|--output-document FILE]
        [--header 'header: value'] [-Y|--proxy on/off] [-P DIR]
        [--no-check-certificate] [-U|--user-agent AGENT] URL

Retrieve files via HTTP or FTP

Options:
        -s      Spider mode - only check file existence
        -c      Continue retrieval of aborted transfer
        -q      Quiet
        -P      Set directory prefix to DIR
        -O FILE Save to FILE ('-' for stdout)
        -U STR  Use STR for User-Agent header
        -Y      Use proxy ('on' or 'off')


Maybe we should use the option -Y and set it to 'off' ?
Title: Re: New TTS engine: Microsoft Translator
Post by: hek on August 04, 2015, 03:14:06 pm
They generated a client-secret with some weird characters which didn't work. I had to type in my own.
Title: Re: New TTS engine: Microsoft Translator
Post by: JS007 on August 04, 2015, 05:42:03 pm
created a new ID

this time i made name and id the same, all lowercase and checked "Enable subdomain access"

also made the pass all lowercase

works almost every time so far... does miss sometimes   EDIT : (spoke too soon, it misses quite a few, much better then older ID though, but think gonna stick with Google in this plugin)

is weird, I changed all the options in old id to match, including password and it (the older id) still fails

the only difference now is in new one use  redirect link "https://datamarket.azure.com" and old I used "https://microsoft.com", but every time I try to change that it errors out on save

also the old ID had numbers and letters, new id is all lowercase leters

maybe the id was just created flaky or something for that first id
Title: Re: New TTS engine: Microsoft Translator
Post by: wezley69 on August 05, 2015, 10:44:04 pm
Tried MS again today after reloading the 4 files but it still fails.

--quiet \
--header "Accept-Charset: utf-8;q=0.7,*;q=0.3" \
--header "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" \
--header "Authorization: Bearer http%3a%2f%2fschemas.xmlsoap.org%2fws%2f2005%2f05%2fidentity%2fclaims%2fnameidentifier=VeraTTS123&http%3a%2f%2fschemas.microsoft.com%2faccesscontrolservice%2f2010%2f07%2fclaims%2fidentityprovider=https%3a%2f%2fdatamarket.accesscontrol.windows.net%2f&Audience=http%3a%2f%2fapi.microsofttranslator.com&ExpiresOn=1438824256&Issuer=https%3a%2f%2fdatamarket.accesscontrol.windows.net%2f&HMACSHA256=vZlOXBauIOUw29kKz3CaXg9qPnw7PyrnNP51GuABbyI%3d" \
--user-agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11" \
"http://api.microsofttranslator.com/V2/Http.svc/Speak?appId=&text=Test&language=en-US&format=audio%2fmp3&options=MaxQuality" <0x743da520>
02   08/05/15 20:14:17.344   luup_log:150: Sonos: warning: Microsoft TTS: returnCocde=256 <0x743da520>
02   08/05/15 20:14:17.345   luup_log:150: Sonos: warning: Microsoft TTS: size=0 <0x743da520>
02   08/05/15 20:14:17.547   luup_log:150: Sonos: warning: Microsoft TTS: languages=caca-esdada-dkdede-deenen-auen-caen-gben-inen-useses-eses-mxfifi-fifrfr-cafr-fritit-itjaja-jpkoko-krnb-nonlnl-nlnoplpl-plptpt-brpt-ptruru-rusvsv-sezh-chszh-chtzh-cnzh-hkzh-tw <0x743da520>
02   08/05/15 20:14:17.548   luup_log:150: Sonos: warning: Microsoft TTS: failed! <0x743da520>
02   08/05/15 20:14:17.548   luup_log:150: Sonos: warning: Microsoft TTS: trying again with a new session token <0x743da520>
02   08/05/15 20:14:17.549   luup_log:150: Sonos: warning: Trying to get a new Microsoft session token <0x743da520>
02   08/05/15 20:14:18.041   luup_log:150: Sonos: warning: Getting a new Microsoft session token for 599 seconds <0x743da520>
02   08/05/15 20:14:18.042   luup_log:150: Sonos: warning: Microsoft TTS using token http%3a%2f%2fschemas.xmlsoap.org%2fws%2f2005%2f05%2fidentity%2fclaims%2fnameidentifier=VeraTTS123&http%3a%2f%2fschemas.microsoft.com%2faccesscontrolservice%2f2010%2f07%2fclaims%2fidentityprovider=https%3a%2f%2fdatamarket.accesscontrol.windows.net%2f&Audience=http%3a%2f%2fapi.microsofttranslator.com&ExpiresOn=1438824257&Issuer=https%3a%2f%2fdatamarket.accesscontrol.windows.net%2f&HMACSHA256=885FMmYYiehq3ngAyOVpMaA2PtmY5wXS7i9BT%2bqs%2f2A%3d <0x743da520>
02   08/05/15 20:14:18.192   luup_log:150: Sonos: warning: Microsoft TTS: command=rm /www/Say.150.mp3 ; wget --output-document /www/Say.150.mp3 \
--quiet \
--header "Accept-Charset: utf-8;q=0.7,*;q=0.3" \
--header "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" \
--header "Authorization: Bearer http%3a%2f%2fschemas.xmlsoap.org%2fws%2f2005%2f05%2fidentity%2fclaims%2fnameidentifier=VeraTTS123&http%3a%2f%2fschemas.microsoft.com%2faccesscontrolservice%2f2010%2f07%2fclaims%2fidentityprovider=https%3a%2f%2fdatamarket.accesscontrol.windows.net%2f&Audience=http%3a%2f%2fapi.microsofttranslator.com&ExpiresOn=1438824257&Issuer=https%3a%2f%2fdatamarket.accesscontrol.windows.net%2f&HMACSHA256=885FMmYYiehq3ngAyOVpMaA2PtmY5wXS7i9BT%2bqs%2f2A%3d" \
--user-agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11" \
"http://api.microsofttranslator.com/V2/Http.svc/Speak?appId=&text=Test&language=en-US&format=audio%2fmp3&options=MaxQuality" <0x743da520>
02   08/05/15 20:14:18.193   luup_log:150: Sonos: warning: Microsoft TTS: returnCocde=256 <0x743da520>
02   08/05/15 20:14:18.194   luup_log:150: Sonos: warning: Microsoft TTS: size=0 <0x743da520>
02   08/05/15 20:14:18.375   luup_log:150: Sonos: warning: Microsoft TTS: languages=caca-esdada-dkdede-deenen-auen-caen-gben-inen-useses-eses-mxfifi-fifrfr-cafr-fritit-itjaja-jpkoko-krnb-nonlnl-nlnoplpl-plptpt-brpt-ptruru-rusvsv-sezh-chszh-chtzh-cnzh-hkzh-tw <0x743da520>
02   08/05/15 20:14:18.375   luup_log:150: Sonos: warning: Microsoft TTS: failed! <0x743da520>
01   08/05/15 20:14:18.398   LuaInterface::CallFunction_Job device 150 function SSonos1_Sonos1_Say_run took 7 seconds <0x743da520>
06
Title: Re: New TTS engine: Microsoft Translator
Post by: Pseudomizer on October 16, 2015, 12:00:41 pm
Anybody able to change the gender of the voice with the Microsoft TTS engine?

In 2014 it was a future feature but now they have this https://msdn.microsoft.com/en-us/library/system.speech.synthesis.voicegender.aspx which doesn't state if this is available in the API or simply in Windows.
Title: Re: New TTS engine: Microsoft Translator
Post by: JS007 on October 17, 2015, 08:11:04 am
tried it and both Google & MS works for me using 'Say the weather'

Thanks

Good to know that it works for several users and not only myself.

due to the google side issues tried ms again, this time just works with no issues for me as well on veraedge 7.0.11\1.4

https://datamarket.azure.com/dataset/bing/microsofttranslator

I think this may be where I failed the first time, it should say "Active Subscription" for the 2,000,000, it did not before
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on October 22, 2015, 07:46:33 am
@JS007: happy that it is now working for you too.
Title: Re: New TTS engine: Microsoft Translator
Post by: ilikelife on October 24, 2015, 01:54:54 pm
Thanks to all, I just converted from Google to Microsoft for TTS, and it works!

@lolodomo You mentioned that different languages in english use different voices.  I had played around with that on Google (used fr for my french door ) and was a little surprised that they still worked with MS.  That led me to look for voices on MS sites, and found some information at the link below.

https://msdn.microsoft.com/en-us/library/dd145258.aspx (https://msdn.microsoft.com/en-us/library/dd145258.aspx)

 It's over my head, but wondered if it would be possible to add any of those parameters to the Sonos plugin?  I don't know if it's doable, but thought I'd ask.

Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on October 25, 2015, 03:42:32 am
The API does not offer a choice of voice. You can only choose a language/country.
https://msdn.microsoft.com/en-us/library/ff512420.aspx
Title: Re: New TTS engine: Microsoft Translator
Post by: ilikelife on October 25, 2015, 09:30:05 am
Oh well.  I'm just happy it's working!  :)
Title: Re: New TTS engine: Microsoft Translator
Post by: fmzip on November 22, 2015, 11:25:04 pm
Thanks for posting this!

Took me awhile to figure it out being a noob but I got it to work with my Sonos :)
Title: Re: New TTS engine: Microsoft Translator
Post by: RHINESEL on December 23, 2015, 10:18:23 pm
I'm having a problem with Microsoft TTS not working.

Checked subscribed to the 200K or whatever the amount is.
Removed all symbols from secret code.
No spaces in ClientID.
Checked the sub directory thing and have https://microsoft.com as the website.

The funny thing is that Sonos won't even stop playing a song to "attempt" the TTS.  You would think if it was a problem with the Microsoft credentials it would play the song, pause..... hear nothing... then resume the song again.  It doesn't even pause.

I have the 1.4 from the app store.  It should be fully updated and I shouldn't have to upload files manually, right?
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on December 23, 2015, 11:07:57 pm
Under Settings in the Sonos device you are trying to have speak, you may want to enable Debug logs (at the bottom) and check the output in the Vera log. It may indicate what the issue is.  I remember setting Sonos up last month and tearing my hair out before I got it to work and checking those logs put me on the right path. Something stupid is all I remember.
Title: Re: New TTS engine: Microsoft Translator
Post by: JS007 on December 23, 2015, 11:52:27 pm
I'm having a problem with Microsoft TTS not working.

Checked subscribed to the 200K or whatever the amount is.
Removed all symbols from secret code.
No spaces in ClientID.
Checked the sub directory thing and have https://microsoft.com as the website.

The funny thing is that Sonos won't even stop playing a song to "attempt" the TTS.  You would think if it was a problem with the Microsoft credentials it would play the song, pause..... hear nothing... then resume the song again.  It doesn't even pause.

I have the 1.4 from the app store.  It should be fully updated and I shouldn't have to upload files manually, right?

on the settings tab for the plugin, did it discover your sonos? and is the ip the same as your sonos still, could of changed possibly if not use reserved or static IP's

can you do things from the player tab?
Title: Re: New TTS engine: Microsoft Translator
Post by: RHINESEL on December 24, 2015, 03:18:19 pm
I'm having a problem with Microsoft TTS not working.

Checked subscribed to the 200K or whatever the amount is.
Removed all symbols from secret code.
No spaces in ClientID.
Checked the sub directory thing and have https://microsoft.com as the website.

The funny thing is that Sonos won't even stop playing a song to "attempt" the TTS.  You would think if it was a problem with the Microsoft credentials it would play the song, pause..... hear nothing... then resume the song again.  It doesn't even pause.

I have the 1.4 from the app store.  It should be fully updated and I shouldn't have to upload files manually, right?

on the settings tab for the plugin, did it discover your sonos? and is the ip the same as your sonos still, could of changed possibly if not use reserved or static IP's

can you do things from the player tab?

Actually, the discovery patch is not installed.  The ip's should all be static, I did check them before when I was having TTS issues.  I personally don't know if Vera can control the Sonos or is just reading the state.  I don't think I've ever tried to control the Sonos via Vera since moving to UI7 but Google Translate did work before in UI7 so I'm not sure.

With the holidays it'll be a few days before I can troubleshoot more.
Title: Re: New TTS engine: Microsoft Translator
Post by: RHINESEL on December 24, 2015, 03:19:48 pm
People keep saying the settings tab of the plugin.... my plugin doesn't have a settings tab.  Do you mean the tab of the device?  Did the plugin not carry over correctly UI5 to UI7?
Title: Re: New TTS engine: Microsoft Translator
Post by: JS007 on December 25, 2015, 12:32:20 pm
People keep saying the settings tab of the plugin.... my plugin doesn't have a settings tab.  Do you mean the tab of the device?  Did the plugin not carry over correctly UI5 to UI7?

yes, the device created by the plugin is what I meant

I did not have installed in UI5, only UI7, so not sure
Title: Re: New TTS engine: Microsoft Translator
Post by: RHINESEL on December 25, 2015, 02:12:26 pm
I ended up deleting all my devices, the plugin, and reinstalled. Now it's working.

Weird thing though. I can't set the info in the TTS page, it just disappears. I have to put it in on the variable tab of the advanced page. Also, even though Microsoft is set as the default in variables, Google is still populated as the default on the TTS page. Still though, it's working now so I'm not fretting over it.
Title: Re: New TTS engine: Microsoft Translator
Post by: paros on December 27, 2015, 03:46:08 pm
I just tested to create a new scene with a Say action, just filling text, language and engine with MICROSOFT. It works.

Can you provice the code for this scene?
I tried, but nothing happens whne using "Microsoft" as  for the scenes (works good with the manual say-function).
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on December 27, 2015, 06:25:13 pm
It needs to be capitalized. See below LUUP snippet. Make sure to replace DEVICE# with the Device ID of your target Sonos device. It will speak using the en-CA (English Canadian female) voice and the volume is set to level 80

Code: [Select]
luup.call_action("urn:micasaverde-com:serviceId:Sonos1", "Say", {Text="The sun shines outside", Engine="MICROSOFT",Language="en-CA", Volume=80},DEVICE#)
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on December 28, 2015, 05:25:12 am
I am updated the wiki page...
Title: Re: New TTS engine: Microsoft Translator
Post by: RHINESEL on December 28, 2015, 08:35:01 pm
It needs to be capitalized. See below LUUP snippet. Make sure to replace DEVICE# with the Device ID of your target Sonos device. It will speak using the en-CA (English Canadian female) voice and the volume is set to level 80

Code: [Select]
luup.call_action("urn:micasaverde-com:serviceId:Sonos1", "Say", {Text="The sun shines outside", Engine="MICROSOFT",Language="en-CA", Volume=80},DEVICE#)

THANK YOU!  I couldn't figure out why things weren't working for PLEG. I put in "Microsoft " because that's how it was in the drop downs. Now that I made it "MICROSOFT " in the variables and PLEG it finally works.

Takes 20-30 seconds sometimes, but it works.
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on December 28, 2015, 08:45:29 pm
You may want to check the MaryTTS thread if you have a Windows box already running 24/7. It looks like it will also run on *nix as it's more or less pure Java. I may have to tinker with that when I get my *nix cloud server up and running.
Title: Re: New TTS engine: Microsoft Translator
Post by: symonsaz on December 29, 2015, 06:59:18 pm
Followed this thread from beginning to end... Had it originally working with google... then that went down, did the truck221 and replaced my xml,js,and lua files.  AND did the microsoft conversion... ALL was well for a few days... Now NADA...  microsoft fix does not seem to work anymore
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on December 29, 2015, 07:31:00 pm
Just had Vera tell me the weather using the Microsoft en-CA voice. No issues.
Title: Re: New TTS engine: Microsoft Translator
Post by: integlikewhoa on December 29, 2015, 07:48:56 pm
Followed this thread from beginning to end... Had it originally working with google... then that went down, did the truck221 and replaced my xml,js,and lua files.  AND did the microsoft conversion... ALL was well for a few days... Now NADA...  microsoft fix does not seem to work anymore

Still works for me. Maybe you have a internet issue, data limit, or settings problem.
Title: Re: New TTS engine: Microsoft Translator
Post by: JS007 on December 29, 2015, 08:08:08 pm
Followed this thread from beginning to end... Had it originally working with google... then that went down, did the truck221 and replaced my xml,js,and lua files.  AND did the microsoft conversion... ALL was well for a few days... Now NADA...  microsoft fix does not seem to work anymore

221 was early on, should not need a fix anymore, just run update

SONOS UPDATE
http://<yourveraip>:3480/data_request?id=update_plugin&Plugin=4226
Title: Re: New TTS engine: Microsoft Translator
Post by: symonsaz on December 30, 2015, 05:57:50 am
uninstalled sonos plugin and reinstalled with the trunk 221 files and now its fine...

thanks guys
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on December 30, 2015, 07:10:50 am
Why trunc 221 ? This was probably an intermediate version. Just use the official release 1.4, that is what I recommend.
Title: Re: New TTS engine: Microsoft Translator
Post by: symonsaz on January 02, 2016, 10:02:42 am
your advice is always bang on... t221 was an older fix.  I uninstalled and installed 1.4 and it all seems to be fine now

thanks for your trusted input!
Title: Re: New TTS engine: Microsoft Translator
Post by: amg0 on January 14, 2016, 06:33:08 am
I cannot get it to work.
I enabled debug and keep getting these.

02   01/14/16 12:27:13.561   luvd_get_info mg conn can't read /etc/cmh-ludl//toolbox.js or /etc/cmh-lu//toolbox.js from filename /toolbox.js pPtrFile (null) <0x2f663680>
06   01/14/16 12:27:14.056   Device_Variable::m_szValue_set device: 6 service: urn:micasaverde-com:serviceId:HaDevice1 variable: LastUpdate was: 1452770818 now: 1452770834 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2cda9680>
08   01/14/16 12:27:22.727   JobHandler_LuaUPnP::HandleActionRequest device: 6 service: urn:micasaverde-com:serviceId:Sonos1 action: Say <0x2dfa9680>
08   01/14/16 12:27:22.728   JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=6 <0x2dfa9680>
08   01/14/16 12:27:22.728   JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:micasaverde-com:serviceId:Sonos1 <0x2dfa9680>
08   01/14/16 12:27:22.728   JobHandler_LuaUPnP::HandleActionRequest argument action=Say <0x2dfa9680>
08   01/14/16 12:27:22.728   JobHandler_LuaUPnP::HandleActionRequest argument Text=il faut aller manger <0x2dfa9680>
08   01/14/16 12:27:22.729   JobHandler_LuaUPnP::HandleActionRequest argument Language=fr <0x2dfa9680>
08   01/14/16 12:27:22.729   JobHandler_LuaUPnP::HandleActionRequest argument Engine=MICROSOFT <0x2dfa9680>
08   01/14/16 12:27:22.729   JobHandler_LuaUPnP::HandleActionRequest argument SameVolumeForAll=false <0x2dfa9680>
02   01/14/16 12:27:24.346   luup_log:6: Sonos: warning: Microsoft TTS: failed! <0x2dfa9680>
02   01/14/16 12:27:24.347   luup_log:6: Sonos: warning: Microsoft TTS: trying again with a new session token <0x2dfa9680>
02   01/14/16 12:27:25.862   luup_log:6: Sonos: warning: Microsoft TTS: failed! <0x2dfa9680>

I have checked by client id & secret several time , I cant see the issue.
My device variables are here below ( I obfuscated the clientid/secret of course but they were correct )

{
  "altuiid": "0-6",
  "device_type": "urn:schemas-micasaverde-com:device:Sonos:1",
  "states": [
    {
      "service": "urn:micasaverde-com:serviceId:Sonos1",
      "variable": "PluginVersion",
      "value": "1.4",
      "id": 0
    },
    {
      "service": "urn:micasaverde-com:serviceId:Sonos1",
      "variable": "DiscoveryResult",
      "value": "<devices><device><ip>192.168.1.23</ip><port>1400</port><descriptionURL>http://192.168.1.23:1400/xml/device_description.xml</descriptionURL><modelName>Sonos PLAY:1</modelName><friendlyName>192.168.1.23 - Sonos PLAY:1</friendlyName><roomName>Salon</roomName></device><device><ip>192.168.1.22</ip><port>1400</port><descriptionURL>http://192.168.1.22:1400/xml/device_description.xml</descriptionURL><modelName>Sonos PLAY:1</modelName><friendlyName>192.168.1.22 - Sonos PLAY:1</friendlyName><roomName>Cuisine</roomName></device></devices>",
      "id": 1
    },
    {
      "service": "urn:micasaverde-com:serviceId:Sonos1",
      "variable": "RouterIp",
      "value": "",
      "id": 2
    },
    {
      "service": "urn:micasaverde-com:serviceId:Sonos1",
      "variable": "RouterPort",
      "value": "80",
      "id": 3
    },
    {
      "service": "urn:micasaverde-com:serviceId:Sonos1",
      "variable": "CheckStateRate",
      "value": "0",
      "id": 4
    },
    {
      "service": "urn:micasaverde-com:serviceId:Sonos1",
      "variable": "DebugLogs",
      "value": "0",
      "id": 5
    },
    {
      "service": "urn:micasaverde-com:serviceId:Sonos1",
      "variable": "FetchQueue",
      "value": "1",
      "id": 6
    },
    {
      "service": "urn:micasaverde-com:serviceId:Sonos1",
      "variable": "DiscoveryPatchInstalled",
      "value": "0",
      "id": 7
    },
    {
      "service": "urn:micasaverde-com:serviceId:Sonos1",
      "variable": "DefaultLanguageTTS",
      "value": "fr",
      "id": 8
    },
    {
      "service": "urn:micasaverde-com:serviceId:Sonos1",
      "variable": "DefaultEngineTTS",
      "value": "MICROSOFT",
      "id": 9
    },
    {
      "service": "urn:micasaverde-com:serviceId:Sonos1",
      "variable": "GoogleTTSServerURL",
      "value": "http://translate.google.com",
      "id": 10
    },
    {
      "service": "urn:micasaverde-com:serviceId:Sonos1",
      "variable": "OSXTTSServerURL",
      "value": "",
      "id": 11
    },
    {
      "service": "urn:micasaverde-com:serviceId:Sonos1",
      "variable": "MaryTTSServerURL",
      "value": "",
      "id": 12
    },
    {
      "service": "urn:micasaverde-com:serviceId:Sonos1",
      "variable": "MicrosoftClientId",
      "value": "xxxxxxxx-nnnn-nnnn-xxxx-xxxxxxxxxxxx",
      "id": 13
    },
    {
      "service": "urn:micasaverde-com:serviceId:Sonos1",
      "variable": "MicrosoftClientSecret",
      "value": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "id": 14
    },
    {
      "service": "urn:upnp-org:serviceId:DeviceProperties",
      "variable": "ZoneName",
      "value": "Salon",
      "id": 15
    },
    {
      "service": "urn:upnp-org:serviceId:DeviceProperties",
      "variable": "SonosID",
      "value": "RINCON_5CAAFD48410601400",
      "id": 16
    },
    {
      "service": "urn:micasaverde-com:serviceId:Sonos1",
      "variable": "SonosModelName",
      "value": "Sonos PLAY:1",
      "id": 17
    },
    {
      "service": "urn:micasaverde-com:serviceId:Sonos1",
      "variable": "SonosModel",
      "value": "6",
      "id": 18
    },
    {
      "service": "urn:micasaverde-com:serviceId:Sonos1",
      "variable": "ProxyUsed",
      "value": "proxy is not in use",
      "id": 19
    },
    {
      "service": "urn:micasaverde-com:serviceId:Sonos1",
      "variable": "SonosOnline",
      "value": "1",
      "id": 20
    },
    {
      "service": "urn:upnp-org:serviceId:AVTransport",
      "variable": "TransportState",
      "value": "PLAYING",
      "id": 21
    },
    {
      "service": "urn:upnp-org:serviceId:AVTransport",
      "variable": "TransportStatus",
      "value": "OK",
      "id": 22
    },
    {
      "service": "urn:upnp-org:serviceId:AVTransport",
      "variable": "TransportPlaySpeed",
      "value": "1",
      "id": 23
    },
    {
      "service": "urn:upnp-org:serviceId:AVTransport",
      "variable": "CurrentPlayMode",
      "value": "NORMAL",
      "id": 24
    },
    {
      "service": "urn:upnp-org:serviceId:AVTransport",
      "variable": "CurrentCrossfadeMode",
      "value": "0",
      "id": 25
    },
    {
      "service": "urn:upnp-org:serviceId:AVTransport",
      "variable": "CurrentTransportActions",
      "value": "Set, Play, Stop, Pause, Next",
      "id": 26
    },
    {
      "service": "urn:upnp-org:serviceId:AVTransport",
      "variable": "NumberOfTracks",
      "value": "6",
      "id": 27
    },
    {
      "service": "urn:upnp-org:serviceId:AVTransport",
      "variable": "CurrentMediaDuration",
      "value": "NOT_IMPLEMENTED",
      "id": 28
    },
    {
      "service": "urn:upnp-org:serviceId:AVTransport",
      "variable": "AVTransportURI",
      "value": "x-sonosapi-radio:flow?sid=2&flags=8296&sn=1",
      "id": 29
    },
    {
      "service": "urn:upnp-org:serviceId:AVTransport",
      "variable": "AVTransportURIMetaData",
      "value": "<DIDL-Lite xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:upnp=\"urn:schemas-upnp-org:metadata-1-0/upnp/\" xmlns:r=\"urn:schemas-rinconnetworks-com:metadata-1-0/\" xmlns=\"urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/\"><item id=\"000c2068flow\" parentID=\"0\" restricted=\"true\"><dc:title>Lancer Flow</dc:title><upnp:class>object.item.audioItem.audioBroadcast.sonos-favorite</upnp:class><desc id=\"cdudn\" nameSpace=\"urn:schemas-rinconnetworks-com:metadata-1-0/\">SA_RINCON519_alexis.mermet@free.fr</desc></item></DIDL-Lite>",
      "id": 30
    },
    {
      "service": "urn:upnp-org:serviceId:AVTransport",
      "variable": "CurrentRadio",
      "value": "",
      "id": 31
    },
    {
      "service": "urn:micasaverde-com:serviceId:Sonos1",
      "variable": "CurrentService",
      "value": "Deezer",
      "id": 32
    },
    {
      "service": "urn:upnp-org:serviceId:AVTransport",
      "variable": "CurrentTrack",
      "value": "4",
      "id": 33
    },
    {
      "service": "urn:upnp-org:serviceId:AVTransport",
      "variable": "CurrentTrackDuration",
      "value": "0:02:49",
      "id": 34
    },
    {
      "service": "urn:upnp-org:serviceId:AVTransport",
      "variable": "CurrentTrackURI",
      "value": "x-sonosprog-http:tr%3a78749541.mp3?sid=2&flags=8224&sn=1",
      "id": 35
    },
    {
      "service": "urn:upnp-org:serviceId:AVTransport",
      "variable": "CurrentTrackMetaData",
      "value": "<DIDL-Lite xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:upnp=\"urn:schemas-upnp-org:metadata-1-0/upnp/\" xmlns:r=\"urn:schemas-rinconnetworks-com:metadata-1-0/\" xmlns=\"urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/\"><item id=\"-1\" parentID=\"-1\" restricted=\"true\"><res protocolInfo=\"sonos.com-http:*:audio/mpeg:*\" duration=\"0:02:49\">x-sonosprog-http:tr%3a78749541.mp3?sid=2&amp;flags=8224&amp;sn=1</res><r:streamContent></r:streamContent><upnp:albumArtURI>/getaa?s=1&amp;u=x-sonosprog-http%3atr%253a78749541.mp3%3fsid%3d2%26flags%3d8224%26sn%3d1</upnp:albumArtURI><dc:title>Quelqu&apos;un M&apos;a Dit</dc:title><upnp:class>object.item.audioItem.musicTrack</upnp:class><dc:creator>Carla Bruni</dc:creator><upnp:album>Quelqu&apos;Un M&apos;A Dit</upnp:album></item></DIDL-Lite>",
      "id": 36
    },
    {
      "service": "urn:upnp-org:serviceId:AVTransport",
      "variable": "CurrentStatus",
      "value": "Deezer: Quelqu'un M'a Dit:  (Carla Bruni, Quelqu'Un M'A Dit)",
      "id": 37
    },
    {
      "service": "urn:upnp-org:serviceId:AVTransport",
      "variable": "CurrentTitle",
      "value": "Quelqu'un M'a Dit",
      "id": 38
    },
    {
      "service": "urn:upnp-org:serviceId:AVTransport",
      "variable": "CurrentArtist",
      "value": "Carla Bruni",
      "id": 39
    },
    {
      "service": "urn:upnp-org:serviceId:AVTransport",
      "variable": "CurrentAlbum",
      "value": "Quelqu'Un M'A Dit",
      "id": 40
    },
    {
      "service": "urn:upnp-org:serviceId:AVTransport",
      "variable": "CurrentDetails",
      "value": "",
      "id": 41
    },
    {
      "service": "urn:upnp-org:serviceId:AVTransport",
      "variable": "CurrentAlbumArt",
      "value": "http://192.168.1.23:1400/getaa?s=1&u=x-sonosprog-http%3atr%253a78749541.mp3%3fsid%3d2%26flags%3d8224%26sn%3d1",
      "id": 42
    },
    {
      "service": "urn:upnp-org:serviceId:AVTransport",
      "variable": "RelativeTimePosition",
      "id": 43,
      "value": "0:00:38"
    },
    {
      "service": "urn:upnp-org:serviceId:RenderingControl",
      "variable": "Volume",
      "value": "11",
      "id": 44
    },
    {
      "service": "urn:upnp-org:serviceId:RenderingControl",
      "variable": "Mute",
      "value": "0",
      "id": 45
    },
    {
      "service": "urn:upnp-org:serviceId:ContentDirectory",
      "variable": "SavedQueues",
      "value": "",
      "id": 46
    },
    {
      "service": "urn:upnp-org:serviceId:ContentDirectory",
      "variable": "FavoritesRadios",
      "value": "R:0/0/0@France Inter\n",
      "id": 47
    },
    {
      "service": "urn:upnp-org:serviceId:ContentDirectory",
      "variable": "Favorites",
      "value": "FV:2/2@France Info\nFV:2/1@France Inter\nFV:2/3@Lancer Flow\n",
      "id": 48
    },
    {
      "service": "urn:upnp-org:serviceId:ContentDirectory",
      "variable": "Queue",
      "value": "Don't Know Why\nSeven Years\nCold Cold Heart\nFeelin' The Same Way\nCome Away With Me\nShoot The Moon\nTurn Me On\nLonestar\nI've Got To See You Again\nPainter Song\nOne Flight Down\nNightingale\nThe Long Day Is Over\nThe Nearness Of You\nFid?le\nUn jour au mauvais endroit\nLe monde moderne\nConduire en Angleterre\nLe portrait\nL'?clipse\nAvant toi\nElle me manque d?j?\nLa bo?te ? musique\nJ'ai le droit aussi\nCristal\nLes feux d'artifice\nJimmy (en duo avec Calogero)\nSpace Oddity (1999 Remastered Version)\nSpace Oddity (1999 Remastered Version)\nThe Man Who Sold The World (1999 Remastered Version)\nOh! You Pretty Things (1999 Remastered Version)\nChanges (1999 Remastered Version)\nLife On Mars? (1999 Remastered Version)\nStarman (2002 Remastered Version)\nZiggy Stardust (2002 Remastered Version)\nSuffragette City (2002 Remastered Version)\nJohn, I'm Only Dancing (2002 Remastered Version)\nThe Jean Genie (1999 Remastered Version)\nDrive In Saturday (1999 Remastered Version)\nSorrow (1999 Remastered Version)\nDiamond Dogs (1999 Remastered Version)\nRebel Rebel (1999 Remastered Version)\nYoung Americans (Single Version) [2002 Remastered Version] (Single Version; 2002 Remastered Version\nFame (1999 Remastered Version)\nGolden Years (Single Version) [2002 Remastered Version] (Single Version; 2002 Remastered Version)\nTVC15 (1999 Remastered Version)\nWild Is The Wind (1999 Remastered Version)\nSound and Vision (1999 Remastered Version)\nHeroes (Single Version) [2002 Remastered Version] (Single Version; 2002 Remastered Version)\nBoys Keep Swinging (1999 Remastered Version)\nUnder Pressure\nAshes To Ashes (2002 Remastered Version)\nFashion\nScary Monsters (And Super Creeps) (2002 Remastered Version)\nLet's Dance (Single Version) [2002 Remastered Version]\nChina Girl (2002 Remastered Version)\nModern Love (2002 Remastered Version)\nBlue Jean (1999 Remastered Version)\nThis Is Not America (2002 Remastered Version)\nLoving The Alien (Single Version; 2002 Remastered Version)\nDancing In The Street (2002 Remastered Version)\nAbsolute Beginners (2002 Remastered Version)\nJump They Say (Radio Edit; 2002 Remastered Version)\nHallo Spaceboy (with The Pet Shop Boys) (Pet Shop Boys Remix)\nLittle Wonder (Edit)\nI'm Afraid Of Americans (V1) (Radio Edit)\nSlow Burn (Radio Edit)\n",
      "id": 49
    },
    {
      "service": "urn:micasaverde-com:serviceId:Sonos1",
      "variable": "GroupCoordinator",
      "value": "RINCON_5CAAFD48410601400",
      "id": 50
    },
    {
      "service": "urn:upnp-org:serviceId:ZoneGroupTopology",
      "variable": "ZonePlayerUUIDsInGroup",
      "value": "RINCON_5CAAFD48410601400",
      "id": 51
    },
    {
      "service": "urn:upnp-org:serviceId:ZoneGroupTopology",
      "variable": "ZoneGroupState",
      "value": "<ZoneGroups><ZoneGroup Coordinator=\"RINCON_5CAAFD48410601400\" ID=\"RINCON_5CAAFD48410601400:33\"><ZoneGroupMember UUID=\"RINCON_5CAAFD48410601400\" Location=\"http://192.168.1.23:1400/xml/device_description.xml\" ZoneName=\"Salon\" Icon=\"x-rincon-roomicon:den\" Configuration=\"1\" SoftwareVersion=\"31.3-22220\" MinCompatibleVersion=\"29.0-00000\" LegacyCompatibleVersion=\"24.0-00000\" BootSeq=\"12\" WirelessMode=\"1\" HasConfiguredSSID=\"1\" ChannelFreq=\"2437\" BehindWifiExtender=\"0\" WifiEnabled=\"1\" Orientation=\"0\" SonarState=\"1\"/></ZoneGroup><ZoneGroup Coordinator=\"RINCON_5CAAFD48412A01400\" ID=\"RINCON_5CAAFD48410601400:32\"><ZoneGroupMember UUID=\"RINCON_5CAAFD48412A01400\" Location=\"http://192.168.1.22:1400/xml/device_description.xml\" ZoneName=\"Cuisine\" Icon=\"x-rincon-roomicon:kitchen\" Configuration=\"1\" SoftwareVersion=\"31.3-22220\" MinCompatibleVersion=\"29.0-00000\" LegacyCompatibleVersion=\"24.0-00000\" BootSeq=\"14\" WirelessMode=\"1\" HasConfiguredSSID=\"1\" ChannelFreq=\"2437\" BehindWifiExtender=\"0\" WifiEnabled=\"1\" Orientation=\"0\" SonarState=\"1\"/></ZoneGroup></ZoneGroups>",
      "id": 52
    },
    {
      "service": "urn:micasaverde-com:serviceId:HaDevice1",
      "variable": "LastUpdate",
      "id": 53,
      "value": "1452771073"
    },
    {
      "service": "urn:micasaverde-com:serviceId:Sonos1",
      "variable": "SonosServicesKeys",
      "value": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "id": 54
    }
  ]
}
Title: Re: New TTS engine: Microsoft Translator
Post by: JsChiSurf on February 20, 2016, 07:07:38 pm
So, I've been merrily using this since last August when the option / feature was added to the Sonos plugin.  Suddenly today the audio is spoken in a female voice, and not nearly as "eloquent" as the male voice the I've grown accustomed to.

Anybody else having this occur as well?  I did some searching and cannot see a way to specify the gender of the voice within the Microsoft account settings, and nothing has changed on my Vera side.





Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on February 20, 2016, 07:17:23 pm
Which voice are you using? As my en-CA female voice has turned into a maie one. I much prefer the female voice.
Title: Re: New TTS engine: Microsoft Translator
Post by: JsChiSurf on February 20, 2016, 07:22:01 pm
Which voice are you using? As my en-CA female voice has turned into a maie one. I much prefer the female voice.

So yours changed too, but opposite of me?

I was using the "default" Microsoft voice (English En), which for me was a male.  I think it's just a matter of what you have become accustomed to, and now, suddenly being different, I'm not liking it...

Just tested and indeed if I choose Canadian, I get a male voice, but female for all other English voices.  Seems perhaps Microsoft has changed things, w/o the ability to define, and without any sort of documentation / heads up that I can find.
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on February 20, 2016, 07:27:41 pm
I just notice en-US changed from male to female so I've changed my settings from en-CA to en-US to get my female voice back. the basic en voice still is female but I'm not fond of her accent or that of the australian female voice.

I always have my local MaryTTS server as a backup luckily.
Title: Re: New TTS engine: Microsoft Translator
Post by: tomgru on February 20, 2016, 09:53:43 pm
OMG... I thought I was going crazy.  Yep... my US-CA changed to male as well.
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on February 20, 2016, 10:14:29 pm
I know. I had the same feeling when my en-CA voice changed. It's just my preference to have a female voice make the announcements. Now if only I could find a 'Jeannie' voice, that would be perfect...
Title: Re: New TTS engine: Microsoft Translator
Post by: tomgru on February 20, 2016, 11:45:03 pm
Or Jennifer Aniston.  To each his own :-)
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on February 21, 2016, 02:59:46 am
The French voice changed from female to male. And my preference is for a female voice :(
So apparently they switch several voices.
It would be fair to let the user choose between male or female.
Title: Re: New TTS engine: Microsoft Translator
Post by: Spanners on February 22, 2016, 02:39:17 am
en-GB has gone from a very well spoken male voice to a female voice that has some awful translation quirks.  :(

I presume from the conversation that there's no way to specify otherwise and you just have to suck it up?

Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on February 22, 2016, 11:08:26 am
Correct, you are at Microsoft's (and for that matter Google's) mercy as to what voice you will receive. The en-US female voice is not half bad although I preferred my old trusty en-CA one.
Title: Re: New TTS engine: Microsoft Translator
Post by: DeltaNu1142 on February 22, 2016, 11:14:41 am
Correct, you are at Microsoft's (and for that matter Google's) mercy as to what voice you will receive. The en-US female voice is not half bad although I preferred my old trusty en-CA one.
Same here. I suddenly started hearing a choppy male voice last week & couldn't figure out what I had done. So now it's en-US, until it changes again.
Title: Re: New TTS engine: Microsoft Translator
Post by: symonsaz on February 22, 2016, 09:02:15 pm
use to love the aussy female voice... they changed it.... its like her pitch was increased...

cant land on one i actually like :(
Title: Re: New TTS engine: Microsoft Translator
Post by: Pietor on February 24, 2016, 05:19:29 am
LOL, this morning I woke up with the weather being announced by a female instead of a male voice. Appearently MS also changed the Dutch voice, but the lady does not seem to live in The Netherlands for a long time already  ::) ... Sounds like she used to live in Australia before  ;)
Title: Re: New TTS engine: Microsoft Translator
Post by: Pietor on February 25, 2016, 03:17:10 am
Hmm... it keeps getting weirder, it now changed back to the original male voice (Dutch).
Title: Re: New TTS engine: Microsoft Translator
Post by: tomgru on February 26, 2016, 10:32:31 am
@lolodomo

I actually work for Microsoft... so tried to figure out who in my company might shed some light on this.  Someone on the team came back and asked me if we could check out the following:

Hi Thomas,
Thanks for the clarification. We didn?t change anything on our TTS endpoint. The way we can confirm the Canadian Female voice still exists is by going to bing.com/translator endpoint and choosing English (Canada) from the dropdown and hearing the female TTS voice for the translation.
What I suspect might have happened is that the plug-in you were using was calling the TTS ?Speak? API and when there was an accidental change of ordering, the default voice got changed.
Can you confirm that the Speak API is being called with the following parameters? /Speak?locale=en-CA&gender=female
Title: Re: New TTS engine: Microsoft Translator
Post by: JsChiSurf on February 26, 2016, 11:21:37 am
FWIW, I pulled open the "L_SonosTTS.lua" file and can see the following URL being called:

http://api.microsofttranslator.com/V2/Http.svc/Speak?appId=&text=%s&language=%s&format=%s&options=%s

In the above URL, I'm not seeing "locale" or "gender" being explicitly set (though "language" appears to be equivalent to "locale").

At this point, I am getting completely random voices for default English ("en"), where it switches between the previous always male voice to female mostly and sometimes male. 

I just went to the Bing site referenced and the 2 voices that speak for male and female (English US) are indeed the exact voices I hear through the Sonos, but again, they are random at this point via the plugin.

I downloaded the LUA file and manually modified the calling URL to include the "locale" and "gender" parameters, hardcoded as:

http://api.microsofttranslator.com/V2/Http.svc/Speak?locale=en&gender=male&appId=&text=%s&language=%s&format=%s&options=%s

And re-uploaded and restarted Luup, but unfortunately, for me, the end result was no different (mostly female voice, with a sprinkle or two of the male).

EDIT:

According to this link: https://msdn.microsoft.com/en-us/library/ff512420.aspx

The available parameters listed are what the plugin is using, and the "locale" and "gender" at least for this API / endpoint are not even available.  I pulled down and used their PHP example directly and of a small sample size of about 10 requests, 8 were female, 2 were male.  This is 100% independent of this plugin-in, while using my same client-id and secret.

So, this "issue" is not related (as expected since nothing has changed) to the plugin in any way, it would appear, but rather the result of a server side change within MS, as it relates to the use of this API specifically.

Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on February 26, 2016, 11:23:03 am
This AM en-US changed back to male. Haven't had a chance yet to see if en-CA changed back to female as I am at work.
Title: Re: New TTS engine: Microsoft Translator
Post by: tomgru on February 26, 2016, 04:03:02 pm
@JsChiSurf

Thanks... i'll pass along to the folks at Microsoft and see what they say!
Title: Re: New TTS engine: Microsoft Translator
Post by: DeltaNu1142 on February 26, 2016, 04:05:43 pm
I'm going to test when I get home, because I just received what might be my final Sonos component... a ZP90 to add Vera sounds & music to my intercom system.

I don't know how much of it was me versus changes in MS-TTS, but it seems like every day for the past week I've had a different voice announce my morning forecast.
Title: Re: New TTS engine: Microsoft Translator
Post by: spudjr on February 26, 2016, 04:07:01 pm
Do you still need to add the 4 files  (as in post 1) for Microsoft TTS or is this part of the install when you install the Sonos plugin.
Thanks
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on February 26, 2016, 05:22:07 pm
I swear MS is messing with with us. the en-US voice is now female again and the en-CA voice is male.
Title: Re: New TTS engine: Microsoft Translator
Post by: DeltaNu1142 on February 26, 2016, 06:36:38 pm
I swear MS is messing with with us. the en-US voice is now female again and the en-CA voice is male.
When I tested it just 30 minutes ago, en-CA was female.
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on February 26, 2016, 11:09:32 pm
I just tested again. For me, en-US is female and en-CA is male. en, en-GB and en-AU are all female
Title: New TTS engine: Microsoft Translator
Post by: DeltaNu1142 on February 27, 2016, 06:17:42 am
I just walked downstairs, and my forecast was announced in a female voice. I'll check the settings again later on.

My test yesterday was definitely en-CA... in the Sonos TTS tab.
Title: Re: New TTS engine: Microsoft Translator
Post by: DeltaNu1142 on February 27, 2016, 09:09:13 am
OK, so this is a male voice, as of 10 minutes ago:

Code: [Select]
luup.call_action("urn:micasaverde-com:serviceId:Sonos1","Say",
                 {Text="A garage door is open.",Language="en-CA",Duration=3,GroupZones="ALL",Volume=40},234)
return true

...and I tested it in Sonos, and sure enough, en-CA is male. Now I'm going to have to go change all of my PLEGs again.

If I leave out the "language" parameter above, it defaults to "en" right? It doesn't just default to whatever setting I have in the Sonos TTS tab? The latter would be so much easier...

EDIT: Actually, I just tested it, and I can just leave the "language" parameter out of all of these in my PLEG actions. That's way better.
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on February 27, 2016, 10:08:11 am
I ran my weather forecast manually this AM as I got up earlier (gotta love MiniMotes) and it was a female voice announcing 38F current temperature (BRRRRRRR!!!!!). When the scheduled one went off 30 minutes later (same settings) it was announced by a male voice.
Title: Re: New TTS engine: Microsoft Translator
Post by: JsChiSurf on February 27, 2016, 11:10:40 am
@tomgru

As a follow up to my previous post, I did a bit more digging and can see there is also available the Project Oxford Bing Voice Output API:

https://msdn.microsoft.com/en-us/library/mt679063.aspx

Whose API endpoint is:

https://speech.platform.bing.com/synthesize

I'm guessing this is a newer API and suppose the mostly supported one going forward? In your post, however, the people you spoke with did mention the "/Speak" endpoint, which this one is not, as compared to the one being used by the plugin, which while a very different URL, that is calling "/Speak".

Regardless, I used the documentation on the Oxford Project based API, where gender can indeed be specified, and built out some PHP code to test, and can, with 100% consistency, have my text converted to audio in the specific "dialect" and "gender" specified.

The key difference is calling this:

https://speech.platform.bing.com/synthesize

Versus:

http://api.microsofttranslator.com/V2/Http.svc/Speak

So, I suppose, if worse comes to worse, the plugin could potentially be updated to use the Oxford Project based API, however, it seems the limits are a bit lower.  I was able to use the same client ID, but had to signup there to obtain a new / different key / secret to get it going.



Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on February 28, 2016, 03:53:29 am
I confirm there is no gender in the API.
For French, it is stable with a change from female to male voice.
Title: Re: New TTS engine: Microsoft Translator
Post by: JsChiSurf on February 28, 2016, 11:50:58 am
@lolodomo,

Any chance of considering using / offering the use of the Project Oxford version of the MS API referenced above, so that users can choose the specific voice they prefer?
Title: Re: New TTS engine: Microsoft Translator
Post by: Mai Pensato on February 28, 2016, 02:55:31 pm
Here (Dutch) also the female voice changed suddenly in maile voice last week. But also it's much slower now..it takes more than 10 seconds before the TTS starts. I also use the Google TTS and this is much faster (immediate response) only I can use it only 2 times per day on one of my Sonos players. I hope the Microsoft TTS can be improved...
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on March 01, 2016, 03:05:36 am
I noticed a bigger delay between the end of the TTS message and the resume of previous playback. I have to check if they increase the bitrate of the MP3 file.
Title: Re: New TTS engine: Microsoft Translator
Post by: Mai Pensato on March 01, 2016, 07:22:57 am
The delay is also at the start. When I manually run a "say" message it takes more than 5 seconds before it starts. Before this was much faster with the MS TTS. Google TTS  reacts always instantly. I have made my own personsl weather announcement that runs every morning and consists of several seperate messages. With google its ready in15-20 seconds. With the recent MS this takes more than 1 minute...Really annoying so I switched this one back to Google
Title: Re: New TTS engine: Microsoft Translator
Post by: tomgru on March 01, 2016, 09:30:55 am
This was another reply from the Microsoft team.  Do you want me to ask them about the delay?

-------------------

Looking at the doc in the link below (https://msdn.microsoft.com/en-us/library/ff512420.aspx) could see why this is not clear, as it is not fully explained.

This is a sample to the API call for a female dialect for en-CA language.


http://api.microsofttranslator-int.com:80/v2/http.svc/Speak?appId=xxxx&language=en-CA&format=audio%2Fmp3&options=MinSize%7CFemale&text=Someone%20at%20the%20door.


In this case, language query parameter has the value of:
                en-CA

The options query parameter has the value of:
MinSize|Female
Title: Re: New TTS engine: Microsoft Translator
Post by: JsChiSurf on March 01, 2016, 09:40:36 am
This was another reply from the Microsoft team.  Do you want me to ask them about the delay?

-------------------

Looking at the doc in the link below (https://msdn.microsoft.com/en-us/library/ff512420.aspx) could see why this is not clear, as it is not fully explained.

This is a sample to the API call for a female dialect for en-CA language.


http://api.microsofttranslator-int.com:80/v2/http.svc/Speak?appId=xxxx&language=en-CA&format=audio%2Fmp3&options=MinSize%7CFemale&text=Someone%20at%20the%20door.


In this case, language query parameter has the value of:
                en-CA

The options query parameter has the value of:
MinSize|Female

Hot diggity dog!  That's it.  The documentation does not reference gender and they didn't state that this was an options parameter in their initial response to you!

I just took the code in the LUA file:

local returnCocde = os.execute(SAY_EXECUTE:format(file, file, token, url.escape(text), language, url.escape("audio/mp3"), "MaxQuality"))

And modified the last value (hard-coded) which is what is set for the "options" querystring parameter, and made the line:

local returnCocde = os.execute(SAY_EXECUTE:format(file, file, token, url.escape(text), language, url.escape("audio/mp3"), "MaxQuality|Male"))

And after an upload and Luup restart, I'm 10 for 10 with the Male voice (based on my settings).

While I didn't mind my morning weather announcement as a female, my nightly joke of the day, after setting the alarm, comes off so much better in a male voice :-)

Thanks for looking into this for us!

I'm guessing a quick update to the plugin could be released with a drop down for gender (assuming all languages support), in order to dynamically set, though, this may be a bit tricky, since only the Microsoft API supports gender (I'm assuming).


Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on March 01, 2016, 11:23:57 am
The solution could be to finally add a voice/gender paramter to the Say action.
For MS translator, we will use Male or Female as parameter value.
For Mary TTS, it will allow to choose the voice.
And for MS translator, a default gender will be required.
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on March 01, 2016, 03:58:22 pm
I noticed a bigger delay between the end of the TTS message and the resume of previous playback. I have to check if they increase the bitrate of the MP3 file.

My idea was good.
After checking, the MP3 file is now @128 kbps (MaxQuality).
If I switch to option "MinSize", bitrate is @32 kbps.

So I fixed the file L_SonosTTS.lua. Delay to resume is now ok.
You can get the last version from the ZIP file you can download at the bottom of this page: http://code.mios.com/trac/mios_sonos-wireless-music-systems/browser/trunk

This increased bitrate could explain why it takes more time to start playing. The file to download is bigger. We could decide to switch to option MinSize and have a smaller file and so a faster download..
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on March 01, 2016, 06:32:03 pm
I have finally added a parameter "Microsoft option". By default, the parameter is empty and the result will be a small audio file and no gender specified.
You can set in the plugin UI one of these values: "Male", "Female", "MinSize|Male", "MinSize|Female", "MaxQuality|Male", "MaxQuality|Female".

You will have to upload 4 files I have updated: I_Sonos1.xml J_Sonos1.js L_SonosTTS.lua S_Sonos1.xml
Don't forget to free your WEB browser cache as the JavaScript file is updated.
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on March 01, 2016, 07:10:48 pm
So with this update, by default smaller files will be produced. It is safer for our Vera with so small memory and by the way I don't really hear a difference in quality. The other advantage is a shorter delay to listen the text. It is noticeable especially when using a big text.
Of course if you think the quality is reduced too much, you can set the new option  to MaxQuality to restore the previous quality.
And of course with this update, duration calculation is fixed, meaning a faster resume.
And finally you can even use the new option parameter to force a male or female voice.
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on March 01, 2016, 07:18:24 pm
I will replace tomorrow in the UI the free text by a list of choices. More easy for everybody.
Title: Re: New TTS engine: Microsoft Translator
Post by: tomgru on March 01, 2016, 10:05:01 pm
awesome...thanks guys.  Glad my stomping grounds could actually help!
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on March 01, 2016, 10:21:51 pm
Thanks to everyone who helped figure this out. I'll see in the AM if the friendly Canadian lady will be telling me teh wether (As I set) or it's the burly Canuck guy doing so...
Title: Re: New TTS engine: Microsoft Translator
Post by: JsChiSurf on March 02, 2016, 11:00:01 am
awesome...thanks guys.  Glad my stomping grounds could actually help!

Thanks again for your help. Without your "insider" status, it would have been a while, if ever, to find a resolution.
Title: Re: New TTS engine: Microsoft Translator
Post by: DeltaNu1142 on March 02, 2016, 11:13:08 am
I have finally added a parameter "Microsoft option". By default, the parameter is empty and the result will be a small audio file and no gender specified. You can set in the plugin UI one of these values: "Male", "Female", "MinSize|Male", "MinSize|Female", "MaxQuality|Male", "MaxQuality|Female".
Files updated, but not tested... need to get home to do that.

Does this look right?

Title: Re: New TTS engine: Microsoft Translator
Post by: sebby on March 02, 2016, 12:49:11 pm
this worked beautifully... thank you!
Title: Re: New TTS engine: Microsoft Translator
Post by: Mai Pensato on March 02, 2016, 05:13:25 pm
I also uploaded the 4 files and did some tests. It works indeed, both male and female voice (Dutch).
At "Minsize"  the TTS works much faster but still not as fast as the Google TTS
Tomorrow morning when I hear my more extended weather report (several sentences) I know if in this way the MS is workable
(it's now 23h in Holland..)
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on March 02, 2016, 07:21:38 pm
Rather than one unique call, you can do several calls, for example one for each sentence. You even have not to care about timings, messages will be read in sequence. Doing like that, you have only small audio files to download. It is how my weather report is done and it works well.
Title: Re: New TTS engine: Microsoft Translator
Post by: tomgru on March 03, 2016, 09:36:57 am
awesome...thanks guys.  Glad my stomping grounds could actually help!

Thanks again for your help. Without your "insider" status, it would have been a while, if ever, to find a resolution.

You bet! My pleasure!
Title: Re: New TTS engine: Microsoft Translator
Post by: markoe on March 03, 2016, 12:18:43 pm
I have finally added a parameter "Microsoft option". By default, the parameter is empty and the result will be a small audio file and no gender specified.
You can set in the plugin UI one of these values: "Male", "Female", "MinSize|Male", "MinSize|Female", "MaxQuality|Male", "MaxQuality|Female".

You will have to upload 4 files I have updated: I_Sonos1.xml J_Sonos1.js L_SonosTTS.lua S_Sonos1.xml
Don't forget to free your WEB browser cache as the JavaScript file is updated.

I did try to update also, but failed . Result was total silence from MS TTS  if I try via the test bottom from the device or via running the scene. I can see the Microsoft option parameter on the sonos device TTS parameters so atleast part of the fix has entered the system. I did restore vera settings from the backup and vera works now as earlier.

It must have been me doing someting wrong during file load, possible the .js file. I will give this a second try during weekend. Thanks anyway.

update 5.3.2016 It works now after I did get the files from zip-file
Title: Re: New TTS engine: Microsoft Translator
Post by: Mai Pensato on March 03, 2016, 01:48:08 pm
Rather than one unique call, you can do several calls, for example one for each sentence. You even have not to care about timings, messages will be read in sequence. Doing like that, you have only small audio files to download. It is how my weather report is done and it works well.
My code is built up as several seperate calls; every sentence is one "luup.call_action..."

This morning it went well with the MS TTS. All the sentences came fluently. The only thing I already noticed before:  MS does not recognize digits:  2.5 degrees is spoken as "two five"  whereas Google TTS  "two point five"
Title: Re: New TTS engine: Microsoft Translator
Post by: spudjr on March 04, 2016, 06:57:34 pm
Will this latest change be going to the app store or do we need to upload the four files. Thanks
Title: Re: New TTS engine: Microsoft Translator
Post by: michelhamelin on March 08, 2016, 10:35:51 pm
I don t know why but,  i get this error:

Error executing function Sonos_showTTS():
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on March 09, 2016, 09:30:48 am
After you downloaded the ZIP file and extracted it, did you upload all 4 files with date 3/1/2016 to Vera and restarted LUUP?
Title: Re: New TTS engine: Microsoft Translator
Post by: michelhamelin on March 09, 2016, 12:00:58 pm
ok Thanks now it work, i was trying to downlod files one by one instead zip achive.
Title: Re: New TTS engine: Microsoft Translator
Post by: symonsaz on March 09, 2016, 09:16:30 pm
THANK YOU GUYS... worked like a charm! ;D
Title: Re: New TTS engine: Microsoft Translator
Post by: Kryckmeister on April 01, 2016, 09:21:34 am
I just can't get it (Microsoft) to work consistently. Yesterday I tried it out, both english and swedish worked in all my units but today, nothing. I've checked client ID and Client secret and they are identical. I'm all out of ideas.
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on April 02, 2016, 03:50:50 am
I just can't get it (Microsoft) to work consistently. Yesterday I tried it out, both english and swedish worked in all my units but today, nothing. I've checked client ID and Client secret and they are identical. I'm all out of ideas.

Did you subscribe to the free 2 million characters ?
Title: Re: New TTS engine: Microsoft Translator
Post by: Kryckmeister on April 02, 2016, 07:44:56 am
Yes. I've use 195.
Title: Re: New TTS engine: Microsoft Translator
Post by: Kryckmeister on April 02, 2016, 12:41:15 pm
I updated the Sonos app in the Vera, and then I could hear what I typed within the app. Then I tried to run a scene which didn't work. And after that, back to square one, silent.
Title: Re: New TTS engine: Microsoft Translator
Post by: Borat on April 25, 2016, 05:19:18 am
Hi

Is anyone using this from UK? I try to register and get this message in the portal:

Not available in your market

Cheers
Title: Re: New TTS engine: Microsoft Translator
Post by: MNB on May 16, 2016, 01:31:31 pm
@Loldomo,
Per chance do we still have to manually load the files (per your earlier thread), or is this now in the latest version of the SONOS plugin? Mike

Quote
I have finally added a parameter "Microsoft option". By default, the parameter is empty and the result will be a small audio file and no gender specified.
You can set in the plugin UI one of these values: "Male", "Female", "MinSize|Male", "MinSize|Female", "MaxQuality|Male", "MaxQuality|Female".

You will have to upload 4 files I have updated: I_Sonos1.xml J_Sonos1.js L_SonosTTS.lua S_Sonos1.xml
Don't forget to free your WEB browser cache as the JavaScript file is updated.
Title: Re: New TTS engine: Microsoft Translator
Post by: djonepl on June 10, 2016, 10:21:03 am
@Loldomo,
Per chance do we still have to manually load the files (per your earlier thread), or is this now in the latest version of the SONOS plugin? Mike

Quote
I have finally added a parameter "Microsoft option". By default, the parameter is empty and the result will be a small audio file and no gender specified.
You can set in the plugin UI one of these values: "Male", "Female", "MinSize|Male", "MinSize|Female", "MaxQuality|Male", "MaxQuality|Female".

You will have to upload 4 files I have updated: I_Sonos1.xml J_Sonos1.js L_SonosTTS.lua S_Sonos1.xml
Don't forget to free your WEB browser cache as the JavaScript file is updated.
MNB,

Its been a while im sure you have it fixed :-D

I got my unit yesterday and had to update the files because of the delay, after i updated the files everything works perfectly.


Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on September 24, 2016, 03:59:50 am
Side few days, I got ? new female French voice. Unfortunately the voice quality looks worse to me.
Did you notice a change ?
Title: Re: New TTS engine: Microsoft Translator
Post by: tomgru on September 24, 2016, 12:50:37 pm
Side few days, I got ? new female French voice. Unfortunately the voice quality looks worse to me.
Did you notice a change ?

same here.. haven't looked into it yet.
Title: Re: New TTS engine: Microsoft Translator
Post by: michelhamelin on September 24, 2016, 05:01:19 pm
Same for me, i use french canadian and now sometime really look like a computer :-[
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on September 24, 2016, 07:23:29 pm
The en-US female voice has changed as well. To me for the better as it now has a 'perkyness' to it, a bit less computery.
Title: Re: New TTS engine: Microsoft Translator
Post by: DeltaNu1142 on September 25, 2016, 04:06:51 pm
Agreed.

The en-CA female voice changed as well. I don't like the new one, so I switched to en-US. Better even than the old en-CA.
Title: Re: New TTS engine: Microsoft Translator
Post by: rafale77 on October 01, 2016, 01:47:27 pm
Same here. All the ones I tested have all become female. It seems only the EN-US has improved. All the others have degraded.
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on October 01, 2016, 08:41:33 pm
Are you running the latest version of the plugin? As Lolodomo added a 'Microsoft Option' field where you can specify Male or female for the voice gender to use. Has that option been removed by MS?
Title: Re: New TTS engine: Microsoft Translator
Post by: rafale77 on October 02, 2016, 09:41:07 am
Running 1.4 and have never seen such an option.
Title: Re: New TTS engine: Microsoft Translator
Post by: DeltaNu1142 on October 02, 2016, 09:58:50 am
Are you running the latest version of the plugin? As Lolodomo added a 'Microsoft Option' field where you can specify Male or female for the voice gender to use. Has that option been removed by MS?
To my knowledge... no. I've been running 1.4 for many months (a year?) now. I have the Microsoft option field populated with "MinSize|Female" and the voice has consistently stayed female, even if the voice itself has been altered.
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on October 02, 2016, 10:45:59 am
Running 1.4 and have never seen such an option.

As per LoloDomo's post on page 9 of this thread:
http://forum.micasaverde.com/index.php/topic,33223.120.html

Find the updated files to activate this option here:
http://code.mios.com/trac/mios_sonos-wireless-music-systems/browser/trunk
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on October 25, 2016, 09:22:12 pm
I just received an email from MS. Seems the Translator is moving from data market to Azure. I've not been able to figure out if we'll now have to pay for an Azure subscription or the free level stays available. It looks like the API is changing so I fear Lolodomo will have to rework the interface to keep it working.

Original email:

 Microsoft Translator Text and Speech Translation APIs are now available in the Azure portal under the Cognitive Services category. Existing applications using Microsoft Translator need to be changed before April 30, 2017.
           
        To change your applications, follow these steps:

1)    Subscribe to Microsoft Translator on the Azure portal.
2)    Modify your application?s code to use the new Azure authentication logic. The change is simple and required. For more information, please visit the Microsoft Translator is moving to Azure webpage.
3)    Cancel your existing subscription on Microsoft DataMarket.

The Azure portal brings a better user experience, including the introduction of a new Pay-As-You-Go offer; price discounts for higher monthly volume commitments, allowing for overages at any level; and a significantly improved billing and usage dashboard.

Additional benefits include:

?    Subscriptions to the Microsoft Translator API will continue to be free of charge for up to two million characters per month for Text Translation and up to two hours per month for Speech Translation.
?    New portal users can sign up for a free 30-day Azure account, which includes a $200 USD credit, or equivalent in your currency, to spend towards any Azure service.
?    If you are a current Azure customer, you can include a subscription to the Microsoft Translator API as part of your overall Azure purchase.

Here?s additional information you should know:

?    You can immediately subscribe to the Microsoft Translator API in the Azure portal.
?    Beginning January 1, 2017, your access to your Microsoft Translator service in your current DataMarket subscription will be limited, and you will not be able to upgrade or downgrade your subscription plan.
?    You may concurrently create a new Azure account and subscribe to the Translator API in the portal. If you haven?t already used a free 30-day Azure account subscription, you can use your free trial credits for testing and configuring the Microsoft Translator API during the migration.
?    Remaining Microsoft Translator API subscriptions on DataMarket will be retired on April 30, 2017.

For more information about the availability of the Microsoft Translator API on the Azure portal, please visit our Microsoft Translator Blog. For questions, support, migration information, and additional updates, please visit the Microsoft Translator User Forum.

Thank you for your continued use of the Microsoft Translator service.


Thank you,

Your Azure Team

MS translator is moving page: https://translatorbusiness.uservoice.com/knowledgebase/articles/1078534-microsoft-translator-on-azure?WT.mc_id=azurebg_email_Trans_1228_Microsoft_Translator_Azure_Portal



Luckily I have MaryTTS installed and configured locally so I have a backup TTS solution.
Title: Re: New TTS engine: Microsoft Translator
Post by: mvader on October 25, 2016, 10:21:55 pm
I got the same thing this evening.. looks like we have some time to make the switch.. i don't think it will be to bad.
Title: Re: New TTS engine: Microsoft Translator
Post by: symonsaz on November 01, 2016, 09:02:45 pm
has anyone made the switch yet?

is it free or paid service?

we should start asking lolodomo to see if he can make time to for us novice users to get the fix in place... 
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on November 01, 2016, 09:29:20 pm
It makes no sense to make the switch at this time as I doubt the plugin has been updated to work on the Azure cloud yet. So if you update the MS side and it deletes your old settings, the plugin will most likely break and Vera will be left speechless
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on November 11, 2016, 02:15:57 am
I read that new Azure account subscription requires to provide a phone number and a credit card number !
No way for me !
I took a quick look to the new API  and I have the feeling everything is different. So I would recommend to implement a new TTS engine in the plugin. I will not do it myself, I am sorry.
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on November 11, 2016, 09:13:04 am
@lolodomo: I wholly understand your standpoint and support it. Thank your for all your excellent work on the plugin. I'll switch to MaryTTS as I have that setup as a backup already.
Title: Re: New TTS engine: Microsoft Translator
Post by: fyford on November 14, 2016, 04:48:52 am
Could this be an alternative? http://www.voicerss.org/tts/
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on November 14, 2016, 09:32:29 am
Hmm, the voices are a bit robotic but not half bad. the API key seems to be free for developers so that is a plus.
It will be up to Lolodomo to decide wether or not it's worth the effort.

If you have something running 24/7, you may want to look into  MaryTTS (http://mary.dfki.de/) which is already supported. As it's Java based it'll run on most platforms. I set it up on my WHS2011 server that already runs Blue Iris
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on November 17, 2016, 10:06:03 pm
Judging from below email I just received we can pretty much be sure that on March 31st 2017, the MS TTS support will be be gone. Leaving the plugin with Google and MaryTTS support...



Thank you for using Azure DataMarket. On March 31, 2017, we?ll retire DataMarket and all its services.
           
        We?re retiring DataMarket because we?re not seeing the sustained customer interest in DataMarket to enable us to continue with this marketplace.

What does this mean for you?
On March 31, 2017, we?ll cancel all orders placed through DataMarket. To determine what subscription(s) you may have, please sign in to DataMarket, click My Account, and then click My Data or My Applications.

?    If you subscribed to a free service, access will end at the end of March 2017.
?    If you purchased a Finished SaaS app, access will end at the end of March 2017, and you will be refunded for any unused days of your final bill.
?    If you subscribed to a paid data service, access will end on the last day of your billing cycle that began in March 2017 (for example, if you were billed on March 25, 2017, your service access would end on April 25, 2017). After this date, our portal will be retired and the service will no longer be available.

If you want to continue with a comparable service, we recommend that you reach out to your specific data provider to explore suitable alternatives.

If you have questions, please contact us.


Thank you,

Your Azure Team
Title: Re: New TTS engine: Microsoft Translator
Post by: JS007 on November 18, 2016, 11:20:02 am
sadly this is one of the bad things about cloud services.. they can go away at any time

.
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on November 18, 2016, 12:48:50 pm
Exactly the reason I try to keep as much local as possible. I have MaryTTS locally and up and running so switching for me is not a major issue. But for others this may be a big issue. Especially as the Google TTS seems to function less than optimal.

I wonder if MaryTTS runs on a Raspberry Pi. If so for less than about $50 you'd have your own TTS system locally
Title: Re: New TTS engine: Microsoft Translator
Post by: korttoma on November 18, 2016, 02:26:58 pm
I wonder if MaryTTS runs on Synology?
Title: Re: New TTS engine: Microsoft Translator
Post by: mvader on November 18, 2016, 07:52:13 pm
I have / had MaryTTS running on an Ubuntu Vm and it works okay. sometimes the voices are slow and mostly robotic.
but it works. my path is vera -> mary running on VM -> rpi 2s and 3's
i switched to the Microsoft one and have been much happier. hope we figure out another solution by then.
Title: Re: New TTS engine: Microsoft Translator
Post by: lolodomo on November 19, 2016, 09:02:25 am
VoiceRSS is a very good alternative to Microsoft Translator. I am now using it through openHAB.
Adding the VoiceRSS engine to the plugin should be easy if done by someone with a minimum knowledge of the Sonos plugin.
On my side, I stopped using this plugin few days ago.
Title: Re: New TTS engine: Microsoft Translator
Post by: Spanners on December 05, 2016, 12:34:06 am
Anyone got a link to a simple writeup on installing Mary on a Raspberry Pi?

Title: Re: New TTS engine: Microsoft Translator
Post by: Pseudomizer on December 05, 2016, 12:45:46 am
Anyone got a link to a simple writeup on installing Mary on a Raspberry Pi?

I would suggest to try this below given that Microsoft is going away by end of March 2017.

http://homeautomation.expert/amazon-to-the-rescue-with-tts

Title: Re: New TTS engine: Microsoft Translator
Post by: Spanners on December 05, 2016, 01:16:01 am
Anyone got a link to a simple writeup on installing Mary on a Raspberry Pi?

I would suggest to try this below given that Microsoft is going away by end of March 2017.

http://homeautomation.expert/amazon-to-the-rescue-with-tts

It would be nice to think that we can tap into this via Alexa integration and Vera. Examples sound great.

However, unless lolodomo (or another lua guru) is going to update the plugin, us mere mortals are going to have to choose one of the remaining supported options. :(

Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on December 05, 2016, 10:00:25 am
From what I read is that after the 1st free year with 5M per month, you have to pay $4 a month for 1M characters.
The sound quality is great but I'm not sure if I want to plonk down another $50 a year just for TTS. I'll stick with the lesser quality MaryTTS running locally.

Yes, Lolodomo would be the one to update the plugin and add support for Polly to be able for us to use her.
Title: Re: New TTS engine: Microsoft Translator
Post by: symonsaz on December 18, 2016, 11:29:43 am
Trying to get ahead of fixing this given we will be off during the holidays and if Mircosoft option will be gone by March, are we saying that only the Mary TTS will be the sole option?

If yes, maybe someone can share how to get Mary TTS up and running... i have a dedicated Microsoft comp... but not sure how to get all the files onto it and how to set it up in the Sonos plugin.

Any docs or a link on how to would be huge...

thanks
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on December 18, 2016, 04:25:57 pm
It's pretty easy. The only drawback is you have to have Java installed. (seems Oracle starting to want $$$ for parts of Java now)

Youtube : https://www.youtube.com/watch?v=eCqtct6HbA8


In each Sonos device under TTS

MaryTTS server URL: http://IP.OF.WINDOWS.BOX:59125

and set 'Default Engine' to Mary
Title: Re: New TTS engine: Microsoft Translator
Post by: symonsaz on December 19, 2016, 08:54:42 pm
thanks for posting the you tube link... tip for anyone downloading marytts... DONT download the web installer package...
Download the "Runtime package" 
then just follow the youtube post! 

thanks again!
Title: Re: New TTS engine: Microsoft Translator
Post by: Cor on December 20, 2016, 05:36:48 am
@ BOFH; yes thanks for posting!
Title: Re: New TTS engine: Microsoft Translator
Post by: wezley69 on December 20, 2016, 03:48:58 pm
After following the instructions in the youtube video, launching server.bat and then the client I get "cannot connect to either a HTTP nor a Socket MARY server at default location.  What have I missed?

Edit: Got past initial error but can't get the sonos plugin to uses mary.  See attached server settings and sonostts settings.  Maybe you can see what I missed.  Please and thank you.

Title: Re: New TTS engine: Microsoft Translator
Post by: patmanwb on December 23, 2016, 06:35:55 pm
Has anyone looked into Azure TTS or Bing Translator API? Seems like that one is sticking around for a while and it's got a free tier.
Title: Re: New TTS engine: Microsoft Translator
Post by: wezley69 on December 29, 2016, 05:24:00 pm
Thanks for the assistance forum.  :(
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on December 29, 2016, 09:05:12 pm
If I don't have an answer, I generally don't respond. You provided precious little information to go on so it can be anything from a blocked port on your server firewall to a bug in the TTS setup on Vera.

have you tried the MaryTTS URL in a browser on an another computer than the one you are running it on? If so, does it work there? if yes, it's on Vera's side, if no it's probably on your server side. from the screenshots it looks like an MS OS but no idea which one.
Title: Re: New TTS engine: Microsoft Translator
Post by: wezley69 on December 30, 2016, 12:33:27 pm
It appears to be the Vera setup.  Using the URL from other machines works fine.

Anything you see on the Vera side setup?

Added TTS Server Log.
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on December 30, 2016, 01:28:52 pm
Nothing other than to change en to en-GB for the language. I all depends on which voices you installed with Mary.
Title: Re: New TTS engine: Microsoft Translator
Post by: rafale77 on January 02, 2017, 05:04:09 am
Has anyone looked into Azure TTS or Bing Translator API? Seems like that one is sticking around for a while and it's got a free tier.

I found a workaround for TTS not using the Vera plugin which makes use of Voice RSS or Bing which both remain free for the lower tier.
It requires running the sonos http API on github: https://github.com/jishi/node-sonos-http-api
After it is setup I am able to call TTS with codes like this

Code: [Select]
local http = require("socket.http")
local door = "front"
local url = string.format("http://APIserver.address:5005/sayall/Warning %s door is open, alarm will sound in 1 minute", door)
result, status = http.request(url)

I tried MaryTTS but it is really too robotic for me. Hard to go back. Not as convenient as the plugin but hey, it works.
Title: Re: New TTS engine: Microsoft Translator
Post by: Spanners on January 02, 2017, 09:37:35 pm
Don't suppose anyone can whip up some code to use this? :)

https://developer.amazon.com/public/solutions/alexa/alexa-voice-service/reference/speechsynthesizer
Title: Re: New TTS engine: Microsoft Translator
Post by: johanto on January 24, 2017, 07:23:16 am
Hi everyone! i just e-mailed with:

http://responsivevoice.org/

"Hi Johan,
ResponsiveVoice does work with a variety of operating systems, but we can't offer a final answer about integrating with Vera and Sonos as we have no direct experience in the matter. You can test directly by using the free version of the API (for non-commercial, not-for-profit projects, available at http://responsivevoice.org/ ), or by starting a trial of the Developer API, which is free for 30 days (http://responsivevoice.com/api-trial-application).

It will be great if you can reach out to an app developer who is willing to take on this project, since we are only able to provide the Text-to-speech solution. Hope this helps!

Kind regards,
Suzanne
ResponsiveVoice Support"

SOOOO... reaching out to the app developer who is willing? =) or is there a way to make this work without developer skills?
Title: Re: New TTS engine: Microsoft Translator
Post by: cybrmage on January 24, 2017, 06:10:23 pm

SOOOO... reaching out to the app developer who is willing? =) or is there a way to make this work without developer skills?

Actually... quite trivial...

Update with the attached files to enable ResponsiveVoice TTS...

Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on January 24, 2017, 07:22:50 pm
You rock! tried the free API and it's a bit less robotic then MaryTTS. Downloaded your fixes and moving them to my test Vera now. Support is checking on my production one as a ZCOMBO is acting wierdly.

Update: works pretty good. Use the dropdown for TTS Engine and responsevoice is listed. I'm quite happy it defaults to the female US voice.

Thanks Cybrmage!
Title: Re: New TTS engine: Microsoft Translator
Post by: korttoma on January 26, 2017, 05:48:21 am
Maybe this ResponsiveVoice TTS solution deserves a thread of its own? Maybe even a sticky thread? So more people may find it.
Title: Re: New TTS engine: Microsoft Translator
Post by: mvader on January 26, 2017, 10:12:27 am
will this work with the DLNA plugin?
Title: Re: New TTS engine: Microsoft Translator
Post by: markoe on January 26, 2017, 02:13:57 pm

Actually... quite trivial...

Update with the attached files to enable ResponsiveVoice TTS...

Awasome ... This might be the solution for me also, need to test this during weekend. Are you able to switch the language as on the demo web page?
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on January 26, 2017, 09:43:12 pm
Only within the constraints of the current sonos plugin. So not all the languages and male/female options seem to be supported. en-US defaults to the female voice so I am happy. I still have the MS TTS as default until it drops.
Title: Re: New TTS engine: Microsoft Translator
Post by: fyford on January 27, 2017, 06:41:44 am
Hi guys,

real newby question, but where / how  do I install the files you attached?

Many thanks
Title: Re: New TTS engine: Microsoft Translator
Post by: wezley69 on January 27, 2017, 01:05:28 pm
Wow!  So easy and some much better TTS!
Title: Re: New TTS engine: Microsoft Translator
Post by: don key on January 27, 2017, 06:25:14 pm
First off thanks so much to cybrmage for adding this. It seems to work for me every time when testing directly in the sonos plugin. However if i try to create a scene with the sonos "Say" command from the Advanced Editor page and save. Ill run the scene but nothing is played. Any ideas on what i could be doing wrong here or an easier approach than the Advanced Editor section of the scene creation? Thanks in advance guys!
Title: Re: New TTS engine: Microsoft Translator
Post by: korttoma on January 28, 2017, 03:30:13 pm
Tested the responsivevoice implementation today and it works nicely with Swedish but the rate of the speech is way to fast. Is there any way to change this?
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on January 28, 2017, 03:39:38 pm
@don key: I just use a one liner LUUP code for it instead .

Code: [Select]
luup.call_action("urn:micasaverde-com:serviceId:Sonos1", "Say",{Text="Text you want spoken ", Language="en-US", GroupZones="ALL", Volume=75, SameVolumeForAll="true"}, DEVICE_ID)
Replace DEVICE_ID with the device ID of your main Sonos speaker.
I've set GroupZoes to ALL so it goes to all speakers but that's up to you.
Volume is a value between 0 and 100. I set all speakers to be the same volume.
Make sure to set Language to the one you want to use.
 
Title: Re: New TTS engine: Microsoft Translator
Post by: cybrmage on January 28, 2017, 04:31:26 pm
it works nicely with Swedish but the rate of the speech is way to fast. Is there any way to change this?

There is... BUT the Sonos TTS implementation does not have a "rate" option... It could be added, but is not trivial...

As a workaround....

1) upload the attached file to your vera with the reload Luup engine option selected. Allow your Vera to finish reloading.
2) find your Sonos device and go to the setup page
3) select "advanced"
4) select "new service"
5) enter:
   new service:  urn:micasaverde-com:serviceId:Sonos1
   new variable: TTS_RV_rate
   new value:  (enter a rate value from 0 to 1 - 0.5 is the default value, 0 is extremely slow, 1 is extremely fast)
6) click on "Add"
7) refresh your browser (F5 or CTRL-F5)

Once you have created the variable, you can update it's value from the advanced/variables page.


Title: Re: New TTS engine: Microsoft Translator
Post by: korttoma on January 29, 2017, 02:00:38 am
thanks a million @cybrmage. works like a charm!
Title: Re: New TTS engine: Microsoft Translator
Post by: markoe on January 29, 2017, 04:19:46 am

There is... BUT the Sonos TTS implementation does not have a "rate" option... It could be added, but is not trivial...

As a workaround....

1) upload the attached file to your vera with the reload Luup engine option selected. Allow your Vera to finish reloading.
2) find your Sonos device and go to the setup page
3) select "advanced"
4) select "new service"
5) enter:
   new service:  urn:micasaverde-com:serviceId:Sonos1
   new variable: TTS_RV_rate
   new value:  (enter a rate value from 0 to 1 - 0.5 is the default value, 0 is extremely slow, 1 is extremely fast)
6) click on "Add"
7) refresh your browser (F5 or CTRL-F5)

Once you have created the variable, you can update it's value from the advanced/variables page.

This works beautifully and the processing time in cloud is very fast. :D The "rate" 0.4 did work for me . Thank you all very much!
Title: Re: New TTS engine: Microsoft Translator
Post by: Spanners on January 29, 2017, 06:38:06 pm
I'd like to thank cybrmage for breathing new life into the TTS component of this plugin.

It works beautifully (haven't tried playing with different voices, but the default will do me just fine).

Title: Re: New TTS engine: Microsoft Translator
Post by: wezley69 on February 03, 2017, 06:36:21 pm
I am not seeing any difference in speed of voice when changing the variable.  What may I have done wrong?
Title: Re: New TTS engine: Microsoft Translator
Post by: wezley69 on February 05, 2017, 06:03:53 pm
And the "Sound of Silence"  people dying everywhere.  TTS in disrepair.
Title: Re: New TTS engine: Microsoft Translator
Post by: korttoma on February 06, 2017, 02:08:42 am
I see from the .pdf that you have set the TTS_RV_rate to 0. did you try any other value? I use 0.4 since 0.3 was too slow.
And then restart the luup engine when you have changed the value.
Title: Re: New TTS engine: Microsoft Translator
Post by: reneboer on February 06, 2017, 05:35:04 am
Hi,

I have made some updates, mainly to get it working on openLuup, but it works on Vera too. You do have to make a little change in the L_SonosTTS.lua file as specified in this post.
http://forum.micasaverde.com/index.php/topic,37068.msg313320.html#msg313320 (http://forum.micasaverde.com/index.php/topic,37068.msg313320.html#msg313320)

Cheers Rene
Title: Re: New TTS engine: Microsoft Translator
Post by: Spanners on February 07, 2017, 04:19:52 am
Hi,

I have made some updates, mainly to get it working on openLuup, but it works on Vera too. You do have to make a little change in the L_SonosTTS.lua file as specified in this post.
http://forum.micasaverde.com/index.php/topic,37068.msg313320.html#msg313320 (http://forum.micasaverde.com/index.php/topic,37068.msg313320.html#msg313320)

Cheers Rene

Hi Renebooer,

I've loaded your files up on to Vera - Sonos control works great but TTS isn't working (either responsivevoice or MS). I've edited the L_SonosTTS.lua file and changed the variable as specified.

EDIT: Never mind, has started working now. Thanks Renebooer.

Question though, on longer messages there's a pause/discontinuity in the speech - it this because it's being chunked into smaller/multiple requests? (eg; Say The Weather plugin).




Title: Re: New TTS engine: Microsoft Translator
Post by: reneboer on February 07, 2017, 05:48:59 pm
Hi Spanners,

I just got a Sonos last week so I have not had it do long sentences, and I only tried ResponsiveVoice as I could not get Google or Microsoft to work either. It is something for the next weekend. I did move it to my Pi with openLuup as my VeraEdge seems to be struggeling as it is already. On there the speeds seems to vary indeed, maybe also depending how much traffic ResponsiveVoice has to handle at that moment. Not sure how stable it it yet.

PS: no need to register with ResponsiveVoice, it just generates a lot of spam  :o

Cheers Rene
Title: Re: New TTS engine: Microsoft Translator
Post by: JohnGiddings on February 11, 2017, 04:26:55 pm
I'd also like to thank cybrmage for the great job you have done integrating Responsive Voice into the Sonos TTS.

It's working well, however I like others have found that long sentences are broken up and it looks like punctuation such as Full Stops and Comma's are being ignored.

I tried entering a sentence in to the test page on http://responsivevoice.org/ and the punctuation was observed. Is it possible that full stops and comma's are being stripped out of the string? Is there an escape character I should be using instead?

Thanks

John
Title: Re: New TTS engine: Microsoft Translator
Post by: lakewoodjazz on March 13, 2017, 06:59:30 am
Hello Cybrmage
With March 31 approaching soon i will need to install your attached files to enable Resposivevoice TTS. Do I need to install the api from Rvoice also of do your download files contain the complete fix? Also where do I put the files in my Vera edge ui7?
I love my talking house and really appreciate your help! 
Cheers
Wilbur
Ps
I agree with another post that a separate Resposivevoice  stIcky should be created.



SOOOO, ... reaching out to the app developer who is willing? =) or is there a way to make this work without developer skills?
[/quote]

Actually... quite trivial...

Update with the attached files to enable ResponsiveVoice TTS...
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on March 13, 2017, 10:07:20 am
No need to install anything but the updated Sonos plugin files that Cybrmage created.

Go to Apps -> Develop Apps -> LUUP files
Use the UPLOAD button to locate and select Cybrmage's uploaded files on your PC.
Make sure you have checked 'Restart lUUP after upload'

Once LUUP has reloaded, go to your SONOS device(s) and under the TTS settings click on the 'Default Engine' selection box. You'll see ResponsiveVoice listed there. Set it as your default engine and you are done.

To test, set the Engine checkbox to responsivevoice as well, type a sentence in the text box above it and click the SAY button.
Title: Re: New TTS engine: Microsoft Translator
Post by: wreston on March 15, 2017, 09:02:08 am
Many thanks to @cybrmage for keeping the Sonos plugin TTS alive!!!

Quick question...  Is there an easy way to select the US English Male voice vs. the default US English Female? 

Our home automation system has always spoken with a male voice and we call it "Bob."  Since switching from Microsoft TTS, "Bob" now speaks with the wrong gender.

Thanks...
Title: Re: New TTS engine: Microsoft Translator
Post by: MNB on March 18, 2017, 06:45:43 pm
I too would like to thanx @cybrmage for job well done in getting Resposivevoice TTS to work. I originally loaded and got MARYTTS to work but like some else made mention the voice(s) sound to much "robotic" and this options works like a charm until it too goes the way of Google/Microsoft I guess I'm positioned to becoming more robotic ::) if and when that should happen...
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on March 18, 2017, 08:46:01 pm
Actually, as posted in another thread, MRSlother has a solution using the built-in MS Windows TTS. But it requires TTS, IIS and .net 4.52 installed. If that runs on Windows 10, you might be able to use Cortana as the voice.
Title: Re: New TTS engine: Microsoft Translator
Post by: MNB on March 19, 2017, 10:36:05 am
@BOFH, pray tell as I've just installed MARY TTS could point us to the thread link (I know I'm lazy) and does anyone have any observations pro/con? Mike
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on March 19, 2017, 10:54:52 am
It's one of the Sonon plugin TTS threads. I've got to run into work so I hav eno time to search. But find mrslother's profile and it will show his posts.
Title: Re: New TTS engine: Microsoft Translator
Post by: rchamp26 on March 20, 2017, 11:52:33 am
so i just got microsoft translator set up today. works wonderfully. however, the microsoft datamarket says it will be decommissioning the portal on the 31st of this month.

I'm assuming this will affect this plugin.

any plans to change the microsoft api to connect directly the microsoft translator services in azure?
Title: Re: New TTS engine: Microsoft Translator
Post by: mrslother on March 20, 2017, 01:37:50 pm
Actually, as posted in another thread, MRSlother has a solution using the built-in MS Windows TTS. But it requires TTS, IIS and .net 4.52 installed. If that runs on Windows 10, you might be able to use Cortana as the voice.

There are several people testing this out already. It is self contained and relies on no outside "cloud" services. So you don't have counterparty risks (API changes, services changing, etc) and you don't get any spam. :)

It requires that you have a Windows box available on your network running IIS.

PM me if you are interested.
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on March 20, 2017, 04:14:51 pm
any plans to change the microsoft api to connect directly the microsoft translator services in azure?

As it appears Azure wants CC and a boatload of other info from the developer and the API has completely changed, lolodomo has expressed no interest in upgrading the plugin for Azure. I can't say I blame Lolodomo for that.

There are however multiple working alternatives:

1. use ResponsiveVoice.org (another cloud service) Check the thread and you'll see a modified version of the plugin by Cybrmage that has support for ResponsiveVoice added. (http://forum.micasaverde.com/index.php/topic,33223.msg312329.html#msg312329)
2. use MaryTTS. It's free, local and as it's written in Java so it'll run on most platforms including Raspberry Pi. The drawback is that the voice is a mite robotic. (http://forum.micasaverde.com/index.php/topic,33222.msg262039.html#msg262039)
3. Use MrSlothers solution. It requires a local Windows box to be on 24/7 but it works well (I can confirm it runs on WHS2011). The 24/7 box requirement is no big deal for me as I run Blue Iris and a media server on that  WHS2011 box already.
4. If you have a Apple Mac {cough, choke, sputter} computer the plugin supports it's internal TTS as well. Of course it'll have to be on 24/7.
Title: ResponsiveVoice.org TTS
Post by: markoe on March 25, 2017, 10:32:54 am
Hi I did just notice that messages that contain national characters like ?, ? ,? fails with sonos plugin tts + responsiveVoice.
Title: Re: New TTS engine: Microsoft Translator
Post by: sebby on March 26, 2017, 10:30:23 am
Anyone figure out how to make reponsiveVoice stop doing the awkward pauses?  my wife kids that the house now sounds like a female William Shatner impersonator...
Title: Re: New TTS engine: Microsoft Translator
Post by: johanto on March 28, 2017, 10:55:19 am
I'm glad i could help to find a new engine and it seemed to work Great! - However after using it a couple of days my sonos app told me "can't play Say.5.mp3 - song is not coded correctly" (translated from swedish).
now, none of my scenes with sonos is working. but the tts-engine in the device seem to work. what could be the problem??
-----> just found the problem.. my ? ? ? in the swedish alphabet is not working
strange since it is working in the tts at sonos device
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on April 07, 2017, 11:07:30 pm
Anybody else noticing the current MS TTS still seems to be working? I have my setup ready to switch but teh MS lass is still yakking at me... :-)
Title: Re: New TTS engine: Microsoft Translator
Post by: aard01 on May 13, 2017, 02:26:33 am
Nope. Microsoft TTS stopped working for me as well since a couple of days. Any alternatives?
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on May 13, 2017, 07:47:35 am
See my post (#227) about 5 ones up from yours.  8)
Title: Re: New TTS engine: Microsoft Translator
Post by: cw-kid on May 23, 2017, 05:31:09 pm

SOOOO... reaching out to the app developer who is willing? =) or is there a way to make this work without developer skills?

Actually... quite trivial...

Update with the attached files to enable ResponsiveVoice TTS...

Hi

Could support for ResponsiveVoice TTS also be added to the DLNA plugin (http://forum.micasaverde.com/index.php?topic=33817.0) as I don't have any Sonos. But have been using the Vera DLNA plugin instead. I was using the Microsoft TTS engine but it no longer works now.

I've attached the two files that would need modifying I believe these are the correct ones?

Cheers.
Title: Re: New TTS engine: Microsoft Translator
Post by: cw-kid on May 23, 2017, 06:57:00 pm
Hi

I've had a go at editing the files myself see attached modified files.

I can now in the advanced editor of a scene select the DLNA plug-in device and use the SAY option.

See the RV-in-Scene.png screen shot.

In the fields I entered the following:

Text: there is someone at the door
Language: (Left if empty)
Engine: RV
Volume: 100

Now when I run my Doorbell scene the TTS announcement is sent to my DLNA device in this case a Kodi HTPC.

HOWEVER---

If instead I go in to Devices in Vera and select the DLNA device instance and then go to the TTS area

In here on either the "Engines" or "Default Engines" drop down boxes ResponsiveTTS / RV is not listed for selection. See attached screen shot DLNA-TTS-Engines.png

For those using the Sonos plug-in do you see RV in these drop box boxes under the Sonos device in the TTS area ?

Thanks

EDIT: Also the rate / speed seems a little too fast possibly, so need to look at that as well and it seems to be cutting off quite a bit of the start as its saying "one at the door" instead of "there is someone at the door"

If I pad out the text and instead enter "aaa there is someone at the door" now it actually just says "there is someone at the door"

I seem to remember having the same issue with the Microsoft engine and the DLNA device and having to pad out the start of the text with extra characters.
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on May 23, 2017, 08:25:42 pm
Have you reloaded your browser page? RV doesn't show up in teh Sonos plugin either even if you do a luup reload until you reload the page.
Title: Re: New TTS engine: Microsoft Translator
Post by: cw-kid on May 24, 2017, 03:12:10 am
Have you reloaded your browser page? RV doesn't show up in teh Sonos plugin either even if you do a luup reload until you reload the page.

Yes I first reloaded the Luup then rebooted Vera and tried reloading the page in Chrome with ctrl + F5.

But RV didnt appear in the fields. Maybe I missed something in the code.
Title: Re: New TTS engine: Microsoft Translator
Post by: paros on June 01, 2017, 10:56:21 am
Can someone fix the Rate-settings for the DLNA-files also?



it works nicely with Swedish but the rate of the speech is way to fast. Is there any way to change this?

There is... BUT the Sonos TTS implementation does not have a "rate" option... It could be added, but is not trivial...

As a workaround....

1) upload the attached file to your vera with the reload Luup engine option selected. Allow your Vera to finish reloading.
2) find your Sonos device and go to the setup page
3) select "advanced"
4) select "new service"
5) enter:
   new service:  urn:micasaverde-com:serviceId:Sonos1
   new variable: TTS_RV_rate
   new value:  (enter a rate value from 0 to 1 - 0.5 is the default value, 0 is extremely slow, 1 is extremely fast)
6) click on "Add"
7) refresh your browser (F5 or CTRL-F5)

Once you have created the variable, you can update it's value from the advanced/variables page.
Title: Re: New TTS engine:
Post by: jito on June 04, 2017, 07:45:24 am
My TTS on the Sonos App of Vera works for 4-5 minutes and then stops working. Does anyone know why ? and how i can fix this.
What i tend to do is uninstall and reinstall the sonos app on Vera and it works again temporarily.
The music seems to work fine
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on June 04, 2017, 10:43:11 am
What TTS service have you set it to use?
Title: Re: New TTS engine: Microsoft Translator
Post by: paros on June 05, 2017, 03:05:14 am
I have tried to add the following new commands:
   new service:  urn:micasaverde-com:serviceId:Sonos1
   new variable: TTS_RV_rate
   new value:  0.1


   new service:  urn:dlna-org:device:DLNAMediaController:1
   new variable: TTS_RV_rate
   new value:  0.1

   new service:  urn:dlna-org:serviceId:DLNAMediaController1
   new variable: TTS_RV_rate
   new value:  0.1

However, the speach is way to fast.
Any ideas?


Can someone fix the Rate-settings for the DLNA-files also?



it works nicely with Swedish but the rate of the speech is way to fast. Is there any way to change this?

There is... BUT the Sonos TTS implementation does not have a "rate" option... It could be added, but is not trivial...

As a workaround....

1) upload the attached file to your vera with the reload Luup engine option selected. Allow your Vera to finish reloading.
2) find your Sonos device and go to the setup page
3) select "advanced"
4) select "new service"
5) enter:
   new service:  urn:micasaverde-com:serviceId:Sonos1
   new variable: TTS_RV_rate
   new value:  (enter a rate value from 0 to 1 - 0.5 is the default value, 0 is extremely slow, 1 is extremely fast)
6) click on "Add"
7) refresh your browser (F5 or CTRL-F5)

Once you have created the variable, you can update it's value from the advanced/variables page.
Title: Re: New TTS engine: Microsoft Translator
Post by: johanto on June 07, 2017, 06:31:09 am
@lolodomo i'm going nuts! please help =)

(see the attached file)
you see the questionsign in the "text" is a national letter when i type it in a scene
 this happens when i do a scene. BUT! when i try directly in the TTS at the sonos app the national letters works perfectly???

Hope you, or anyone else understand what i mean and can help me with this.
Title: Re: New TTS engine: Microsoft Translator
Post by: aard01 on June 08, 2017, 02:57:26 pm
it works nicely with Swedish but the rate of the speech is way to fast. Is there any way to change this?

There is... BUT the Sonos TTS implementation does not have a "rate" option... It could be added, but is not trivial...

As a workaround....

1) upload the attached file to your vera with the reload Luup engine option selected. Allow your Vera to finish reloading.
2) find your Sonos device and go to the setup page
3) select "advanced"
4) select "new service"
5) enter:
   new service:  urn:micasaverde-com:serviceId:Sonos1
   new variable: TTS_RV_rate
   new value:  (enter a rate value from 0 to 1 - 0.5 is the default value, 0 is extremely slow, 1 is extremely fast)
6) click on "Add"
7) refresh your browser (F5 or CTRL-F5)

Once you have created the variable, you can update it's value from the advanced/variables page.

I have done alle the above but I am not sure what I have to enter in the tab TTS in my Sonos device configuration? It says only Google, Mary, Microsoft or OSTTX service where I can choose from? Reloade LUUP and pressed F5 doesn't seem to help?
Title: Re: New TTS engine: Microsoft Translator
Post by: dclloyd on July 27, 2017, 08:26:33 am
Many thanks to @cybrmage for keeping the Sonos plugin TTS alive!!!

Quick question...  Is there an easy way to select the US English Male voice vs. the default US English Female? 

Our home automation system has always spoken with a male voice and we call it "Bob."  Since switching from Microsoft TTS, "Bob" now speaks with the wrong gender.

Thanks...

Did you ever get this figured out?  Personally I'd prefer the UK Female voice, but can't figure out how to adjust.  Seems like ResponsiveVoice supports multiple voices - I tried adding a variable of;

TTS_RV_setDefaultVoice = UK English Female

Which didn't work, but quite frankly I don't know what I'm doing!
Title: Re: New TTS engine: Microsoft Translator
Post by: symonsaz on August 18, 2017, 05:31:40 pm
My TTS using responsivevoice seems to be done... anyone else having issues?
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on August 18, 2017, 06:07:28 pm
Just tested it and ResponsiveVoice is responding just fine...
Title: Re: New TTS engine: Microsoft Translator
Post by: ZW-Tom on August 24, 2017, 08:20:16 pm
 :) ;) :D ;D WOW, I must say after three weeks of trying to get "say" to work on my system and the countless hours trying, this worked when I finally found this. It work great! Could not get the speed to change with the above patch.

Anyone now how or if there are other voices that can be accessed? Male, other female etc.?
If so, simple method would be nice!

Thanks @C ... great job.

Tom
Title: Re: New TTS engine: Microsoft Translator
Post by: symonsaz on August 28, 2017, 08:00:17 pm
i got rs back up and working...for some reason i had to factor rest my controller... but its good
thanks to those that replied.
Title: Re: New TTS engine: Microsoft Translator
Post by: bvaughn76 on October 17, 2017, 03:00:49 pm
So, I am very green at this.

I have the Cognitive service running for Microsoft. 

Can someone clarify what I have to plug into the Microsoft Client Id and Microsoft Client Secret boxes?

In All Reources > Sonos > Essentials It gives me the Resource Group, Subscription Name, Subscription ID, Endpoint, and then Manage Keys.  (Sonos is the name I gave to my Cognitive Translator service)

I assume Subscription ID goes into Microsoft Client Id?
Do I grab a Key and put that in the Secrets box?
Title: Re: New TTS engine: Microsoft Translator
Post by: BOFH on October 17, 2017, 07:16:40 pm
The support for Microsoft TTS in the plugin is for the old version. (Which MS shut down) The new one is not supported due to the demands it makes on developers. At this time, google TTS (in my experience unreliable), MacOS TTS and (with a plugin update) the ResponsiveVoice.org one are supported. As well as the locally installable MaryTTS.
Title: Re: New TTS engine: Microsoft Translator
Post by: michelhamelin on October 17, 2017, 09:22:39 pm
Where can i download latest version?
Mine is 1.4

The support for Microsoft TTS in the plugin is for the old version. (Which MS shut down) The new one is not supported due to the demands it makes on developers. At this time, google TTS (in my experience unreliable), MacOS TTS and (with a plugin update) the ResponsiveVoice.org one are supported. As well as the locally installable MaryTTS.
Title: New TTS engine: Microsoft Translator
Post by: PrincessCleavage on November 17, 2017, 08:48:28 am
The support for Microsoft TTS in the plugin is for the old version. (Which MS shut down) The new one is not supported due to the demands it makes on developers. At this time, google TTS (in my experience unreliable), MacOS TTS and (with a plugin update) the ResponsiveVoice.org one are supported. As well as the locally installable MaryTTS.
Hi Bofh,
Is there an updated guide to get the app working with Responsivevoice  please?

Edit: Anyone who reading the end of this long threat topic, Post #197 in this thread has the updated files and a few posts after has instructions to upload them.
Many thanks to cybermage for the latest update, any way we can buy a beer for cybermage?
Title: Re: New TTS engine: Microsoft Translator
Post by: fyford on January 17, 2018, 06:14:41 am
I am running an Edge on 1.7.3500 firmware. My RV / ResponsiveVoice stopped working a while ago so I have tried what I could find on the forums.

Updated the JS and LUA files as provided in this thread (1.4) J_Sonos1.js, L_SonosTTS.lua. This gave the RV option in the dropdown in the TTS screen but changing it in the dropdown never seems to commit even when hitting the 'set' button.

I then found some files in the OpenLUUP thread (1.4.1) D_Sonos1.json
D_Sonos1.xml,
D_Sonos1_UI4.json,
I_Sonos1.xml,
J_Sonos1.js,
L_Sonos1.lua,
L_SonosTTS.lua,
S_Sonos1.xml,
S_SonosAVTransport1.xml,
S_SonosGroupRenderingControl1.xml,
S_SonosRenderingControl1.xml

with detail on how to edit them to work with Vera, which I did and it added some functionality for changing rate and pitch, but still the issue of the TTS tab refusing to update any settings when changed.

I then found a thread suggesting to change the J_Sonos1.js file on the following line as below:
//new Ajax.Request (command_url+'/data_request', {
   new Ajax.Request (data_request_url, {

So I tried that but still had no luck getting the TTS tab to say or update any settings. I did manage to get the default engine setting changed by going to the advanced tab and changing the default engine to 'RV' ( 'ResponsiveVoice' does not work it has to be 'RV')

I've uninstalled and reinstalled the Sonos plugin and repeated above steps but still no joy.

If anybody has any other ideas please let me know!

Thanks




Title: Re: New TTS engine: Microsoft Translator
Post by: Jodelo on January 17, 2018, 07:16:14 am
I'm no wizzard on this, but maybe my experience helps.
I had the same. and partialy still have.
RV stopped working all together last weekend.

first i updated my sonos app, but that means that the old J-sonos1.js file and L-sonos1.lua file are installed.
to get RV again. i installed these files from Responsive voice earlier in this thread.
But before i uploaded the files i changed the .js file line
//new Ajax.Request (command_url+'/data_request', {
 
to
 new Ajax.Request (data_request_url, {
I saved the file and uploaded both of them.
At first it still did'nt work, but after i rebooted my vera it worked perfectly.

Make sure the IP adress of you sonos is the right one or change it in the advanced TAB
I cant change any settings any more in the settings tab, but the rest seems to work ok

Title: Re: New TTS engine: Microsoft Translator
Post by: fyford on January 17, 2018, 08:33:40 am
Thanks Jodelo, I will give the Vera a few reboots tonight and see if it makes any difference. At the minute my changes allows me to install the patch and discover all my Sonos equipment with the correct IPs just fine, it does however not allow me to save that, I have to manually add the ip in the advanced tab....
Title: Re: New TTS engine: Microsoft Translator
Post by: fyford on January 17, 2018, 08:43:02 am
Ah! Without rebooting it started working now... seems you have to leave it be for a few hours!

Thanks

EDIT: It seems I spoke too soon, it gets the MP3 file from RV and it plays it, which I could see but in fact the file is silent... not sure why that is. I'll report back if I find the solution.
Title: Re: New TTS engine: Microsoft Translator
Post by: dwighthenry61 on February 02, 2018, 07:33:40 pm
I reached out to Vera on this issue after pushing this question through the forum for 6 months, their reply below

Hi
Thank you for contacting Vera Customer Care
We would like to let you know that we are aware of this issue and it is because a security concern that was added to latest version of the firmware, we already report this to our development team and they are working on it but we do not have an ETA for it.
We are awaiting that the plug-ins writers change some files on the API that work with the plug in on the port which it was blocked.
We suggest you to post this on our forum in order to see if there is a work around for it, but we are recommending to downgrade to 7.21 version of the firmware until we get the full fix for it.
Thank you for understanding
Regards


Title: New TTS engine: Microsoft Translator
Post by: PrincessCleavage on February 03, 2018, 03:48:05 pm
I reached out to Vera on this issue after pushing this question through the forum for 6 months, their reply below

Hi
Thank you for contacting Vera Customer Care
We would like to let you know that we are aware of this issue and it is because a security concern that was added to latest version of the firmware, we already report this to our development team and they are working on it but we do not have an ETA for it.
We are awaiting that the plug-ins writers change some files on the API that work with the plug in on the port which it was blocked.
We suggest you to post this on our forum in order to see if there is a work around for it, but we are recommending to downgrade to 7.21 version of the firmware until we get the full fix for it.
Thank you for understanding
Regards
Thats odd My TTS on Vera edge with RV is working fine
Title: Re: New TTS engine: Microsoft Translator
Post by: fyford on February 09, 2018, 11:28:50 am
Mine started working eventually - no change to my steps listed earlier, just multiple reboots / power cycles of the vera (Edge)  odd but I am happy that it now works again!