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.

yap web UI

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.3.tar.gz (483.4 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.3-py3-none-any.whl (122.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yap_dictation-0.1.3.tar.gz
  • Upload date:
  • Size: 483.4 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.3.tar.gz
Algorithm Hash digest
SHA256 5d229ce9f008cd1a1b599df24c1067600584569e2e42acda590efcd303d58659
MD5 20330fb8a973d7c656a7924c761bcfa4
BLAKE2b-256 5218374a7e3ecc14b9c133b914b5a8d3935f3ca0fc5737bc84ab2c9ebda3a0fc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: yap_dictation-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 122.6 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bcb54236f868f8f0750055ec29e822dd8c3ae27984c2a79f1a6eb01da68d38d3
MD5 6fabbbe7181e5069dfe49ce1d72ef7a2
BLAKE2b-256 3ad0cec13c9494123d65a6847cbd0e681bf09c5b84cb5cb4204262c1e1867a73

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