How to use openai text to speech to generate speech for different languages?
If your input is English, you can use the following code:
|
but what If you want to say the same input, but different language?
Is there a parameter called “language” in the text to speech API?
Sorry, there isn’t.
But actually, you should can first translate the input to the target language, and then pass the translation to the text to speech API, you can get the speech in your target language.