chengguo_audio_recorder 0.0.1+1 chengguo_audio_recorder: ^0.0.1+1 copied to clipboard
A flutter plugin for audio record.
flutter_audio_recorder #
A flutter plugin for audio record.
Note: This plugin is still under development, and some APIs might not be available yet. Feedback welcome and Pull Requests are most welcome!
Preview #
Support platform #
- Android
- iOS
Installation #
First, add chengguo_audio_recorder
as a
dependency in your pubspec.yaml file.
dependencies:
chengguo_audio_recorder
On iOS you need to add a usage description to info.plist
:
<key>NSMicrophoneUsageDescription</key>
<string>This sample uses the microphone to record your speech and convert it to text.</string>
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
</array>
Example #
- Start record
var path = await AudioRecorder.startRecord();
- Stop record
await AudioRecorder.stopRecord();
- Determine whether the recording
var isRecording = await AudioRecorder.isRecording();
Error code #
Error code | Remark |
---|---|
PERMISSION_DENIED | Request permission is denied. |
OPTIONS_ERROR | Options error. |