openai icon indicating copy to clipboard operation
openai copied to clipboard

text to speech model returning mpeg file, not mp3

Open Lazizbek97 opened this issue 1 year ago • 3 comments
trafficstars

When we use text to speech model: model: "tts-1"; it is returning .mpeg file, and i cannot listen it on app. it should return mp3, so that i can listen it on app.

` // create speech from text Future<File> createSpeech(String prompt) async { final appDir = await getApplicationDocumentsDirectory(); // The speech request. File speechFile = await OpenAI.instance.audio.createSpeech( model: "tts-1", input: prompt, voice: "nova", responseFormat: OpenAIAudioSpeechResponseFormat.mp3, outputFileName: "speech", outputDirectory: appDir, );

return speechFile;

} `

Lazizbek97 avatar Jun 09 '24 07:06 Lazizbek97