#How to play previous stream after tts.speak
29 messages · Page 1 of 1 (latest)
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
How to play previous stream after tts.speak
media_player should allow announcements. Like Music Assistant players, or new PE ESP media_player component. They can do announcements.
Background This package started somewhere in 2020 as a simple script to resume a Google Cast device after it was interrupted by a TTS message. During the years more functionality was added, the Cast devices can also be resumed after playing an audio file, or casting a Home Assistant Dasboard. In the past years I also created others scripts usin...
I personally play streaming radio stations and stuff,. I don't know if this will help that.
A solution to this issue might be to use ChimeTTS:
https://community.home-assistant.io/t/chime-tts-play-audio-before-after-tts-audio-lag-free/578430
Chime TTS Link to GitHub Link to Wiki Chime TTS is a custom integration for Home Assistant that combines audio files with Text-to-Speech (TTS) audio locally, creating seamless playback without any lag or timing issues caused by cloud TTS processing and networking delays - perfect for playing a notification sound with a TTS notification. Insta...
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 😄
Music Assistant does that to all its players automatically too.
Music Assistant can do TTS and merge mp3 sound effects with the (spoken) text?
No, it does stop playback, plays "Ding-ding", then TTS, then resumes playback.
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.
You can resume the currently playing music on HomePods after a TTS announcement when using Chime TTS via its announce parameter.
The official wiki for Chime TTS, a custom Home Assistant integration.
@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 🙂
Chime TTS does not go out to the internet - it's entirely local (unless you're using a cloud-based TTS platform)
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
on my install of ChimeTTS it shows a BUNCH of tts options:
thats all of them for me...
lots of online and then local choices
Piper for instance is the one I use a lot
Sorta looks like the blueprint I made for TTS.
Chime TTS creates a new mp3 file made up of a sound effect file combined with TTS audio. This allows for playback of the two without any lag between the them.
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.
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 😄
You won’t need to change much, in your scripts. Just replace the tts.speak action with chime_tts.say.