{"id":21423901,"url":"https://github.com/picovoice/flutter-voice-processor","last_synced_at":"2025-07-14T08:31:38.740Z","repository":{"id":40557026,"uuid":"317701911","full_name":"Picovoice/flutter-voice-processor","owner":"Picovoice","description":"Flutter audio recording plugin designed for real-time speech audio processing","archived":false,"fork":false,"pushed_at":"2024-06-28T17:57:26.000Z","size":14810,"stargazers_count":25,"open_issues_count":0,"forks_count":6,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-06-29T01:18:36.212Z","etag":null,"topics":["android","audio","audio-processing","audio-recorder","dart","flutter","ios","java","swift"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Picovoice.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-02T00:11:50.000Z","updated_at":"2024-06-28T17:57:27.000Z","dependencies_parsed_at":"2024-10-25T23:33:13.299Z","dependency_job_id":"2ca64591-273c-4499-93c2-1c6d9e16af7d","html_url":"https://github.com/Picovoice/flutter-voice-processor","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Picovoice/flutter-voice-processor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Picovoice%2Fflutter-voice-processor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Picovoice%2Fflutter-voice-processor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Picovoice%2Fflutter-voice-processor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Picovoice%2Fflutter-voice-processor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Picovoice","download_url":"https://codeload.github.com/Picovoice/flutter-voice-processor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Picovoice%2Fflutter-voice-processor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265262607,"owners_count":23736428,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","audio","audio-processing","audio-recorder","dart","flutter","ios","java","swift"],"created_at":"2024-11-22T21:18:51.908Z","updated_at":"2025-07-14T08:31:33.726Z","avatar_url":"https://github.com/Picovoice.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flutter Voice Processor\n\n[![GitHub release](https://img.shields.io/github/release/Picovoice/flutter-voice-processor.svg)](https://github.com/Picovoice/flutter-voice-processor/releases)\n[![GitHub](https://img.shields.io/github/license/Picovoice/flutter-voice-processor)](https://github.com/Picovoice/flutter-voice-processor/)\n\n[![Pub Version](https://img.shields.io/pub/v/flutter_voice_processor)](https://pub.dev/packages/flutter_voice_processor)\n\nMade in Vancouver, Canada by [Picovoice](https://picovoice.ai)\n\n\u003c!-- markdown-link-check-disable --\u003e\n[![Twitter URL](https://img.shields.io/twitter/url?label=%40AiPicovoice\u0026style=social\u0026url=https%3A%2F%2Ftwitter.com%2FAiPicovoice)](https://twitter.com/AiPicovoice)\n\u003c!-- markdown-link-check-enable --\u003e\n[![YouTube Channel Views](https://img.shields.io/youtube/channel/views/UCAdi9sTCXLosG1XeqDwLx7w?label=YouTube\u0026style=social)](https://www.youtube.com/channel/UCAdi9sTCXLosG1XeqDwLx7w)\n\nThe Flutter Voice Processor is an asynchronous audio capture library designed for real-time audio\nprocessing on mobile devices. Given some specifications, the library delivers frames of raw audio\ndata (16-bit, mono PCM) to the user via listeners.\n\n## Table of Contents\n\n- [Flutter Voice Processor](#flutter-voice-processor)\n    - [Table of Contents](#table-of-contents)\n    - [Requirements](#requirements)\n    - [Compatibility](#compatibility)\n    - [Installation](#installation)\n    - [Permissions](#permissions)\n    - [Usage](#usage)\n        - [Capturing with Multiple Listeners](#capturing-with-multiple-listeners)\n    - [Example](#example)\n\n## Requirements\n\n- [Flutter SDK](https://docs.flutter.dev/get-started/install)\n- [Android SDK](https://developer.android.com/about/versions/12/setup-sdk) (21+)\n- [JDK](https://www.oracle.com/java/technologies/downloads/) (8+)\n- [Xcode](https://developer.apple.com/xcode/) (11+)\n- [CocoaPods](https://cocoapods.org/)\n\n## Compatibility\n\n- Flutter 1.20.0+\n- Android 5.0+ (API 21+)\n- iOS 13.0+\n\n## Installation\n\nFlutter Voice Processor is available via [pub.dev](https://pub.dev/packages/flutter_voice_processor).\nTo import it into your Flutter project, add the following line to your `pubspec.yaml`:\n```yaml\ndependencies:\n  flutter_voice_processor: ^\u003cversion\u003e\n```\n\n## Permissions\n\nTo enable recording with the hardware's microphone, you must first ensure that you have enabled the proper permission on both iOS and Android.\n\nOn iOS, open the `Info.plist` file and add the following line:\n```xml\n\u003ckey\u003eNSMicrophoneUsageDescription\u003c/key\u003e\n\u003cstring\u003e[Permission explanation]\u003c/string\u003e\n```\n\nOn Android, open the `AndroidManifest.xml` and add the following line:\n```xml\n\u003cuses-permission android:name=\"android.permission.RECORD_AUDIO\" /\u003e\n```\n\nSee our [example app](./example) for how to properly request this permission from your users.\n\n## Usage\n\nAccess the singleton instance of `VoiceProcessor`:\n\n```dart\nimport 'package:flutter_voice_processor/flutter_voice_processor.dart';\n\nVoiceProcessor? _voiceProcessor = VoiceProcessor.instance;\n```\n\nAdd listeners for audio frames and errors:\n\n```dart\nVoiceProcessorFrameListener frameListener = (List\u003cint\u003e frame) {\n    // use audio\n}\n\nVoiceProcessorErrorListener errorListener = (VoiceProcessorException error) {\n    // handle error\n}\n\n_voiceProcessor?.addFrameListener(frameListener);\n_voiceProcessor?.addErrorListener(errorListener);\n```\n\nAsk for audio record permission and start recording with the desired frame length and audio sample rate:\n\n```dart\nfinal int frameLength = 512;\nfinal int sampleRate = 16000;\nif (await _voiceProcessor?.hasRecordAudioPermission() ?? false) {\n    try {\n        await _voiceProcessor?.start(frameLength, sampleRate);\n    } on PlatformException catch (ex) {\n        // handle start error\n    }\n} else {\n    // user did not grant permission\n}\n```\n\nStop audio capture:\n```dart\ntry {\n    await _voiceProcessor?.stop();\n} on PlatformException catch (ex) {\n    // handle stop error\n}\n```\n\nOnce audio capture has started successfully, any frame listeners assigned to the `VoiceProcessor` will start receiving audio frames with the given `frameLength` and `sampleRate`.\n\n### Capturing with Multiple Listeners\n\nAny number of listeners can be added to and removed from the `VoiceProcessor` instance. However,\nthe instance can only record audio with a single audio configuration (`frameLength` and `sampleRate`),\nwhich all listeners will receive once a call to `start()` has been made. To add multiple listeners:\n```dart\nVoiceProcessorFrameListener listener1 = (frame) { }\nVoiceProcessorFrameListener listener2 = (frame) { }\nList\u003cVoiceProcessorFrameListener\u003e listeners = [listener1, listener2];\n_voiceProcessor?.addFrameListeners(listeners);\n\n_voiceProcessor?.removeFrameListeners(listeners);\n// or\n_voiceProcessor?.clearFrameListeners();\n```\n\n## Example\n\nThe [Flutter Voice Processor app](./example) demonstrates how to ask for user permissions and capture output from the `VoiceProcessor`.\n\n## Releases\n\n### v1.1.0 - August 4, 2023\n- Numerous API improvements\n- Error handling improvements\n- Allow for multiple listeners instead of a single callback function\n- Upgrades to testing infrastructure and example app\n\n### v1.0.0 - December 8, 2020\n\n- Initial public release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpicovoice%2Fflutter-voice-processor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpicovoice%2Fflutter-voice-processor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpicovoice%2Fflutter-voice-processor/lists"}