No description
  • Go 98.4%
  • Nix 1.6%
Find a file
Jeremy Kennedy d3b42f0c48
All checks were successful
buildbot/nix-eval Build done.
buildbot/nix-build Build done.
buildbot/nix-effects Build done.
fix: keep Dicta pastes inline in OpenCode
2026-04-07 19:41:06 -04:00
.claude chore: rename llm-dictate to dicta 2026-02-21 03:51:36 -05:00
cmd fix: resume playback when audio capture ends 2026-04-07 19:41:01 -04:00
docs/plans docs: add rename design plan (llm-dictate -> dicta) 2026-02-21 03:46:49 -05:00
internal fix: keep Dicta pastes inline in OpenCode 2026-04-07 19:41:06 -04:00
tools/benchmark refactor: DRY shared types between api package and benchmark 2026-03-13 02:49:16 -04:00
vendor Initial release: voice dictation with LLM correction 2026-01-11 00:17:06 -05:00
.gitignore chore: add .env to .gitignore 2026-02-27 02:40:20 -05:00
CLAUDE.md docs: simplify deploy reference in CLAUDE.md 2026-02-24 02:37:20 -05:00
flake.lock Initial release: voice dictation with LLM correction 2026-01-11 00:17:06 -05:00
flake.nix chore: rename llm-dictate to dicta 2026-02-21 03:51:36 -05:00
go.mod chore: rename llm-dictate to dicta 2026-02-21 03:51:36 -05:00
go.sum Initial release: voice dictation with LLM correction 2026-01-11 00:17:06 -05:00
main.go chore: rename llm-dictate to dicta 2026-02-21 03:51:36 -05:00
README.md chore: rename llm-dictate to dicta 2026-02-21 03:51:36 -05:00

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

  1. toggle starts parecord to capture audio
  2. toggle again stops recording
  3. Audio is sent to Groq Whisper API for transcription
  4. Raw transcript + recent history is sent to Llama for correction
  5. Corrected text is pasted via wtype
  6. Entry is saved to history for future context

Dependencies

Bundled automatically when installed via Nix flake:

  • parecord (PulseAudio/PipeWire) - audio recording
  • wtype - Wayland text input
  • notify-send - desktop notifications

License

MIT