mobile_audio_recorder 1.0.0+4

Flutter Android iOS

This is a flutter plugin for recording audio for Android only. You can read the samples from the microphone and choose the desired sample rate.

mobile_audio_recorder #

This is a flutter plugin for recording audio for Android only. Not support IOS. You can read the samples from the microphone .

Current features:

  • Support format aac (default)
  • Support format mp3
  • Support format pcm

Limitations:

  • Only support 16bit/8bit Mono/Stereo (for now)
  • Only support Android (for now)

Permissions #

Make sure you have microphone recording permissions enabled for your project. To do so, add this line to the AndroidManifest.xml:

<uses-permission android:name="android.permission.RECORD_AUDIO"/>

AAC/MP3 SampleRate and BitRate #

SampleRateBitRate
800016000 ~ 48000
1102516000 ~ 48000
1200024000 ~ 64000
1600024000 ~ 96000
2205032000 ~ 128000
2400032000 ~ 128000
3200048000 ~ 192000
4410064000 ~ 320000
4800064000 ~ 320000

Example: #

    // start recording
    await MobileAudioRecorder.start(
        format: FormatAAC,
        sampleRate: 44100,
        sampleRate: 96000,
        channel: ChannelInMono ,// ChannelInStereo
        audioFormat: EncodingPcm16Bit  ,// EncodingPcm8Bit,
        onData: (Uint8List buffer) {
            // do something
        },
    );

    Future.delayed(Duration(seconds: 2)).then((value) {
        // stop recording
        MobileAudioRecorder.stop();
    });
0
likes
100
pub points
28%
popularity

This is a flutter plugin for recording audio for Android only. You can read the samples from the microphone and choose the desired sample rate.

Repository (GitLab)
View/report issues

Documentation

API reference

Uploader

zuiwuchang@gmail.com

License

BSD (LICENSE)

Dependencies

flutter, permission_handler

More

Packages that depend on mobile_audio_recorder