Author Topic: Send text for Alexa to speak - e.g via a scene ?  (Read 212 times)

Offline parkerc

  • Sr. Hero Member
  • ******
  • Posts: 2330
  • Karma: +32/-44
  • Life Moves Pretty Fast....
    • Node Central
Send text for Alexa to speak - e.g via a scene ?
« on: September 08, 2017, 03:27:29 pm »
Hi

I've used a number of TTS app/assistants with my Vera over the years, so I was wondering if it is (or will be) possible for us to create some "text" for Alexa to speak, which is generated from information held on from Vera ?  Does anyone know ?

I currently have a number of scripts, that I can run on Vera which will be announced via Sonos - e.g I can run a scene that checks if any doors/windows are open and if so, it tells me exactly which one(s)

Sorry if this has been asked/answered already ?

Offline jswim788

  • Sr. Member
  • ****
  • Posts: 483
  • Karma: +23/-2
Re: Send text for Alexa to speak - e.g via a scene ?
« Reply #1 on: September 09, 2017, 12:10:23 am »
I, too, am interested in this.  I don't have a solution yet, but I have some thoughts.  Maybe someone else can build on these or has better ideas.  And I'm sure I don't have all the correct information.

First, as far as I know, Alexa only supports the smart home API which doesn't yet include interesting arbitrary text.  It has some queries for the thermostat and locks and such (see https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/smart-home-skill-api-reference), but that looks limited.  And this is only a query, not something that you can trigger.

Next I was wondering about brute force with Bluetooth.  Have a Raspberry Pi that gets the text to speech, then connects to the Echo via Bluetooth, plays the message, and disconnects.  And whatever music was playing prior should continue on afterwards.  I've been searching but can't find much to indicate this is possible.  But my hopes aren't high.

You can create your own Alexa skill that can access arbitrary text.  So as long as you can get the text to a location accessible by the host of your skill, then you can likely have Alexa play it back for you.  The harder part is getting a secure location for this, but it could be done.  One key piece is missing however: this is only a query, not a push.  Vera could likely get the text to a location and Alexa could play it back, but only if you asked her to do so.

So then we get to true Rube Goldberg idea: create the skill, also have the RPi, and have the RPi play over a speaker near the Alexa to query for the skill and get the announcement - "Alexa, ask my skill for the announcement."  There has to be a better way...


Offline RichardTSchaefer

  • Master Member
  • *******
  • Posts: 9571
  • Karma: +729/-136
    • RTS Services Plugins
Re: Send text for Alexa to speak - e.g via a scene ?
« Reply #2 on: September 09, 2017, 12:13:37 pm »
I have done this with Vera Concierge for Google Home ... via the Vera Alerts plugin, you can send text to be spoken to a Google Home device and/or any Google Cast device. The Vera Concierge handles the TTS conversion.

Offline parkerc

  • Sr. Hero Member
  • ******
  • Posts: 2330
  • Karma: +32/-44
  • Life Moves Pretty Fast....
    • Node Central
Re: Send text for Alexa to speak - e.g via a scene ?
« Reply #3 on: September 09, 2017, 12:22:09 pm »
The Amazon Polly & Sonos set up is the best I have used with Vera so far (http://forum.micasaverde.com/index.php/topic,49618.msg326146.html#msg326146)

Ironically with the above I'm using an Amazon speech engine product outside of Alexa - the bonus of rhe Sonos tie in is the fact that all announcements can be made across multiple room (using my existing set up).

However there's obviously no voice recognition capability in that set up - even if as I understand it - Sonos are working on something of their own as well as doing tie ins with Alexa and maybe others too.

If the Vera -> Alexa API can support text for tailored responses that would be awesome !!
« Last Edit: September 09, 2017, 01:06:46 pm by parkerc »