An open API service indexing awesome lists of open source software.

https://github.com/fingerart/flutter_audio_recorder

flutter_audio_recorder
https://github.com/fingerart/flutter_audio_recorder

audio-recorder flutter

Last synced: about 2 months ago
JSON representation

flutter_audio_recorder

Awesome Lists containing this project

README

        

# flutter_audio_recorder

[![pub package](https://img.shields.io/pub/v/chengguo_audio_recorder.svg)](https://pub.dartlang.org/packages/chengguo_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](https://github.com/FingerArt/flutter_audio_recorder/issues)
and
[Pull Requests](https://github.com/FingerArt/flutter_audio_recorder/pulls)
are most welcome!

## Preview

![chengguo-audio-recorder](./screenshots/chengguo-audio-recorder.gif)

## Support platform

- [x] Android
- [x] iOS

## Installation

First, add `chengguo_audio_recorder` as a
[dependency in your pubspec.yaml file](https://flutter.io/platform-plugins/).

```yaml
dependencies:
chengguo_audio_recorder
```

On iOS you need to add a usage description to `info.plist`:

```xml
NSMicrophoneUsageDescription
This sample uses the microphone to record your speech and convert it to text.
UIBackgroundModes

audio

```

## Example

1. Start record

```dart
var path = await AudioRecorder.startRecord();
```

2. Stop record

```dart
await AudioRecorder.stopRecord();
```

3. Determine whether the recording

```dart
var isRecording = await AudioRecorder.isRecording();
```

## Error code

| Error code | Remark |
|---| --- |
| PERMISSION_DENIED | Request permission is denied. |
| OPTIONS_ERROR | Options error. |