Cant find the encoding options from google-text-to-speech api

Viewed 12

Hello im beginner and try to use the TTS api from google, the official example works fine, but i want the output of the file to be WAV format (or LINEAR16) I cant find the proper function for this, only the mp3 one from the example. Can anyone please explain me how to find a function like this? I was looking in the official api reference https://cloud.google.com/speech-to-text/docs/reference/rpc/google.cloud.speech.v1 but couldnt find any solution. this is the example: `

    var input = new SynthesisInput
    {
        Text = "This is a Test."
    };
    var voiceSelection = new VoiceSelectionParams
    {
        LanguageCode = "en-US",
        SsmlGender = SsmlVoiceGender.Female
    };

    var audioConfig = new AudioConfig
    {
        AudioEncoding = AudioEncoding.Mp3 //<- AudioEncoding.LINEAR16 didnt work and i cant find a list of available options for it pls help :(
    };
    var response = client.SynthesizeSpeech(input, voiceSelection, audioConfig);`
0 Answers
Related