[Deprecated] Amazon Alexa Text to Speech (TTS) v0.6.2 - Direct Integration (USA, Canada, UK, Italy, Australia, & Brazil)

This is great work @ogiewon.

Although now I think I am having a @Cobra moment....

6 Likes

Thanks.

I know there are a lot more features that you've exposed in your integration. Do you have a top 1 or 2 that should be focused on? I am guessing everyone will want volume control, if that is possible?

Volume control is possible. The thing is I have noticed once the devices go idle for awhile they stop responding to some of these calls. The only way I have found to get them to respond again is to send a play command. Volume is one such command. My workaround was I found a "silent tone" track so when the device reports idle I tell it to play this track. A bit hacky but seems to work.

I would guess the ability to play specific tracks / playlist would likely be at the top of people list. Many options are there for this. It is too bad amazon quit letting us upload our own music, as that would be my top pick.

Aside from that I particularly like being able to query the device for what is currently playing and the album art that goes with it.

Interesting. In my testing over the past few days, I have not noticed this yet. How long does the Alexa device need to be idle before it exhibits this behavior? I will definitely keep an eye out for it.

Actually managed to miss the other important feature people will want. And that would be the ability to trigger routines. It is only a slight tweak on the speak command - this is one of the commands I was having trouble with no response as well. At one point I thought the whole thing was broken as I could not get any of my many many echo products to respond.

It seems to happen after several hours. The query device response seems to change twice. I have not looked at it in awhile, as trying to parse the telnet responses was giving me headaches and I was working on features I did not think I was ever going to use. I will pay closer attention the next time I am playing with them and try to get a more solid number.

Happily the TTS call always seems to work.

1 Like

If during your efforts you figure out how to hook into the Plex integration I would be most interested.

1 Like

Compiling the cookie is a total PITA and I had to use Chrome because the FireFox cookie crashed the application, but once I got past that everything worked great. Thanks for creating this.

I just logged out of the Amazon website and it stopped working so am I correct to assume that every time you log out you're going to have to re-create that cookie?

How exactly did you do this in Chrome? I've never installed extentions in a browser before and the readme for coockies-txt seems to be missing information on how to install it.

Menu
More Tools
Extensions
Left Menu > Open Chrome Web Store
Searched for cookies.txt

1 Like

Thanks!

The method used grabs all the cookies into one. ONE of them is "session-id" -- logging out invalidates that cookie at amazon.com and thus, yes, you need to rebuild it.

There's also: "session-id-time" and it probably invalidates too. Maybe most go invalid, but the point is, if one is invalid, you have to rebuild.

1 Like

FYI, Once that cookie is invalidated you can no longer get into the app to change the cookie so you have to force remove the app and start over.

I know I'm speaking to a tiny subset here, but on the Mac, the FF cookie is stored as "cookie.sqlite" and I just happened to have sqlite3 installed on my Mac.

SELECT name, value FROM moz_cookies WHERE host = ".amazon.com";

this sql command extracts them all (I think) and then there's just the text editor work remaining to replace spaces with = and replace \n with ;

No, I haven't started that experiment.. yet.

As a last resort, clear all cookies. If possible, only the amazon ones. YMMV

I just figured out an easier way to get the cookie.

Log in, open Chrome developer tools, got to the Network tab, filter by XHR, and copy the entire cookie from any of the entries.

Paste the cookie into the app and add a semi-colon to the end of it

2 Likes

Worked for me also!

Hmmm... I wonder why this would be? I have never invalidated my cookie (having used a different browser than normal to create it, and never logged out of the site), but I have entered in invalid cookie strings numerous times and the app seemed to handle it fine (there is a try/catch around the http calls.)

Yeah I get an App is not responding error when I click the "Next" button. I also can't add another device after a single device is selected.

I believe you. I just have not seen that behavior. Is this after you've invalidated your cookie somehow?

That's so strange. Is this with a still valid cookie? I have gone back into the app numerous times during testing, on two hubs, and have always been able to select and deselect the various alexa devices without any issues. (of course, deselecting a device really doesn't do anything as you have to manually delete the child device.)

I would truly like to understand more about the issues you're seeing. My only hypothesis is that it has something to do with how you generated your cookie. I used FireFox on Windows with the Cookies.txt extension to save my cookie file. Then I used Notepad++ to generate the string, making sure to remove all double quotes, adding semicolons between each line, and replacing the spaces with = signs. I also made sure that there were no CR's or LF's within or at the end of the line of text (I only selected/copied the one huge line of text.)

While trying to troubleshoot I noticed them, but nothing gets logged which is really weird. I get the same error page as @keo.

I originally logged out because I don't like staying logged in after using an extension, but with the developer tools method that's no longer a concern so I'm fine with leaving it logged in.

Things are still working great this morning.

1 Like