porcupine_flutter
4.0.0, released 11 months ago by picovoice.ai
Flutter plugin for Picovoice's offline wake word engine.
What it does
It provides bindings to the Porcupine wake word engine, enabling offline and private voice-activated applications on Android and iOS. It offers both a high-level manager that handles audio recording automatically and a low-level API for custom audio pipelines.
AI-written summary of version 4.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need offline, private wake-word detection in your Flutter app.
- You want to use custom or built-in keyword `.ppn` files for voice commands.
Skip it when
- You need general-purpose speech-to-text transcription rather than specific wake word detection.
- You are targeting platforms other than Android and iOS.
Strengths
- Runs completely offline and privately.
- Cross-platform support for Android and iOS.
- Provides both high-level audio recording management and low-level processing.
Weaknesses
- Requires a Picovoice AccessKey.
- Custom wake words have restrictions on platforms and commercial usage depending on the Picovoice console tier.
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 2
Requires configuring a Picovoice AccessKey, adding microphone permissions in Info.plist (iOS) and AndroidManifest.xml (Android), and setting iOS deployment strip style if necessary.
import 'package:porcupine_flutter/porcupine_manager.dart';
import 'package:porcupine_flutter/porcupine_error.dart';
final String accessKey = '{ACCESS_KEY}';
void createPorcupineManager() async {
try {
var manager = await PorcupineManager.fromBuiltInKeywords(
accessKey,
[BuiltInKeyword.PICOVOICE, BuiltInKeyword.PORCUPINE],
(int keywordIndex) {});
await manager.start();
} on PorcupineException catch (err) {
// handle error
}
}Works with
Packages commonly used together with porcupine_flutter: ones it builds on, ones built on it, and its own family.