earshot_capture 0.1.0
earshot_capture: ^0.1.0 copied to clipboard
Pre-release: on-device microphone capture for Flutter as a float32 PCM stream, with permission status. No network.
example/README.md
earshot_capture example #
import 'package:earshot_capture/earshot_capture.dart';
final status = await const MicrophonePermission().status(); // never prompts
if (status != MicrophonePermissionStatus.granted) {
await const MicrophonePermission().request();
}
final subscription = const EarshotCapture().pcm().listen((chunk) {
// chunk.samples is float32 mono PCM at 16 kHz.
});
await subscription.cancel(); // closes the microphone
A complete Flutter app that uses the earshot packages lives in examples/earshot_example.