Skip to main content

Crate whisrs

Crate whisrs 

Source
Expand description

whisrs — shared types for CLI and daemon communication.

Modules§

audio
Audio capture, silence detection, and recovery.
config
Configuration management and interactive setup for whisrs.
history
Transcription history — append-only JSONL storage.
hotkey
Global hotkey listener via evdev input devices.
input
Input injection: virtual keyboard and clipboard operations.
llm
LLM integration for command mode.
post_processing
Post-processing pipeline for transcribed text.
state
Daemon state machine: Idle → Recording → Transcribing → Idle.
transcription
Transcription backends: trait definition and implementations.
tray
System tray indicator via StatusNotifierItem (KDE/freedesktop SNI protocol).
window
Window tracking: detect focused window and restore focus.

Structs§

AudioConfig
Config
Top-level configuration deserialized from config.toml.
ConfigWarning
A warning about a configuration issue (non-fatal).
GeneralConfig
GroqConfig
HotkeyConfig
Global hotkey configuration — key combos that trigger actions.
LocalParakeetConfig
LocalVoskConfig
LocalWhisperConfig
OpenAiConfig

Enums§

Command
Commands sent from the CLI to the daemon over the Unix socket.
Response
Responses sent from the daemon back to the CLI.
State
Daemon state.
WhisrsError

Functions§

config_path
Return the path to the configuration file.
encode_message
Encode a message as a length-prefixed JSON frame (4-byte big-endian length + JSON bytes).
read_message
Read a length-prefixed JSON frame from an async reader.
socket_path
Return the path to the Unix domain socket used for CLI-daemon IPC.