Pause spotify, use TTS, continue spotify

I was looking for an example configuration on how to pause a playing spotify, use tts (text to speech) to say something relevant and then continue playing spotify again.

Currently tts just stops spotify. Im using a chromescast audio for playing music. but I want my HA notifications also on the same speakers. But without ruining my music…

Even better would be if the audio can be mixed…lower music volume and overlay speech. But I understand that my hardware (chromecast) is not capable of that.

I struggle with this as well. Would love to know what type of hardware I would need to buy/build to mix signals but because the CCA directly pulls the music, I don’t think it would be possible without an intermediate source.

What I have done though is prevent TTS from stopping music from playing. so when the party is going and music is playing, it doesn’t stop to let me know that the thermostat just turned on. :slight_smile:

https://github.com/CCOSTAN/Home-AssistantConfig/blob/master/script/voice_notify.yaml#L34-L43

Has anyone ever found a solution to this problem?

Hey Carlos. That link is no longer valid. Could you possibly let me know how you achieve this now as I’m about to start walking with a limp as when my wife is playing music and it stops because of a notification, I get yelled at :frowning:

I’d like to send notifications to all six Google Homes and all three Echo Dot’s (Alexa Media Player installed) but exclude any device that has media_content_type: music. Is that doable?

1 Like

I don’t have this issue any more since I Stream music via echos and TTS via CCA and then just use a mixer to mix the tracks together (so TTS plays right over the music a little louder).

But you could do some fancy jinja to check for music playing… should work… here’s some jinja that might get you on your way.

This is something that I also would like to do (to resume playing after a TTS notification).
I found a thread that might help into achieve this, but if possible, we would have to adapt to our needs, since it is a islamic prayer system. It uses Google home but I think it can be used with CCA instead.
The thread is here.

What This Automation Does: When it is time for the prayer, in the below sequence ->

All the media in the house is muted/paused
The volume of the Google Home devices is adjusted (super low for early morning ~5am prayer)
The Adhan plays 5 times a day at the correct prayer time. All at the same time through all the speakers (synchronized)
All the media in the house is un-muted/un-paused to resume previous activity and state

Thanks Carlos. Sorry, I forget you were using a mixer. I found a solution that seems to work very well now.

1 Like