文档

支持

Vivox Core SDK

Vivox Core SDK

Text-to-speech voice options

Choose text-to-speech voices and options.
阅读时间1 分钟最后更新于 12 天前

Before you inject a text-to-speech (TTS) message, you can choose the voice to use for synthesizing speech. Two voices are available: male and female. To list all available voices, use
vx_tts_get_voices
, which is displayed in the following example:
int numVoices;vx_tts_voice_t *voices;vx_tts_status status = vx_tts_get_voices(managerId, &numVoices, &voices);
vx_tts_voice_t
is a struct that contains the name of the voice and its ID.
vx_tts_get_voices
returns a pointer to an array of
vx_tts_voice_t
structs of length
numVoices
.
You can choose a voice ID to save for global use, or you can allow a user to choose their own voice ID.