We have moved at community.getvera.com

Author Topic: New TTS engine: Microsoft Translator  (Read 68014 times)

Offline JS007

  • Sr. Member
  • ****
  • Posts: 319
  • Karma: +1/-3
Re: New TTS engine: Microsoft Translator
« Reply #15 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 :)
« Last Edit: August 01, 2015, 03:36:52 pm by JS007 »

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: New TTS engine: Microsoft Translator
« Reply #16 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 ?

Offline JS007

  • Sr. Member
  • ****
  • Posts: 319
  • Karma: +1/-3
Re: New TTS engine: Microsoft Translator
« Reply #17 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
« Last Edit: August 01, 2015, 03:47:54 pm by JS007 »

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: New TTS engine: Microsoft Translator
« Reply #18 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.

Offline JS007

  • Sr. Member
  • ****
  • Posts: 319
  • Karma: +1/-3
Re: New TTS engine: Microsoft Translator
« Reply #19 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
« Last Edit: August 01, 2015, 10:40:32 pm by JS007 »

Offline JS007

  • Sr. Member
  • ****
  • Posts: 319
  • Karma: +1/-3
Re: New TTS engine: Microsoft Translator
« Reply #20 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

« Last Edit: August 01, 2015, 10:53:08 pm by JS007 »

Offline tomgru

  • Hero Member
  • *****
  • Posts: 1403
  • Karma: +18/-6
Re: New TTS engine: Microsoft Translator
« Reply #21 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>

Offline JS007

  • Sr. Member
  • ****
  • Posts: 319
  • Karma: +1/-3
Re: New TTS engine: Microsoft Translator
« Reply #22 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.
« Last Edit: August 02, 2015, 12:19:56 am by JS007 »

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: New TTS engine: Microsoft Translator
« Reply #23 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

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: New TTS engine: Microsoft Translator
« Reply #24 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.

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: New TTS engine: Microsoft Translator
« Reply #25 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.

Offline hek

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 714
  • Karma: +60/-1
Re: New TTS engine: Microsoft Translator
« Reply #26 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.

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: New TTS engine: Microsoft Translator
« Reply #27 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.

Offline wezley69

  • Sr. Member
  • ****
  • Posts: 289
  • Karma: +6/-6
Re: New TTS engine: Microsoft Translator
« Reply #28 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.

Offline JS007

  • Sr. Member
  • ****
  • Posts: 319
  • Karma: +1/-3
Re: New TTS engine: Microsoft Translator
« Reply #29 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
« Last Edit: August 02, 2015, 03:27:46 pm by JS007 »