New TTS engine: Microsoft Translator

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

[quote=“lolodomo, post:10, topic:188264”]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.[/quote]

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>

[quote=“JS007, post:21, topic:188264”]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[/quote]

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:[b]ClientUPnPError712[/b]] <0x74f68520>

Sonos error :
Saturday, August 1, 2015 - 10:58 PM Central Time
Unable to play ‘Say.144.mp3’ - the track is not encoded correctly.

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

@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.

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.

Thank you @lolodomo! You are a saver.

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

[quote=“hek, post:27, topic:188264”]Thank you @lolodomo! You are a saver.

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

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.

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.

@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.[/quote]

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

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=[

[quote=“lolodomo, post:28, topic:188264”][quote=“hek, post:27, topic:188264”]Thank you @lolodomo! You are a saver.

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

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.[/quote]

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

[quote=“JS007, post:32, topic:188264”][quote=“lolodomo, post:28, topic:188264”][quote=“hek, post:27, topic:188264”]Thank you @lolodomo! You are a saver.

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

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.[/quote]

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

No, 221 now.
http://code.mios.com/trac/mios_sonos-wireless-music-systems/browser/trunk

I updated the link everywhere. It may explain your problems.

Tried 221 and now getting this when trying to access TTS page: Error executing function Sonos_showTTS():

Attached is the log.

[quote=“lolodomo, post:33, topic:188264”]No, 221 know.
http://code.mios.com/trac/mios_sonos-wireless-music-systems/browser/trunk[/quote]

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

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

[quote=“wezley69, post:35, topic:188264”]Tried 221 and now getting this when trying to access TTS page: Error executing function Sonos_showTTS():

Attached is the log.[/quote]

Take the JS file from the ZIP. Upload it, reload and clear your browser cache.

[quote=“JS007, post:36, topic:188264”]ok, changed to new code 221 and google now works :slight_smile:

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[/quote]

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

[quote=“lolodomo, post:38, topic:188264”][quote=“JS007, post:36, topic:188264”]ok, changed to new code 221 and google now works :slight_smile:

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[/quote]

Weird. Same problem as @tomgru.
What’s your client id ? Only letters are accepted if I correctly remember. No space.[/quote]
sent info on PM, feel free to test with them

JD file? JS file?

Your 221 link is no longer to a zip file.