#How to play previous stream after tts.speak

29 messages · Page 1 of 1 (latest)

molten elbow
#

I use tts.speak to notify me when the door opens. I would like the notification to pause the music, play tts.speak and then resume the music if music is playing. Is there any way to save the original stream and then resume it again? Similar to the way the navigation in the car speaks.

I'm using airplay (homepod mini)

clear ore
#

Hi @molten elbow,
Ya, we'd all love that. I've resorted to adding another google in my garage for music and announcements on the other one so I don't have to keep yelling at it to resume.
There is a project out there that shows a way ti get Google to originate the TTS with local scripts (Google scenes) but way too annoying fur me.
The problem lies where Google is playing the music, then HA jumps in and asks for a service, and there no hand off.
Use this search in a search engine to learn more:

site:community.home-assistant.io google stops music when TTS

still pollen
#

How to play previous stream after tts.speak

median hound
#

media_player should allow announcements. Like Music Assistant players, or new PE ESP media_player component. They can do announcements.

serene sand
#
clear ore
#

I personally play streaming radio stations and stuff,. I don't know if this will help that.

opaque hedge
#
#

ChimeTTS can reduce the volume of the currently playing music/audio for the duration of the announcement and then resume the volume level when the announcement is done:

#

I don't think this will help if you want to pause the music for an announcement and then resume it afterwards though.

#

I also really like ChimeTTS as I can make an announcement tone to alert folks to the fact that an announcement is forthcoming. I use the two-tone chime that is used in airplan cabins before the captain speaks 😄

median hound
opaque hedge
#

Music Assistant can do TTS and merge mp3 sound effects with the (spoken) text?

median hound
#

No, it does stop playback, plays "Ding-ding", then TTS, then resumes playback.

jovial harness
#

I don't know how much of these responses are Google specific, but OP was talking about HomePods. I use HomePods as well @molten elbow and that is a very frustrating issue I deal with as well. My only solution is to TTS to my HomePods via AirFoil on a Mac and use that same Mac for music playback if I need it to keep playing after the TTS. This issue doesn't bother me as much but it drives my wife up a wall when she's playing her favorite playlist and my system announces someone is at the door and she can say "resume" until the cows come up and it's ignored, she has to start a new playlist again.

While Music Assistant might be an interesting answer, and I think MA is pretty cool, it's another element to add complexity to your home automation system. This is nobody's fault, really, it's just how these speakers work.

rustic star
jovial harness
#

@rustic star for me that's sort of counter intuitive to go with Chime (I did read up on it and even installed it to play around) because I don't go to the cloud to get my TTS, I use AirFoil that uses the Mac's built-in TTS system which requires no internet at all so by switching to Chime I actually become more reliant on the Internet. I also totally understand that this is a trade-off, I'm going to stop music playback with my TTS in the current setup but that is the price for not using a cool integration that might fix that but then makes me use online TTS. It's a catch 22 🙂

rustic star
jovial harness
#

I guess I didn't see how it can call my current TTS script that sends it to my mac, my options were Google or HA cloud

opaque hedge
#

thats all of them for me...

#

lots of online and then local choices

#

Piper for instance is the one I use a lot

clear ore
#

Sorta looks like the blueprint I made for TTS.

rustic star
rustic star
# jovial harness I guess I didn't see how it can call my current TTS script that sends it to my m...

If you want to be able to access the Chime TTS file as part of your script - you can use the chime_tts.say_url action to generate the file and receive its file path.

The chimetts.sayurl action generates an audio file with the chimetts.say action and returns either a publicly accessible URL or a media content id to the generated file.

jovial harness
#

That's interesting, I'll have to take a deeper dive into Chime. It'll be an adjustment for me to rewrite my system to use MP3 instead of text (again, Mac can translate TTS offline instantly). The primary goal would be to stop pissing off my wife every time I have one of my numerous announcements throughout the day when she wants to just listen to some obscure playlist 😄

rustic star
#

You won’t need to change much, in your scripts. Just replace the tts.speak action with chime_tts.say.