audio_streamer
5.0.0, released 3 months ago by cachet.dk
Stream PCM audio data from the microphone on Android and iOS.
What it does
Provides a singleton audio streamer that exposes a stream of Pulse-code modulation (PCM) audio data buffers. Allows customization of the sampling rate.
AI-written summary of version 5.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need real-time PCM audio streaming from the microphone for processing or analysis
- You are building an audio visualization tool or custom recording app
Skip it when
- You only need simple background music or sound effect playback
- Your target iOS deployment target is below 16.0 or Android minSdk is below 24
Strengths
- Provides raw PCM audio streams directly
- Supports custom sampling rate configuration
Weaknesses
- Requires manual platform permission configuration
- High minimum SDK requirements (iOS 16.0+, Android minSdk 24)
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 0
Requires RECORD_AUDIO permission on Android and NSMicrophoneUsageDescription plus background audio modes on iOS.
AudioStreamer().audioStream.listen(
(List<double> buffer) {
print('Max amp: \${buffer.reduce(max)}');
},
onError: (Object error) {
print(error);
},
cancelOnError: true,
);Alternatives
Packages that do the same job and could replace audio_streamer.
- record
If you want to record audio to a file rather than stream raw PCM buffers.
94Compare - audioplayers
If your primary goal is playing audio files or streams rather than recording from the mic.
87Compare - just_audio
If you need advanced audio playback capabilities.
80Compare
Works with
Packages commonly used together with audio_streamer: ones it builds on, ones built on it, and its own family.