Speech Parser script to extract entity Id information into readable form for Alexa or Google Assistant TTS

I have updated the program with a global search and replace to amend the final parse. This can be used to translate the language of any of the sensors , or simply to refine the final output

Updated with the notify option in the current version of alexa media player

1 Like

Hi thanks for the really useful app.
I am at a mm from having it working

I see in debug that everything is correctly parsed but at the end the speech is sent to a destionation “none”

I also see in the code your comment that the TTS voice is set as

    self.call_service("alexa_media/update_last_called")                    #
    TTS_voice = self.get_state("sensor.last_alexa")      

2019-05-26 01:31:51.371825 INFO SpeechParser: extended parse= La Contatto Porta Taverna e’ aperta{$01=state|off| e’ chiusa}
2019-05-26 01:31:51.372192 INFO SpeechParser: scmd = [(’$’, ‘01’, ‘=’, ‘state’, ‘off’, " e’ chiusa")]
2019-05-26 01:31:51.372552 INFO SpeechParser: ind 1 state state
2019-05-26 01:31:51.372949 INFO SpeechParser: ext output parse= e’ chiusa
2019-05-26 01:31:51.373308 INFO SpeechParser: input value = off replace Value = e’ chiusa
2019-05-26 01:31:51.373659 INFO SpeechParser: operator is =
2019-05-26 01:31:51.374018 INFO SpeechParser: extended parse= La Contatto Porta Taverna e’ aperta
2019-05-26 01:31:51.374373 INFO SpeechParser: translate morning|morgan
2019-05-26 01:31:51.374837 INFO SpeechParser: translate source morning replace with morgan
2019-05-26 01:31:51.375205 INFO SpeechParser: Message 1 for None is La Contatto Porta Taverna e’ aperta

Clearly last alexa for me is set to “none” and not the last invoked alexa (I am trying right now with alexa mobile app )
what could be wrong?


Ensure you have a working TTS with Echo Devices (Alexa) as Media Player - Testers Needed

Then simply replace TTS_voice = self.get_state(“sensor.last_alexa”) with

TTS_voice = “the actual name of the device”

There have been a number of improvements in Echo Devices (Alexa) as Media Player - Testers Needed since I wrote this.

check this for last sensor https://github.com/keatontaylor/alexa_media_player/wiki

If you only have 1 alexa then the above is not required just code the name

Hi thanks for the Quick reply.
I have the Alexa component installed .
I have more two Alexa at home .
Shall i choose One?
Or perhaps duplicate the call to all.

Last night while testing i was doing It from my mobile using the Alexa app: Is the feedback to app instead of device not supported ?

TX again

Ensuure the Alexa component is working . My App is simply a parse to generate text to for the alexa App to speak

The debug looks fine just needs the the Alexa name

I use the last alexa sensor to ensure the correct alexa responds to the trigger. You can hard code the alexa name to test , then work on the last alexa sensor

Yes. That Is my Plan :slight_smile:
Just the last step seems not working (last Alexa search)

Success! Now to understand why last Alexa Is not picked up