flutter_sound icon indicating copy to clipboard operation
flutter_sound copied to clipboard

[HELP]:Unhandled Exception: Instance of '_CodecNotSupportedException'

Open quisvox opened this issue 4 years ago • 5 comments

  • Using the API ? startRecorder()

  • Generate an iOS or Android App ? Android


Here is my question :

I use this code: await _myRecorder.startRecorder( toFile: path, codec: Codec.pcm16, sampleRate: 16000, numChannels: 1);

and Exception

[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Instance of '_CodecNotSupportedException'

flutter_sound is not support PCM ?

quisvox avatar Dec 10 '21 07:12 quisvox

me too.

Flutter 2.8.0 on real device (android 7.1)

by all Codecs I get this.

Update:

I realized that the file extension must be compatible with the codec. I think this is an additional operation. Maybe I would like my file extension to be different from codec.

audioRecorder.startRecorder(
        toFile: '$audioRecPath.amr',
          audioSource: AudioSource.microphone,
        codec: Codec.amrWB
      );

This throws an error:

audioRecorder.startRecorder(
        toFile: '$audioRecPath.aac',   <<-- aac
          audioSource: AudioSource.microphone,
        codec: Codec.amrWB          <<-- amr
      );

this is bad. very bad.

ali-1989 avatar Dec 24 '21 10:12 ali-1989

Yes, same problem, shouldn't depend on the file extension

Malik056 avatar Dec 26 '21 02:12 Malik056

Yes, same problem for me, specially on codec: Codec.mp3 For default codec and accMp4 work fine.

EuHigorBarbosa avatar Mar 28 '22 13:03 EuHigorBarbosa

Record mp3 nor raw pcm are supported. Please refer to https://flutter-sound.canardoux.xyz/guides_codec.html

Larpoux avatar Mar 28 '22 13:03 Larpoux

Record mp3 are also unsupported now

twopai avatar May 21 '22 02:05 twopai

This issue is stale because it has been open 90 days with no activity. Leave a comment or this will be closed in 7 days.

github-actions[bot] avatar Dec 08 '23 01:12 github-actions[bot]