Skip to main content

whspr

A minimalist dictation tool for local speech recognition using OpenAI's Whisper and NVIDIA's Parakeet models. Its interface is fully keyboard-driven and sound-based so as not to interfere with windowing or application focus.

Processing is done locally. If whspr[gpu] optional dependencies are installed and an Nvidia GPU is available, the model whisper-large-v3-turbo will be used via faster-whisper; otherwise, parakeet-tdt-0.6b-v3 will be run on the CPU via onnx-asr. whspr is currently only available on Linux and can be installed from PyPI.

Transcription happens in a background server process that keeps the model warm between dictations and shuts itself down automatically after five minutes of inactivity; it is started (and restarted) on demand, so this is invisible in use. To free the model's memory without waiting that long, stop the server with whspr --stop-server.

Usage

Bind the following commands to your preferred keyboard shortcuts (examples given here).

whspr            # Super+C
whspr --paste    # Super+V
whspr --cancel   # Super+X

In the example given, Super+C and Super+V will both start or stop dictation and copy the result to the clipboard. The difference is that Super+V will additionally paste the result into the currently focussed application. Super+X will cancel any dictation currently in progress. Sounds will indicate when whspr is listening and when it has finished processing.

The background server can also be stopped from the command line before its five minutes of inactivity have passed; a transcription that is already underway still completes, and the next dictation starts the server again:

whspr --stop-server

whspr can also be accessed from within Python:

from whspr import transcribe
result = transcribe("path/to/audio.mp3")

Installation

whspr depends on:

  • Python 3.10 or newer.
  • the aplay, arecord, ydotool commands. The former two are part of the alsa-utils package and installed on most distros by default. ydotool is optional and only required for the --paste flag (see Usage).
  • a clipboard backend compatible with pyperclip, e.g. wl-clipboard on Wayland or xclip on X11.
  • for optional GPU-accelerated speech recognition, an Nvidia GPU and drivers are required.

On Ubuntu, simply run:

sudo apt update && sudo apt install -y alsa-utils wl-clipboard xclip ydotool pipx
pipx install 'whspr[gpu]'  # gpu support is optional; omit [gpu] if it's not desired
whspr --finish-setup     # optional to pre-load the model from the internet before its first use

Metadata

Release files for whspr 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for whspr 1.2.1
File Size Uploaded
whspr-1.2.1.tar.gz 113.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for whspr 1.2.1
File Interpreter ABI Platform
whspr-1.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 240.6 kB

Release files / whspr-1.2.1.tar.gz

Download URL whspr-1.2.1.tar.gz
Size 113.7 kB
Tags Source
SHA-256 checksum
How to use checksums
418d73d9e9d1ddb91599a465d4f5e6766db93a01c1972ab0086fca9a7ca6de26
BLAKE2b-256 checksum
How to use checksums
5c90071200346e52509e53483dd80362d7e3aa96ba5a0f76903858a50e15d996
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / whspr-1.2.1-py3-none-any.whl

Download URL whspr-1.2.1-py3-none-any.whl
Size 127.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ad4ac804f109f21f56ab773405782dbaa5890a5cfde63c5a215a7e71b6de3fc4
BLAKE2b-256 checksum
How to use checksums
99286eca56c4cc0a29b23964b20a85c40dc48f2700ac7bea6f899943858abe18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

1.2.1 This release

2 release files

1.2.0

2 release files

1.1.2

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page