Baidu


The baidu text-to-speech platform uses Baidu TTS engine to read a text with natural sounding voices.

Configuration

To get started, add the following lines to your configuration.yamlThe configuration.yaml file is the main configuration file for Home Assistant. It lists the integrations to be loaded and their specific configurations. In some cases, the configuration needs to be edited manually directly in the configuration.yaml file. Most integrations can be configured in the UI.[Learn more] file. After changing the configuration.yamlThe configuration.yaml file is the main configuration file for Home Assistant. It lists the integrations to be loaded and their specific configurations. In some cases, the configuration needs to be edited manually directly in the configuration.yaml file. Most integrations can be configured in the UI.[Learn more] file, restart Home Assistant to apply the changes. To view the changes, go to Settings > Devices & services > Entities.

#Example configuration.yaml entry
tts:
  - platform: baidu
    app_id: YOUR_APPID
    api_key: YOUR_APIKEY
    secret_key: YOUR_SECRETKEY

Configuration Variables

app_id string Required

The App ID for the use this service, must be already registered on Baidu.

api_key string Required

The API key from Baidu.

secret_key string Required

The secret key from Baidu.

speed integer (Optional, default: 5)

Audio speed from 0 to 9.

pitch integer (Optional, default: 5)

Audio pitch from 0 to 9.

volume integer (Optional, default: 5)

Audio volume from 0 to 15.

person integer (Optional, default: 0)

The voice type. You choose one from 0, 1, 3, 4, 5, 103, 106, 110 or 111.

At the moment, zh is the only supported language and therefore the default value.