mobile_audio_recorder 1.0.0+1 mobile_audio_recorder: ^1.0.0+1 copied to clipboard
A new flutter plugin project.
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 Mono (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"/>
Example: #
// start recording
MobileAudioRecorder.start(
format: FormatAAC,
onData: (Uint8List buffer) {
// do something
},
);
Future.delayed(Duration(seconds: 2)).then((value) {
// stop recording
MobileAudioRecorder.stop();
});