Is it possible to insert a pause in a sentence when using TTS?
A full stop somewhere in a sentence does not add any pause.
I think this is platform dependent. Amazon Polly supports pausing if you use SSML
https://docs.aws.amazon.com/polly/latest/dg/supported-ssml.html
okayā¦ I use Google. I did try toā¦ yes Google it but didnĀ“t find anything.
See this link.
I found a few things online. i havent tried either of them yet.
https://stackoverflow.com/questions/4970204/how-to-pause-android-speech-tts-texttospeech
You can make the TTS pause between sentences, or anywhere you want by adding up to three periods (ā.ā) all followed by a single space " ".
and also:
https://developer.chrome.com/apps/tts
which has a bit about using the pause function towards the end of the page
thanks.
I have tried the three periods but it did not have any effect.
I guess the two other possibilities will not Work in HA?
In HA I use Google.say and not āspeakā so I guess the other commands are akso not allowed.
Amazon Polly is not Google. If you want to use SSML and imo much better voices you need to switch. Trust me, itās worth it. Follow the instructions in the link I posted above.
Thanksā¦ i take a look :slight_smile
Anyone figured out āpauseā in Google TTS? My amp goes into standby mode, so the first couple of words are cut out, would like to insert some pause that is part of the beginning of the mp3 HA generates.
You can use a delay in your script before the tts action.
But that wouldnāt go to the player. I found a way to do it with mp3wrap (i.e. preceding it with a 2 second silence mp3 if the last time it played was after 15 minutes which is the amp sleep time).
Well you could also turn the amp on, add a delay then do tts. Up to you whichever is easier I guess.
Yes, I guess if the amp had a way to control it remotely without adding an outlet. The amp is always on and goes into standby after 15 minutes of no signal.
Hi, yes, this should be possible.
Try thisā¦
For example, you want a pause at the end of the word 'closed;
Hello, we are currently closed
Add this {{Pause=450}} Increment the value for a longer pause. I believe this is 450 milliseconds
So, your sentence would be:
Hello, we are currently closed {{Pause=450}}
Our opening hoursā¦ etcā¦
when using this:
message: "Testing {{Pause=4500}} test"
I get the following error in the logs.
[homeassistant.components.homeassistant] Invalid config for [automation]: invalid template (TemplateSyntaxError: expected token āend of print statementā, got ā=ā) for dictionary value @ data[āactionā][6][ādata_templateā][āmessageā]. Got None. (See /home/homeassistant/.homeassistant/configuration.yaml, line 18). Please check the docs at https://home-assistant.io/components/automation/
I havenāt tested this but perhaps try putting a space either side of the =, and possibly also either side of the text within the curly brackets.
So:
message: "Testing {{ Pause = 4500 }} test"
Hi
I get exactly the same error.
Any luck yet on this one?
Having the same issue here.
No the pause part didnĀ“t work out for me.
This works for me
Decreasing the volume to 50%, speacking with a pause 2s and restoring the volume to 80%
- data:
entity_id: all
volume_level: 0.5
service: media_player.volume_set
- data:
language: es
message: first text.
entity_id: all
service: tts.google_say
- delay: '2'
- data:
language: es
message: Second text
entity_id: all
service: tts.google_say
- data:
entity_id: all
volume_level: 0.8
service: media_player.volume_set