record
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.
val session = AudioCapture().record("hello.m4a")
// ... later
val recording = session.stop()Content copied to clipboard