Closed Jaha96 closed 11 months ago
final String filePath = "path/to/file.mp3";
final File audioFile = File(filePath);
await audioFile.writeAsBytes(audioResponse.audio);
// OR
final base64Data = base64.encode(audioResponse.audio);
final dataUri = "data:audio/mpeg;base64,$base64Data";
And use any audio player for Flutter
ByteData audioBytes = ttsResponse.audio.buffer.asByteData());
Is there any suggested optimal workaround how to play this bytes in Flutter? or any library suggestions?
Thank you in advance.