Thanks to visit codestin.com
Credit goes to github.com

Skip to content

hasscc/hass-edge-tts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 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

Curl example

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://home-assistant.local:8123/api/tts_get_url

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