Microsoft Text-to-Speech (TTS)
The microsoft
text-to-speech integration集成将 Home Assistant 与您的设备、服务等连接和集成。 [Learn more] uses the TTS engine of the Microsoft Speech Service
Configuration
To enable text-to-speech with Microsoft, add the following lines to your configuration.yaml
configuration.yaml 文件是 Home Assistant 的主要配置文件。它列出了要加载的集成及其特定配置。在某些情况下,需要直接在 configuration.yaml 文件中手动编辑配置。大多数集成可以在 UI 中配置。 [Learn more] file.
在更改了configuration.yaml
configuration.yaml 文件是 Home Assistant 的主要配置文件。它列出了要加载的集成及其特定配置。在某些情况下,需要直接在 configuration.yaml 文件中手动编辑配置。大多数集成可以在 UI 中配置。 [Learn more] 文件后,重启 Home Assistant 以应用更改。 该集成现在显示在集成页面的 设置 > 设备与服务 下。其实体在集成卡片上以及实体标签上列出。
# Example configuration.yaml entry
tts:
- platform: microsoft
api_key: YOUR_API_KEY
Configuration Variables
The language to use. Note that if you set the language to anything other than the default, you will need to specify a matching voice type as well. For the supported languages check the list of available languages
The gender you would like to use for the voice. Accepted values are Female
and Male
.
The voice type you want to use. Accepted values are listed as the service name mapping in the documentation
JennyNeural
Change the rate of speaking in percentage. Example values: 25
, 50
.
Change the volume of the output in percentage. Example values: -20
, 70
.
Change the contour of the output in percentages. This overrides the pitch setting. See the W3 SSML specification(0%, -1st) (100%, +10st)
.
The region of your API endpoint. See documentation
Not all Azure regions support high-quality neural voices. Use this overview
New users (any newly created Azure Speech resource after August 31st, 2021
If you set the language to anything other than the default en-us
, you will need to specify a matching voice type as well.
Full configuration example
A full configuration sample including optional variables:
# Example configuration.yaml entry
tts:
- platform: microsoft
api_key: YOUR_API_KEY
language: en-gb
gender: Male
type: RyanNeural
rate: 20
volume: -50
pitch: high
contour: (0%, -1st) (100%, +10st)
region: eastus