hasscc / hass-edge-tts

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

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

# configuration.yaml
tts:
  - platform: edge_tts
    language: zh-CN # Default language or voice (Optional)

Configure default options:

tts:
  - platform: edge_tts
    service_name: xiaomo_say # service: tts.xiaomo_say
    language: zh-CN-XiaoxiaoNeural
    volume: +10%

Supported languages

Using

Options

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

Basic example

service: tts.edge_tts_say
data:
  entity_id: media_player.your_player_entity_id
  message: Hello
  language: zh-CN-XiaoyiNeural # Language or voice (Optional)

Full example

service: tts.edge_tts_say
data:
  entity_id: media_player.your_player_entity_id
  message: ๅƒ่‘ก่„ไธๅ่‘ก่„็šฎ๏ผŒไธๅƒ่‘ก่„ๅ€’ๅ่‘ก่„็šฎ
  language: zh-CN
  cache: true
  options:
    voice: zh-CN-XiaoyiNeural
    rate: +0%
    volume: +10%
    

Curl example

curl -X POST -H "Authorization: Bearer <ACCESS TOKEN>" \
     -H "Content-Type: application/json" \
     -d '{"platform": "edge_tts", "message": "ๆฌข่ฟŽๅ›žๅฎถ", "language": "zh-CN-XiaoyiNeural", "cache": true, "options": {"volume": "+10%"}}' \
     http://home-assistant.local:8123/api/tts_get_url

Thanks

About

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


Languages

Language:Python 100.0%