The Home Assistant TTS (Text-to-Speech) feature leverages the voice synthesis capabilities of the CosyVoice large language model from the Aliyun BaiLian Platform.
Currently, only CosyVoice is supported. For more information, please refer to the Aliyun Documentation.
-
Go to the HACS panel, click the menu button in the top-right corner, and add a custom integration.
-
In the pop-up panel:
- Repository: Enter
/~https://github.com/itning/hass-aliyun_bailian_tts.git
- Type: Select
Integration
- Repository: Enter
-
Click the ADD button to save.
-
In HACS, search for the newly added integration:
Aliyun BaiLian TTS
. Click the Download button on the right side of the menu. -
After the download is complete, restart Home Assistant as prompted.
-
After restarting, go to Settings > Devices & Services, then click the button in the bottom-right corner to add an integration. Search for
Aliyun BaiLian TTS
and add it. -
Click on the added
Aliyun BaiLian TTS
to enter the configuration page. -
Click the Configure button, and enter your BaiLian Platform Token (https://bailian.console.aliyun.com/?apiKey=1#/api-key).
Voice list: https://help.aliyun.com/zh/model-studio/developer-reference/timbre-list
After entering the information, click Submit.
-
Click Settings > Voice Assistant > Modify Assistant, and change the engine to
Aliyun BaiLian TTS
. -
You're all set!
Most of the code in this project was generated by the large language model qwen-max-2025-01-25.