New TTS engine: Microsoft Translator

[quote=“wezley69, post:40, topic:188264”]JD file? JS file?

Your 221 link is no longer to a zip file.[/quote]

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

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

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

@JS007 - Thank you again! Working now.

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

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>

.

Including Microsoft Translatif ?

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

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

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

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

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

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.

@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

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

@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

np, when all done testing I will change the id and secret, thanks

Fyi, l’m un U15.

@lolodomo - No MS not working. I was just happy having Google back!

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

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

not sure if I did this right

the line in log

02 08/04/15 5:02:39.719 e[33;1mluup_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:~#

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