Skip to main content

build_google_request

Function build_google_request 

Source
pub fn build_google_request(
    text: &str,
    voice: &str,
    add_marks: bool,
    input_ssml: Option<&str>,
) -> (Value, Vec<String>)
Expand description

Build JSON body for Google TTS REST API.

When input_ssml is Some, it is sent directly as Google’s "ssml" input (used when tts_speak_ssml passes W3C SSML with the <voice> wrapper already stripped). Otherwise the text/marks path builds Google SSML or plain text from text.