No description
- Go 98.4%
- Nix 1.6%
| .claude | ||
| cmd | ||
| docs/plans | ||
| internal | ||
| tools/benchmark | ||
| vendor | ||
| .gitignore | ||
| CLAUDE.md | ||
| flake.lock | ||
| flake.nix | ||
| go.mod | ||
| go.sum | ||
| main.go | ||
| README.md | ||
dicta
Voice dictation with LLM-powered contextual correction for Linux/Wayland.
Press a hotkey to start recording, press again to stop. Your speech is transcribed using Groq's Whisper API, then corrected for grammar and context using an LLM, and pasted into the active window.
Features
- Toggle recording with a single hotkey
- AI transcription via Groq Whisper API
- Contextual correction using Llama - fixes grammar, punctuation, and uses recent context for accuracy
- History tracking - maintains context from recent transcriptions
- Desktop notifications for recording state
Requirements
- Linux with PipeWire/PulseAudio
- Wayland compositor (for wtype)
- Groq API key
Installation
Nix Flake
# flake.nix
{
inputs.dicta.url = "git+https://git.jeremyk.net/jeremy/dicta.git";
# In your home-manager config:
home.packages = [ inputs.dicta.packages.${pkgs.system}.default ];
}
From Source
# Requires: go, parecord (pulseaudio), wtype, notify-send
git clone https://git.jeremyk.net/jeremy/dicta
cd dicta
go build -o dicta
Usage
# Set your API key
export GROQ_API_KEY="gsk_..."
# Toggle recording (bind this to a hotkey)
dicta toggle
# Check status
dicta status
# View recent transcripts
dicta history
dicta history -n 20
# Show configuration
dicta config
Hotkey Setup (Hyprland)
# ~/.config/hypr/hyprland.conf
bind = CTRL SHIFT, D, exec, dicta toggle
Configuration
Optional config file at ~/.config/dicta/config.yaml:
groq_api_key: "gsk_..." # Direct API key
groq_api_key_file: "/path/to/key" # Or read from file (for NixOS agenix)
context_window: 10 # Number of recent transcripts for context
whisper_model: "whisper-large-v3-turbo"
llm_model: "meta-llama/llama-4-scout-17b-16e-instruct"
language: "en"
sample_rate: 16000
Precedence: GROQ_API_KEY env var > groq_api_key > groq_api_key_file
Files
~/.config/dicta/config.yaml # Configuration (optional)
~/.local/share/dicta/history.jsonl # Transcript history
~/.local/state/dicta/recording.pid # Recording process PID
~/.local/state/dicta/current.wav # Temporary audio file
~/.local/state/dicta/dictate.log # Debug log
How It Works
togglestartsparecordto capture audiotoggleagain stops recording- Audio is sent to Groq Whisper API for transcription
- Raw transcript + recent history is sent to Llama for correction
- Corrected text is pasted via
wtype - Entry is saved to history for future context
Dependencies
Bundled automatically when installed via Nix flake:
parecord(PulseAudio/PipeWire) - audio recordingwtype- Wayland text inputnotify-send- desktop notifications
License
MIT