Documentation

Support

Vivox Core SDK

Vivox Core SDK

Get raw audio of synthesized speech

How to get raw audio from text-to-speech synthesis.
Read time 1 minuteLast updated 20 hours ago

You can synthesize speech into an audio buffer for your direct use rather than having it maintained internally by the Vivox SDK.
vx_tts_speak_to_buffer
synthesizes the speech signal and returns it in the form of a
vx_tts_utterance_t
struct. This struct includes a pointer to the raw audio data, and metadata, such as buffer length and audio format properties.
vx_tts_utterance_t *utterance = NULL;vx_tts_status status = vx_tts_speak_to_buffer(managerId, voiceId, "Gimme the audio samples", &utterance);// If succeeds, utterance will contain the audio samples and the metadata for the synthesized speech.
vx_tts_status status = vx_tts_destroy_utterance(managerId, utterance);