We have moved at community.getvera.com

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

Offline fyford

  • Jr. Member
  • **
  • Posts: 75
  • Karma: +0/-1
Re: New TTS engine: Microsoft Translator
« Reply #60 on: August 04, 2015, 08:08:18 am »
tried it and both Google & MS works for me using 'Say the weather'

Thanks

Offline lolodomo

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

Offline lolodomo

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

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: New TTS engine: Microsoft Translator
« Reply #63 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' ?
« Last Edit: August 04, 2015, 04:49:55 pm by lolodomo »

Offline hek

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 714
  • Karma: +60/-1
Re: New TTS engine: Microsoft Translator
« Reply #64 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.
« Last Edit: August 04, 2015, 03:15:58 pm by hek »

Offline JS007

  • Sr. Member
  • ****
  • Posts: 319
  • Karma: +1/-3
Re: New TTS engine: Microsoft Translator
« Reply #65 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
« Last Edit: August 05, 2015, 12:58:24 pm by JS007 »

Offline wezley69

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

Offline Pseudomizer

  • Sr. Member
  • ****
  • Posts: 376
  • Karma: +8/-1
Re: New TTS engine: Microsoft Translator
« Reply #67 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.
Vera 3, RFWC5AW, 2 x LFM-20, FS20Z, 3 x YRD220ZW619KWKD, 2 x FI9826W, FI9828P, 2 x NEST Gen2, EVL-3CG, 11 x BR30, 3 x A19 Hue, Media Srv, 18 x ZW4004, 8 x ZW3003, 12 x ZW2002, IP2IR Cache, 2 x DSC24, ZWN-SC7, 4 x PIR-ZWAVE2, DSB05-ZWUS, RS100-HC, ECO-TILT-US, Ribu1C, 3 x GE12721, 2 x Echo, ZW078-A

Offline JS007

  • Sr. Member
  • ****
  • Posts: 319
  • Karma: +1/-3
Re: New TTS engine: Microsoft Translator
« Reply #68 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
« Last Edit: October 17, 2015, 07:23:44 pm by JS007 »

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: New TTS engine: Microsoft Translator
« Reply #69 on: October 22, 2015, 07:46:33 am »
@JS007: happy that it is now working for you too.

Offline ilikelife

  • Full Member
  • ***
  • Posts: 129
  • Karma: +2/-0
Re: New TTS engine: Microsoft Translator
« Reply #70 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

 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.


Offline lolodomo

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

Offline ilikelife

  • Full Member
  • ***
  • Posts: 129
  • Karma: +2/-0
Re: New TTS engine: Microsoft Translator
« Reply #72 on: October 25, 2015, 09:30:05 am »
Oh well.  I'm just happy it's working!  :)

Offline fmzip

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +0/-0
Re: New TTS engine: Microsoft Translator
« Reply #73 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 :)

Offline RHINESEL

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