Appreciate the good work. Anyone interested in this can try the sample voices from this url. It illustrates all the styles of the voices including speed and pitch.
I can’t get this to work.
Alexa complains, says:
Sorry, text to speech can only be called with the notify dot Alexa underscore media service. Please see the Alexa underscore media wiki for details.
https://github.com/hasscc/hass-edge-tts
# Auto install via terminal shell
wget -O - https://raw.githubusercontent.com/hasscc/get/main/get | DOMAIN=edge_tts REPO_PATH=hasscc/hass-edge-tts ARCHIVE_TAG=main bash -
[core-ssh custom_components]$ wget -O - https://raw.githubusercontent.com/hasscc/get/main/get | DOMAIN=edge_tts REPO_PATH=hasscc/hass-edge-tts ARCHIVE_TAG=main bash -
Connecting to raw.githubusercontent.com (185.199.109.133:443)
writing to stdout
- 100% |********************************| 3970 0:00:00 ETA
written to stdout
INFO: Archive URL: https://github.com/hasscc/hass-edge-tts/archive/main.zip
INFO: Trying to find the correct directory...
INFO: Found Home Assistant configuration directory at '/config'
INFO: Changing to the custom_components directory...
INFO: Downloading...
Connecting to github.com (140.82.113.4:443)
Connecting to codeload.github.com (140.82.112.9:443)
saving to '/config/custom_components/main.zip'
main.zip 100% |********************************| 8333 0:00:00 ETA
'/config/custom_components/main.zip' saved
INFO: Unpacking...
INFO: Removing temp files...
INFO: Installation complete.
INFO: 安装成功!
INFO: Remember to restart Home Assistant before you configure it.
INFO: 请重启 Home Assistant
[core-ssh custom_components]$ ls
alexa_media hacs xiaomi_miot
edge_tts old.install.sh
[core-ssh custom_components]$
restart, then:
add edge_tts to configuration.yaml:
# Text to speech
tts:
- platform: google_translate
- platform: edge_tts
language: en-US # Default language or voice (Optional)
test in Developer Tools:
service: tts.edge_tts_say
data:
entity_id: media_player.william_s_office_echo_dot
message: >-
You can replace this text with any text you wish. You can either write in
this text box or paste your own text here. Try different languages and
voices. Change the speed and the pitch of the voice. You can even tweak the
SSML (Speech Synthesis Markup Language) to control how the different
sections of the text sound. Click on SSML above to give it a try! Enjoy
using Text to Speech!
options:
voice: Eric (neural)
Alexa complains, says:
Sorry, text to speech can only be called with the notify dot Alexa underscore media service. Please see the Alexa underscore media wiki for details.
Thanks a lot for your great integration! This works very well for me with Google Nest devices. However, I have two questions:
The language/role setting did not work for me. Whatever role I choose, I always hear the same voice, likely YoungAdultFemale. Also the sound does not change with the language set to either Xiaomo or Xiaoxiao.
I found that Azure TTS actually support prepending sound effect before the speech by SSML (doc). Is there a way to achieve this with this integration?
Thanks in advance!
EDIT: seems like 2 is no longer possible: edge-tts