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

someone knows if it is possible with the script to add a delay between sentences as described here?

nope, isnt possible.
the scripts is using the alexa skill “simon say” which alexa also has included in its routines.

and there is no relation between that, and what you can do with self created intents.
its just a reapeat from what is send there.

i noticed that they already made responses better based on , and .
but even that was unexpected. so all we can hope is that the skill in the future will be even more expanded.

1 Like

There is an issue with the script - it uses a regexp to replace punctuation.
This is being resolved in later versions by writing out post data into a temp file to avoid json issues the regexp was in place to solve, or you can hack the speak park of the script to add the full stop into the regular expression remembering to escape “.”, which doesn’t seem to cause any issues.

Note also 10.1 (10 point 1) would read 101 with the version of the script with the issue.

Having said that - you can add a sentence ‘pause’ without changing the script yourself with a hyphen ‘-’.

1 Like

Thank you both

This may sound silly, but how does one go about ‘exposing’ a script to alexa? When I do a search for ‘expose’ lots of entries come up but none on how to do it. I am using hass.io 0.88.1 with custom comonents/alexa/media_player.py version 0.10.2. I create a script in HA but the Alexa App does not see it, I assume because it is not exposed. I see people have created scripts ‘filtered’ but I think that is the default. Yet, I can find no instructions on how to expose a script unless it has something to do with other versions of alexa_tts.
This may be a noob question but searching has yielded nothing so far.

Bart

there are 4 ways i know of to connect HA and alexa (besides the mediaplayer)

  1. the Emulated Hue component. in my eyes the most simple you just add some lines to the HA configuration and start to discover devices in the Alexa app. dont forget to restrict what you show to alexa, because if its over 48 alexa wont see any.
  2. HAASKA has a little more options but is also more difficult to set up (i didnt try it)
  3. the home assistant cloud app also makes it possible when i have understand correct, but has a montly fee.
  4. creating your own skill on amazons servers

for sure when starting to build your own environment its wise to keep going back to the docs.
most important this page


and type the type of component you like (in this case alexa) and you mostly find a way to connect it.

and dont forget to browse through all of them. there are quite a lot of components that you might find usefull that dont require devices.

I’m constantly finding myself on the components page as a result of my searches. I only hesitate to include new functionality until I get what I have working reliably.

And I agree. It looks like the emulated hue dummy bulb may be the easiest. I’m guessing that is what exposes a script? By making it start when the emulated hue bulb gets a command?

I am trying to stay away from all cloud services although Alexa is essentially the cloud. I’ve written a few private skills so I’m no stranger to them but they only work for my account. So when half the echo devices are on my wife’s account, those won’t have the skill. Just another complication and reason to try to avoid the cloud.
Thanks for all the help Rene.
Bart

the emulated hue is not a bulb, but it fakes a Hue hub.
it exposes all entities you allow to alexa, and from that moment you can find them in devices in the alexa app and use them.

so any light, switch or input_boolean that you got in HA can be turned on from that moment.

why have some alexas on 1 account and the others on another account?
probably the person that bought it?
there is no logical reason to keep them in 2 accounts. just set them up in 1 account and you got way less trouble.

I hear you Rene.

My wife is the prime holder so she likes her own account but it’s only a problem with skills. By implementing a virtual alexa hue bulb, I can use Alexa routines which show up on both account devices. If it doesn’t, I’ll post it here!
There is a thread somewhere on the forum where someone uses routines to set a level for the hue light and that kicks off either an automation or script (or both) depending on the light level setting. So that’s what I will attempt next.

then just get them all in that account :wink:
or you will need to create all routines identical in both accounts.
a routine is set in the app, so connected to an account.

yeah you can add a light to emulated hue and the use the brightness in different routines and use that as trigger for automations. (i do that also)

Anyone knows if it’s possible to do something like the Budweiser light? For example, I want to create a script that connects to an RSS feed or something similar where a live event such as an NHL game updates the script when my favourite team scores. This will trigger a sound to play on the Alexa and maybe even have the lights blink at the top…

Not sure if this is possible :slight_smile:

You can do this for sure with IFTTT

I found a hosted version for NHL live stats which serves JSON. The repo is https://github.com/peruukki/nhl-score-api

Example endpoint for the latest stats is https://nhl-score-api.herokuapp.com/api/scores/latest

You can scrape the api with a rest sensor https://www.home-assistant.io/components/rest/ and trigger an alexa message when your favorite team scores.

The difficult part will be the value_template to get the correct part out of the JSON message.

1 Like

I need to figure out if it’s easier to just create some kind of thirdparty url from this JSON where is fetches data as follows:

select data where variable scores changed (this variable will have to be manipulated since it holds both scores, so chages only where favorite team is).

New to this so will have to see what are my options on how to tackle this…

I got the scores out of that json, is there a way to split the value into several variables?

I want to split the state of this sensor into 4: 1st team name, 1st team score, 2nd team name, 2nd team score.

Then I want to create a trigger when the score of the team that equals to favorite team changes.

Ok I did something diff. Instead of getting all the score I technically need only the part of my favorite team. So lets say Carolina is my fav team code would be:

  - platform: rest
    name: NHL Scores
    resource: https://nhl-score-api.herokuapp.com/api/scores/latest
    value_template: '{{ value_json.games.0.scores.CAR }}'

This gives me:

Now I need to figure out the part where on change of sensor.nhl.scores play a specific sound on a specific alexa.

How do I make it play this song “https://open.spotify.com/track/4WjQgknajOEi2GFFgpXXt2” for only 5 secs on my media_player.living_room?

is it just me …trying to test the intergration thru hacs but no response from alexa’s

media players show up and also notify for alexa but no response at least from dev tools

FYI - I setup this one yesterday with no issue on the latest HA.

yea i think i have it figure out …syntax is no where the same as standard tts but i got announcemnet