Skip to main content

Talk is cheap. Voice dictation for the terminal.

Project description

yap — talk is cheap.

Speak → Whisper transcribes → text appears.
Linux · macOS · Windows

Install

uv pip install yap-dictation

Or from source:

git clone https://github.com/xuefei-wang/yap.git
cd yap
uv pip install .

pip install also works if you don't use uv.

Windows users: uv pip install yap-dictation[windows]

You also need ffmpeg installed (apt install ffmpeg / brew install ffmpeg / winget install ffmpeg).

Usage

yap           # Record -> transcribe -> type into active window
yap -c        # Copy to clipboard instead
yap --llm     # Also correct with an LLM

Speak, press Enter to stop. Text is typed into the active window.

If no typing tool is found, yap copies to clipboard as a fallback.

Options

Flag / Env Var Description
-c, --clipboard Copy to clipboard instead of typing
-l, --llm Correct transcription with an LLM
--model MODEL Whisper model (default: small.en, env: WHISPER_MODEL)
--lang LANG Language code e.g. en, zh, ja (env: YAP_LANG)
-s, --serve Start the web UI server
--port PORT Port for web UI server (default: 8765)

Web UI

For a graphical interface, start the web server:

uv pip install yap-dictation[web]   # one-time setup
yap --serve

Opens a browser page with a record button, transcription display, and settings.

Keyboard shortcuts: Space to toggle recording, Ctrl+Shift+C to copy transcription.

Two transcription modes available in the web UI:

  • Browser Speech — free, uses your browser's built-in speech recognition (Chrome, Edge, Safari)
  • Local Whisper — private, uses the same local Whisper model as the CLI

Note: Browser Speech sends audio to your browser vendor's servers for processing.

LLM correction (optional)

Use --llm to send transcription through an LLM for grammar, punctuation, and misheard word fixes.

Setup

Run yap config to choose your provider:

yap config

Available providers:

Provider Requires
claude-code Claude Code CLI installed
claude ANTHROPIC_API_KEY env var
openai OPENAI_API_KEY env var
gemini GEMINI_API_KEY env var

yap config also lets you choose which model to use per provider. Defaults: Claude Haiku 4.5, GPT-4o Mini, Gemini 2.0 Flash.

Configuration is saved to ~/.config/yap/config.json.

Whisper models

Model Speed Accuracy
tiny.en ~1s Good
base.en ~2s Better
small.en ~4s Great (default)
medium.en ~8s Best

For non-English languages, use models without .en suffix (e.g. small, medium):

yap --model small --lang zh

Requirements

  • Python 3.10+
  • ffmpeg — audio recording (apt install ffmpeg / brew install ffmpeg / winget install ffmpeg)
  • faster-whisper — installed automatically
  • Linux: PulseAudio or PipeWire (with pipewire-pulse) for audio capture
  • Linux: xdotool or wtype (typing), xclip or wl-copy (clipboard)
  • macOS: works out of the box (uses osascript + pbcopy)
  • Windows: ffmpeg (winget install ffmpeg or choco install ffmpeg), install extras with uv pip install yap-dictation[windows]

License

GPL-3.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yap_dictation-0.1.2.tar.gz (285.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yap_dictation-0.1.2-py3-none-any.whl (122.8 kB view details)

Uploaded Python 3

File details

Details for the file yap_dictation-0.1.2.tar.gz.

File metadata

  • Download URL: yap_dictation-0.1.2.tar.gz
  • Upload date:
  • Size: 285.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for yap_dictation-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2d07c1e10869d8f16ed4091913a9da7c168c1c095406a9c0b13fab15b0331d6c
MD5 8cc93feff515e0a4286fb624b4ee04ce
BLAKE2b-256 addc79656b0623fea00854fa93e78207cb027805547370b2184412ef9b609c00

See more details on using hashes here.

File details

Details for the file yap_dictation-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: yap_dictation-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 122.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for yap_dictation-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 da98d4a669d0a7c643d195105a4130827e17723b167ea9736314f9e549c003a3
MD5 b7e15ed90d0202274d85f12e3f77b6ed
BLAKE2b-256 f881b29c1d6a3575373bbe24be6ca3eab130be654ea013c84e946d80b4b0595e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page