You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 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;
}
`
The text was updated successfully, but these errors were encountered:
Hey!
I've been able to play the mpeg file using the just_audio library and it works fine! I also tried just changing the file name to .mp3 and it worked as well.
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 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,
);
}
`
The text was updated successfully, but these errors were encountered: