Skip to content

hasscc/hass-edge-tts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

57 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Microsoft Edge TTS for Home Assistant

This component is based on the TTS service of Microsoft Edge browser, no need to apply for app_key.

Install

Install repository

Download and copy custom_components/edge_tts folder to custom_components folder in your HomeAssistant config folder

# Auto install via terminal shell wget -O - https://hacs.vip/get | DOMAIN=edge_tts REPO_PATH=hasscc/hass-edge-tts ARCHIVE_TAG=main bash -

Config

[UI: config - integrations - add integration - Microsoft Edge TTS ]

Add Integration

add integration
add integration
config option
config option
entity
entity
call service
call service

Supported languages

Using

Options

style / styledegree / role / contour are no longer supported (#8).

Basic example

action: tts.speak target: entity_id: tts.edge_tts data: media_player_entity_id: media_player.your_player_entity_id message: Hello language: zh-CN-XiaoyiNeural # Language or voice (Optional)

Full example

action: tts.speak target: entity_id: tts.edge_tts data: media_player_entity_id: media_player.your_player_entity_id message: ๅƒ่‘ก่„ไธๅ่‘ก่„็šฎ๏ผŒไธๅƒ่‘ก่„ๅ€’ๅ่‘ก่„็šฎ language: zh-CN cache: true options: voice: zh-CN-XiaoyiNeural rate: +0% volume: +10% preferred_format: mp3 # value is a file extension like wav, mp3, ogg, etc

More examples

curl -X POST -H "Authorization: Bearer <ACCESS TOKEN>" \ -H "Content-Type: application/json" \ -d '{"engine_id": "tts.edge_tts", "message": "ๆฌข่ฟŽๅ›žๅฎถ", "language": "zh-CN-XiaoyiNeural", "cache": true, "options": {"volume": "+10%"}}' \ http://homeassistant.local:8123/api/tts_get_url
curl -o hello.mp3 'http://homeassistant.local:8123/api/tts_proxy/edge?rate=+20%&message=hello&token=<tts_token>'

The tts_token can be found in the tts entity attributes.

Thanks

About

๐Ÿ—ฃ๏ธ Microsoft Edge TTS for Home Assistant, no need for app_key

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 12

Languages