Expand description
Audio capture: the sources, the recordings they write, and the canonical
16 kHz mono format shared by everything that reads them. A Clip is
finished audio at its own rate.
RecordingReader builds on every target. Everything that opens a
microphone, a model, or a file is native.
Structs§
- Auto
Stop Non- target_family=wasm - Clip
- Mono samples and the rate they were taken at.
- Microphone
microphoneand non-target_family=wasm - The default microphone, ready to record.
open()chooses a private per-user spool directory and a 60-second maximum duration; the builder overrides either. - Microphone
Builder microphoneand non-target_family=wasm - Prepared
Microphone microphoneand non-target_family=wasm - A microphone whose fallible setup is done. Opening it starts the worker thread, which opens the input device.
- Recorded
Audio - The result of a finished recording: its length and, on a target with a
filesystem, its WAV. A WAV this crate wrote is deleted when its owner
drops. A caller’s own file is only borrowed. A recording ended by
RecordingWriter::finishhas none. - Recording
- What one capture’s writer and readers share: each reader’s queue of unread samples, the count written, and how capture ended. It keeps no history: a sample lives only in the queues of readers yet to take it.
- Recording
Reader - Recording
Waker sileroand non-target_family=wasm - A window onto a recording, readable while capture is still writing it.
One reader;
RecordingReader::forkadds another. - Recording
Writer - The write end of a
Recording. - Resampler
Non- target_family=wasm - Converts mono f32 audio at any sample rate to canonical 16 kHz.
- Silence
Duration Non- target_family=wasm - Spooled
Recording Writer Non- target_family=wasm - Stop
Signal - The capture-side stop check. Owned by the capture worker, which drops it the moment recording ends — owners can rely on that drop for cleanup.
- Stopper
- A handle that ends a recording from anywhere: clone it, hand it to a
hotkey or UI, call
stop(). - Wake
Word Control microphoneand non-target_family=wasm - Wake
Word Monitor microphoneand non-target_family=wasm - Wake
Word Suspension microphoneand non-target_family=wasm - WavReplay
Capture Non- target_family=wasm
Enums§
- Auto
Stop Error Non- target_family=wasm - Capture
Error - Clip
Error - Microphone
Error Non- target_family=wasm - Recording
Mode Non- target_family=wasm - Replay
Pace Non- target_family=wasm - How a WAV replay delivers its samples.
Immediatewrites the whole file beforestartreturns.Realtimewrites it at recorded speed, so transcription overlaps capture as on a real press. - Resample
Error Non- target_family=wasm - Silence
Duration Error Non- target_family=wasm - Spool
Error Non- target_family=wasm - Wake
Word Event microphoneand non-target_family=wasm - Wake
Word Failure microphoneand non-target_family=wasm - WavError
Non- target_family=wasm - WavReplay
Error Non- target_family=wasm
Constants§
Traits§
- Audio
Capture Non- target_family=wasm - A source of canonical 16 kHz mono audio. Each implementation bounds how long a recording runs.
Functions§
- canonical_
duration - How long
samplescanonical samples last. - canonical_
samples - How many canonical samples
durationspans, rounded down. Saturates atu64::MAX. - check_
default_ input_ device microphoneand non-target_family=wasm - Checks the default microphone as
LiveStream::opendoes, without opening a stream, because that triggers the permission prompt. Returns the device name. - f32_
from_ pcm16 - pcm16_
from_ f32 Non- target_family=wasm - The nearest 16-bit sample to
sample, saturating outside -1.0..1.0. - read_
wav Non- target_family=wasm - Reads a PCM WAV, 8- to 32-bit integer or 32-bit float, at any rate a
Clipaccepts, as mono audio at the file’s rate. Channels are averaged. UnlikeRecordingReader::from_wav_file, it sets no length limit. - remove_
all_ spools Non- target_family=wasm - write_
wav Non- target_family=wasm - Writes
cliptopathas mono 16-bit PCM at its own rate, replacing any file there.