Get raw audio of synthesized speech
How to get raw audio from text-to-speech synthesis.
Read time 1 minuteLast updated 7 months ago
You can synthesize speech into an audio buffer for your direct use rather than having it maintained internally by the Vivox SDK. synthesizes the speech signal and returns it in the form of a struct. This struct includes a pointer to the raw audio data, and metadata, such as buffer length and audio format properties.
vx_tts_speak_to_buffervx_tts_utterance_tvx_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);