Recording Commands
start_recording
Start recording audio from the selected microphone.- Validates license status and model availability
- Loads recording configuration from settings
- Creates a timestamped WAV file in the recordings directory
- Starts audio capture from the selected (or default) microphone
- Emits
recording-state-changedevents during state transitions - Shows pill widget if
pill_indicator_modeis not"never" - Plays system sound if
play_sound_on_recordingis enabled
recording-state-changed:{ state: 'starting' }→{ state: 'recording' }recording-started: Legacy event for compatibilityaudio-level: Real-time audio level updates (0.0 - 1.0)
"Already recording"- Recording already in progress"No speech recognition models installed"- No models downloaded"License required to record"- License expired or missing"Microphone permission denied"- Permission not granted"No microphone found"- No input device available
stop_recording
Stop the current recording and start transcription.- Stops audio capture and saves WAV file
- Plays system sound if
play_sound_on_recording_endis enabled - Validates audio file (rejects if empty or header-only)
- Selects transcription engine based on
current_model_enginesetting - Transcribes audio using selected model
- Applies AI enhancement if
ai_enabledis true - Saves transcription to history
- Inserts text at cursor position
- Hides pill widget based on
pill_indicator_mode
recording-state-changed:{ state: 'stopping' }→{ state: 'transcribing' }→{ state: 'idle' }transcription-started: Transcription process begantranscription-complete:{ text: string }- Transcription finished
"Not currently recording"- No active recording"No audio captured"- WAV file is empty"Model not found"- Selected model is not available"Transcription failed"- Engine returned an error
cancel_recording
Cancel the current recording without transcribing.- Sets cancellation flag in AppState
- Stops recording if active
- Deletes the audio file
- Hides pill widget
- Returns to idle state without transcribing
Transcription Commands
transcribe_audio_file
Transcribe an audio file from a path.Absolute path to the audio file (WAV format)
Audio Device Commands
get_audio_devices
Get a list of available audio input devices.get_current_audio_device
Get the currently selected audio device.null if using system default
Usage:
Transcription History Commands
save_transcription
Save a transcription to history.Transcribed text to save
Model name used for transcription
get_transcription_history
Retrieve transcription history.Maximum number of entries to return
cleanup_old_transcriptions
Delete transcriptions older than the configured retention period.- Reads
transcription_cleanup_daysfrom settings - If
null, keeps all transcriptions (no cleanup) - If set, deletes transcriptions older than N days
State Management
Audio commands emit state changes through therecording-state-changed event:
Recording States
| State | Description |
|---|---|
idle | No recording in progress |
starting | Initializing microphone |
recording | Actively recording audio |
stopping | Finalizing audio file |
transcribing | Processing audio to text |
error | An error occurred (check error field) |
See Also
- Recording Hook - React hook wrapping these commands
- Settings Commands - Configure audio settings
- Model Commands - Manage transcription models