Hotfixes for Sonos 2.0

Firmware: 1.7.4903
And yes, when I run the scene, it’s throwing a error:

10/10/20 16:04:17.711 luup_log:367: Sonos: Say action on device 370 text “Good Afternoon Jagger Family! . It is now 04:04. Here is your daily weather report. It is currently 16.1 degrees outside and Overcast. It is forecasted to be Partly cloudy throughout the day. with a high temperature of 20.5 and a low of 5.6. Tomorrow’s forecast is Clear throughout the day… Todays events are VISIT NANNY from 08:00 to 12:00 . . Have a wonderful day” <0x772eb320>
02 10/10/20 16:04:19.106 luup_log:367: Sonos: AzureTTSEngine:say() conversion request failed, 500 <0x772eb320>
02 10/10/20 16:04:19.107 luup_log:367: Sonos: (tts) engine Azure Speech Service error: request failed 500 <0x772eb320>
02 10/10/20 16:04:19.109 luup_log:367: Sonos: (tts) Engine “Azure Speech Service” produced no audio <0x772eb320>
04 10/10/20 16:04:19.111 <0x772eb320>

OK. Please turn on TTS debug and run another request, capture and post the log.

Turned on debug and ran dynamic scene:

10/10/20 16:32:24.806	luup_log:367: Sonos: AzureTTSEngine:say() conversion request failed, 500 <0x772eb320>

02 10/10/20 16:32:24.807 luup_log:367: Sonos: (tts) engine Azure Speech Service error: request failed 500 <0x772eb320>
02 10/10/20 16:32:24.808 luup_log:367: Sonos: (tts) Engine “Azure Speech Service” produced no audio <0x772eb320>
04 10/10/20 16:32:24.809 <0x772eb320>
50 10/10/20 16:32:26.101 luup_log:367: Sonos: [debug] sonosTick(“7”) <0x718c3520>
50 10/10/20 16:32:26.102 luup_log:367: Sonos: [debug] Task:runReadyTasks() ready “master” 1602361946(10/10/20.16:32:26) <0x718c3520>
50 10/10/20 16:32:26.102 luup_log:367: Sonos: [debug] Task:runReadyTasks() running “master” <0x718c3520>
50 10/10/20 16:32:26.103 luup_log:367: Sonos: [debug] runMasterTick({ name=“367”, args={ 1=367 }, when=0, owner=367, func=function: 0x2f67f38, id=“master” }) <0x718c3520>
50 10/10/20 16:32:26.131 luup_log:367: Sonos: [debug] runMasterTick() “/etc/cmh-ludl/” has 48556K free at 5%% <0x718c3520>
50 10/10/20 16:32:26.159 luup_log:367: Sonos: [debug] runMasterTick() /www/sonos has 9152K free at 16%% <0x718c3520>
50 10/10/20 16:32:26.160 luup_log:367: Sonos: [debug] Task:runReadyTasks() waiting “update373” 0 <0x718c3520>
50 10/10/20 16:32:26.160 luup_log:367: Sonos: [debug] Task:runReadyTasks() waiting “update372” 0 <0x718c3520>
50 10/10/20 16:32:26.160 luup_log:367: Sonos: [debug] Task:runReadyTasks() waiting “update369” 0 <0x718c3520>
50 10/10/20 16:32:26.161 luup_log:367: Sonos: [debug] Task:runReadyTasks() waiting “update384” 0 <0x718c3520>
50 10/10/20 16:32:26.161 luup_log:367: Sonos: [debug] Task:runReadyTasks() waiting “update370” 0 <0x718c3520>
50 10/10/20 16:32:26.162 luup_log:367: Sonos: [debug] Task:runReadyTasks() waiting “__sched” 0 <0x718c3520>
50 10/10/20 16:32:26.162 luup_log:367: Sonos: [debug] Task:runReadyTasks() waiting “master” 1602362846(10/10/20.16:47:26) <0x718c3520>
50 10/10/20 16:32:26.163 luup_log:367: Sonos: [debug] Task:runReadyTasks() waiting “update368” 0 <0x718c3520>
50 10/10/20 16:32:26.163 luup_log:367: Sonos: [debug] Task:runReadyTasks() waiting “TTSCacheCleaner” 1602445403(10/11/20.15:43:23) <0x718c3520>
50 10/10/20 16:32:26.164 luup_log:367: Sonos: [debug] Task:runReadyTasks() waiting “checkProxy” 1602362184(10/10/20.16:36:24) <0x718c3520>
50 10/10/20 16:32:26.164 luup_log:367: Sonos: [debug] Task:runReadyTasks() waiting “update385” 0 <0x718c3520>
50 10/10/20 16:32:26.165 luup_log:367: Sonos: [debug] Task:runReadyTasks() waiting “update371” 0 <0x718c3520>
50 10/10/20 16:32:26.165 luup_log:367: Sonos: [debug] Task:runReadyTasks() next in 238 <0x718c3520>

Sorry, I guess I wasn’t very specific. Need to turn on TTS debug. Plugin debug can stay off.

And I need to see everything from the Say action invocation to the last output of any errors.

just because it’s been a very long week from a work perspective and I am not sure if I thinking correctly (and you are being incredibly helpful), to be clear, as I don’t see TTS debug specifically, which one would you like me to check…or am I in the completely wrong screen (master device…settings)?

Plugin
UPnP
TTS Engines

Sorry, I’m multitasking today and wasn’t thinking through everything I needed to tell you. My bad for sure. The “TTS Engines” is the one you want. Just that one for this purpose will be fine; leave the others off.

In the log, look for the “Say” action being invoked. Make sure you find the last one, of course, as the logs may have several at this point. A good clue that you’re in the right spot will be a message shortly after saying “AzureTTSEngine:say()…” with some stuff after. I need that Say action and everything after.

OK. Could be a TLS error. Just for lulz, go into the Sonos master device, and change the TTS “Requestor” setting to Curl. Save changes, then reload Luup and try again.

No joy…she is still silent. :frowning:

OK, if it’s not working either way, I’m thinking Azure error, or there’s just a problem with the configuration you’ve provided that isn’t standing out. It’s working fine for me in the zone that I’m in (eastus). Lets let it go 24 hours and try again tomorrow. To go any deeper, I’ll need to make one-off versions of the TTS engine for you and we’ll need some bandwidth between us for the exchange of log files and scripts.

Sounds like a plan. Thanks for your help today.

A post was split to a new topic: Playback doesn’t resume after Alert

OK. So I’ve updated the hotfix ZIP file in the head post of this topic to include a TTS engine with a bit more debug. I’m starting to see more rumbles of this, and one user you may have seen posted a notice from Microsoft about them changing certificate authorities on their servers, and this may have something to do with it, but the nature of the beast is such that multiple issues can all cause similar symptoms, so each case needs to be examined individually.

For anyone having Azure issues, I’d like you to install the hotfix package in the head post here, and then please post the log from the invocation of a (failed) Say action to the final message. This version in particular will log messages of note in yellow in the log file, but all surrounding log entries are necessary for context, so please don’t over-redact.

Also, please do not post in this thread. Use this topic for further discussion of current Azure issues: Sonos TTS via Azure has stopped working - Sonos - Ezlo Community

Remember to hash out your API key if the log snippet you are posting contains it

Is it possible that the cause of the issue is not your plugin but Azure’s End Point? In my case, since I am in Canada, it’s listed as https://canadacentral.api.cognitive.microsoft.com/, however, when I click on it I get the following error message {“error”:{“code”:“404”,“message”: “Resource not found”}}. To be sure, I logged a ticket with Microsoft a couple of days ago but haven’t heard back yet.

…and yes, will post anything further in the thread you noted.

I’m developing solutions based on Azure Cognitive Services and what you reported is not a problem. It’s just a reply that you’re hitting an endpoint not suited to be hit. The endpoint will vary based on region, so that’s OK to have different hosts based on your location.

I was able to hit the endpoint with other tools, so it’s fine, it just doesn’t want to be hit by a browser directly, as @therealdb said.

I think there are multiple issues here. There is a note that they are changing CAs, so it’s possibly related to that, or even transiently related. I checked the CAs for Vera with curl and everything they use is listed. LuaSec is anyone’s guess. So getting some logs is first. There’s a mixed bag of things that have worked recently, so I think we’re looking at multiple problems. And of course, I’m here in “eastus” and everything is working fine still, just to make things extra difficult (I can fix problems that I can see, everything else is harder).

I have found a resolution. After setting up a new service for eastus, using the associated keys and still no joy, I tried going back to canadacentral and changing the voice type. The voice I had originally selected from the drop down which was working fine for the past 5+months appears to not work anymore (i.e. English (US), male (Guy, neural). Once I tried another voice (i.e. English (US), male (Benjamin), my system is talking once again. I tried a few other voices and some worked while others did not. Same results with eastus so I am guessing that you weren’t experiencing any issues because of the voice you have selected…or at least I hope that is the case to explain all this.

That well could be… I just use the default voice for US English.

Well that’s not helpful. What’s really unhelpful is that the server appears to just give a 500 error. I’ll have to look and see if any more detail comes back with that.

I just changed my voice to English(US), male (Benjimin) and it is working again. It was on Jessie (neural). Jessie (standard) also works. Tried several others that were not neural and they are working.