Package-level declarations
The public API: the capture entry point, sessions, configuration and audio types.
The public API: the capture entry point, sessions, configuration and audio types.
The public API: the capture entry point, sessions, configuration and audio types.
Types
MediaRecorder.AudioSource. Decides which processing the device applies before you get the audio.
Entry point to the microphone.
Captures the application context at startup so the no-argument AudioCapture() works.
One block of interleaved PCM: CaptureConfig.chunkDuration of audio.
Loudness of one chunk, linear 0..1 relative to full scale.
What to capture and where it goes.
One run of the microphone, from AudioCapture.start to stop or cancel.
Marks the VoiceProcessing constructor: its result differs a lot between platforms and may change.
What happens when the system takes the microphone away mid-session. See PauseReason.Interruption for what counts as one on each platform. Android reports interruptions from API 29.
AVAudioVoiceProcessingOtherAudioDuckingLevel.
Turns AudioLevel.peak into a 0..1 value for visuals that looks the same on every device.
How CaptureSession.chunks delivers raw PCM.
A finished file.
Platform echo cancellation, noise suppression and gain control, applied before you get the audio.
Functions
The platform's AudioCapture.
For apps that disable androidx.startup initializers. Any context works; only the application context is kept.
The platform's AudioCapture.
The platform's AudioCapture.
The shortest way to record: asks for permission if needed and starts recording fileName (.m4a for AAC, .wav for WAV) into AudioCapture.recordingPath. Chunks and levels are on the returned session for live visuals; call CaptureSession.stop to get the file.
Streams raw PCM for as long as the flow is collected.