Hi there!
Would like to know whitch devices I can use for tts. Google tts is just fine, as I know, so, how should I search the device? Do I need google home, or other speakers are just fine?
I just do not know how to choose. As I understand, it should have wi fi?
And I do not really understand how it works. Home assistant sends text, google tts get it and send info to speaker? Where is text processed? Google’s server? Or on pi (or whatever you are on)? Or on speaker? And can pi send tts by bluetooth, or only via wi-fi router?
———————————
Upd:
Now I am stuck with one question. How to send local mp3 file to media player?
I have JBL Playlist 150 and it goes to sleep after around 15 minutes of rest. If then I send a message to it, it will eat first word (does not pronounce). So I need to send some “ding” sound to it first. Or is there another way to wake it up? Service media_player.turn_on does not do anything. Setting up volume does not help either
The google TTS engine just produces an audio file of whatever you requested it say. HA can then tell a media_player device to play that through a HTTP stream made available on the HA webserver. Further detail here
JBL Playlist 150 has google cast, so it should be controlled via google cast component?
So it should be possible to send audio file to it using google tts (russian language)
Am I getting everything right?
No - TTS converts your text into an audio file (MP3 by default) and then the speaker plays the audio file. The speaker doesn’t provide the TTS capability - HA does.
Yes, which will give you all the features of any other cast device.
One more issue. I have JBL Playlist 150 and it goes to sleep after around 20 minutes of rest. If then I send a message to it, it will eat first word (does not pronounce). If it is not “asleep” it says everything just fine. I tried to use service media_player.turn_on but that did not help - speaker was still asleep after that (I used 5 seconds delay after that). Then I tried to send “.” first, wait, then send main command. That did not work out too. Speaker does not wake up from first “.”
Need help on this. Here is my script for now:
'15517202925102':
alias: Say good morning
sequence:
- service: tts.google_translate_say
entity_id: media_player.kabin
data:
message: "."
- service: media_player.volume_set
entity_id: media_player.kabin
data:
volume_level: 0.4
- delay: 0:0:2
- service: cover.open_cover
entity_id: cover.curtain_158d0002c54874
- delay: 0:0:3
- service: switch.turn_on
entity_id: switch.wall_switch_right_158d00022363c5
- service: tts.google_translate_say
entity_id: media_player.kabin
data_template:
message: "Доброе утро. Сейчас {{states('sensor.time')}} утра. В Москве {{states('sensor.outdoor_temperature')|int}} градусов. До работы ехать {{states('sensor.waze_travel_time')}} минут."
Check to see if you can detect this with the state of the player. Maybe too after you wake it up you need to play something that makes an actual sound, a full stop may not. For example you could use a media_player.media_play command to play an MP3 file that goes “ding”, wait a few seconds, then make your TTS call.
I tried to say “good morning” first then wait and send main message. That worked - i heard “rning” and then my message. But how should I make “ding” sound? Is it even possible to play mp3 file from config folder?
Isn’t that common issue? Guys, do you use google home? How does it work in this scenario? Does not it eat first word after sleeping? I have just bought the speaker and can return it and go with another one.
As before, just want to be sure witch model works perfectly (and is not pricy, actually).
As I found out speaker wakes up only if I send 5 or more letters. Sending “hi” did not work. It was not pronounced and after delay first word of my main phrase again was eaten. If i use more letters like “heelloo” - I hear “loo” and then my main phrase.
I am doing something wrong with mp3 file.
This works:
- service: media_player.play_media
data:
entity_id: media_player.kabin
media_content_id: http://resources.schoolscience.co.uk/CDA/CD/files/sound/decorativelamp.mp3
media_content_type: music
But if I want to use local file - I get nothing.
- service: media_player.play_media
data:
entity_id: media_player.kabin
media_content_id: https://myduck.duckdns.org:8123/local/sounds/decorativelamp.mp3
media_content_type: music
I even tried to write this in configuration.yaml but that did not work out again