openai
openai copied to clipboard
text to speech model returning mpeg file, not mp3
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;
} `