skip to Main Content

In flutter I am not able to play uint8List type as audio when streaming via websocket with just_audio package

Here is my code : try { _channel = IOWebSocketChannel.connect( 'wss://api.elevenlabs.io/v1/text-to-speech/$voiceId/stream-input?model_id=$model'); _channel!.stream.listen( (data) async { final response = jsonDecode(data); if (response['audio'] != null) { try{ final audioChunk = response['audio'] as String; final uint8List = Uint8List.fromList(base64.decode(audioChunk)); await _audioPlayer.setAudioSource( ConcatenatingAudioSource( children: […

VIEW QUESTION
Back To Top
Search