Alexa Announce Feature - Text to Speach via Alexa now a possability?

right so it would be
/home/homeassistant/.homeassistant/alexa_remote_control.sh -d “my echo” -u “classic rock”

Do I have to have amazon music subscription for the music to work

When I enter
alexa_remote_control.sh -d "office” -t “classic rock”
is says
“playing PRIME playlist Classic Rock hits”
but no sound.

I’ve tried playlists and stations. I did a query and got a huge list of playlists and or stations, but no sound.

no you dont have to have anything more then prime, for prime music.
and its strange that she confirms to play but then doesnt play.
can you see that she starts playing in the app?

(please remember you are faking the app, so always look at the at the app for results)

The same happens to me… every command sent to my alexa devices to play a sound (track, album, playlist) i get always NO sound.

Here it is an example:

sudo /home/homeassistant/.homeassistant/./alexa_remote_control.sh -s "Stink-Foot"

setting default device to:

Echo Spot

playing library track:Stink-Foot on dev:Echo Spot type:A10A33FOX2NUBK serial:G070RR1383640BSD mediaownerid:A2NMKPQPAXWH3A

{"message":null

Or:

alexa_remote_control.sh -u "classic rock"

setting default device to:

Echo Spot

playing PRIME station classic rock

{}

When i look in history it shows nothing for music. For TTS it does.

you wont find it in histoty, because its no command that alexa can interpret as spoken, but as activated from the app.
in the home page from the app you can find cards for what has been activated last.

@maurizio53 does she aso say she will play it? if not then you got a different problem.

@ReneTode No, it says nothing and the history of activity is empty regarding this. Which kind of problem you think i have?
@ptdalen same here…

i dont know, but i have seen so much remarks from you with reactions to that with possible solutions that its hard to tell anything.
my suggestion for you is to start reading this topic at post 1, and look for all possible options that are there when its not working and try out why its not working for you. it could very well be your cookie, but can be anything else.

1 Like

Only thing i can see is that every other command send an output like Alexa.Traffic.Play (when i ask -e traffic), or Alexa.Speak while every command regarding music (and i have Prime Music) i get {“message”:null} as answer…

I have not tried that yet. But I noticed that if you create an Alexa routine that you can include music sources and playlists. Was thinking about creating an Alexa routine with a Spotify playlist. Then starting that routine using scripts

should be possible

I tried, but always with no success… i created a routine which include an Amazon Prime playlist that works good if i call it with voice, but if i call it with a script like this:

sudo ./alexa_remote_control.sh -e automation:"Alexa, sono a casa" -d 'Echo Spot'

I get this:

`ERROR: no such utterance ‘Alexa, sono a casa’ in Alexa routines.

EDIT: Solved, i must call the routine without Alexa at the beginning… using only “sono a casa” it works…

Now it only remains to understand why calling music from the script directly doesn’t work…

I finally found a way to play stations, playlists and track with this script…
You MUST use only the ID of what you are wanting to play… If you try to play with the name it doesn’t work… If you use the ID it works. Now will be there a way to convert the ID to the real name of what you want to play? Otherwise it’s very frustrating to find always the ID!

in the available options:

-P : list Prime playlists
-S : list Prime stations

i didnt try, but i suspect it will give back the IDs

Yes, it is, but i get a little problem when trying the -P option.
I get:

the following songs exist in your PRIME prime-playlist-browse-nodes:

**{**

**"primePlaylistBrowseNodeList"** **: []**

**}**

But i have many songs added to my Prime library… why i get no track?
And more what does it means imported? Downloaded or what?
BTW i see with the ID i can get only the stations played, not playlists.

Noticed an odd issue with this process vs the medial player TTS alexa.

I have an automation that tells me it’s time to leave for work. This is the body of the message

          Based on current traffic, you have 15 minutes to leave if you want to get to khaki by 8:30am.  Traffic is {{ states('sensor.pauls_traffic_density_to_caci') }} today.

What it says is

30am.  Traffic is {{ states('sensor.pauls_traffic_density_to_caci') }} today.

It does say the state, so it’s really

30am.  Traffic is normal today.

Seems like it does not like the colon. I could spell it out, but would prefer to figure out the best way to handle this. Maybe it needs to be surrounded in quotes “”. I just noticed this this morning on my way to work, so have not had time to test various options.

there is no use for things like : . , etc.
what you are using is the “simon says” skill and that skill doesnt know those things.

you can test every sentence you want her to say by saying

alexa simon says your sentence

and then look in the history how she did write it down.

Totally understand. I’m just letting people know that things like time with a colon may not play correctly. The script is not passing the whole message when there is a colon. It’s not an Alexa Simon says issue. But as you say it’s not hard to work around it if you are aware of it.

1 Like

On a side note, this has helped me to realize I need to update my automation anyway. I now have an input_datetime I use for my work time, so that the automation is more customized. So having 8:30 as text is not really always true.

I’ll have to do some testing but I wonder how it will handle a state that includes a colon.

such as this

Based on current traffic, you have 15 minutes to leave if you want to get to work by {{ states('input_datetime.work_time') }} .  Traffic is {{ states('sensor.pauls_traffic_density_to_work') }} today.
1 Like

Just following up on my own thread. If you look through the script that actually does the work, this looks like the section that parses the text for simon says

	speak:*)
			SEQUENCECMD='Alexa.Speak'

			TTS=$(echo ${COMMAND##*:} | ${SED} -r 's/[^-a-zA-Z0-9_.,?! ]//g' | sed 's/ /_/g')
			TTS=",\\\"textToSpeak\\\":\\\"${TTS}\\\""

I’m not a programmer, but I see the colon. Maybe that’s where it see’s the colon and breaks up the message. I know the Alexa as a media player did not have an issue with my text that included the colon, so i assume it either has handling for the colon,or just formats the TTS differently.

Really not expecting a change to the script, just passing along what I see