Skip to main content

Add your description here

Project description

VSpell

A simple, command-line voice spelling and transcription tool. Record a short audio clip, get it transcribed by Whisper, and have the text automatically copied to your clipboard.

VSpell listens for a few seconds, transcribes what it hears using the faster-whisper library, and copies the resulting text directly to your clipboard, streamlining voice-to-text workflows.

Features

  • Fast Transcription: Quickly record and transcribe audio using the highly efficient faster-whisper library.
  • Clipboard Integration: Transcribed text is automatically copied to the clipboard for immediate pasting.
  • Silence Detection: Avoids processing and transcribing empty audio clips, saving time and resources.
  • Noise Calibration: Includes a one-time calibration step to accurately distinguish speech from ambient noise.
  • Model Selection: Choose from different Whisper model sizes (tiny, base, small, medium, large) to balance speed and accuracy.
  • Audio Playback: Listen to your last recording to verify what was captured.

Installation

Before installing, ensure you have the necessary system dependencies for audio recording.

For macOS:

brew install ffmpeg

For Debian/Ubuntu:

sudo apt-get install ffmpeg

To install VSpell, clone this repository and install the package using pip.

git clone https://github.com/vibe-technologies/vspell.git
cd vspell
pip install .

This will install the necessary dependencies and make the vspell command available in your terminal.

First-Time Setup: Calibration

For VSpell to work effectively, it needs to know what "silence" sounds like in your environment. Run the calibration command once before you start using it.

Find a quiet moment and run:

vspell --calibrate

Remain silent for the 2-second duration. This will measure your ambient noise level and set a threshold for silence detection. This value is saved in ~/.config/vspell/vspell_config.json. You can re-run this anytime your environment changes (e.g., you get a new microphone or move to a noisier room).

Usage

Once calibrated, using VSpell is simple.

Main Command

Just run the vspell command. It will listen for 2 seconds, transcribe what it hears, and copy the result to your clipboard.

vspell
Listening for 2 seconds...
Transcribing…
Transcribed: Hello, world.
Text copied to clipboard.

If you say nothing, it will detect the silence and stop.

vspell
Listening for 2 seconds...
No speech detected — nothing transcribed.

Command-Line Options

usage: vspell [-h] [--calibrate] [--playback [PLAYBACK]] [--duration DURATION] [--model MODEL]

VSpell - Voice spelling tool

options:
  -h, --help            show this help message and exit
  --calibrate           Calibrate ambient noise threshold
  --punctuate           Retain punctuation and original casing in transcribed text (default is to remove punctuation and lowercase)
  --playback [PLAYBACK]
                        Playback recorded audio with optional volume
                        multiplier (default=1.0)
  --duration DURATION   Recording duration in seconds
  --model MODEL         Whisper model size [tiny, base, small, medium, large]
                        (default=medium)

Examples:

  • Record for 5 seconds:

    vspell --duration 5
    
  • Use a different model for higher accuracy (e.g., large):

    vspell --model large
    
  • Playback the last recording at 1.5x volume:

    vspell --playback 1.5
    
  • Transcribe text with punctuation and original casing:

    vspell --punctuate
    

How It Works

  1. Record: When you run vspell, it records audio from your default microphone for a set duration (default is 2 seconds) into a temporary .wav file.
  2. Analyze: It checks the audio's amplitude against the calibrated silence threshold. If it's below the threshold, the program exits.
  3. Transcribe: If speech is detected, the audio is passed to the faster-whisper model for transcription. The first time you use a model, it will be downloaded and cached locally in ~/.cache/huggingface/hub.
  4. Copy: The resulting text is copied to your system's clipboard.

Configuration

VSpell creates a configuration directory at ~/.config/vspell.

  • ~/.config/vspell/vspell_config.json: Stores the silence_threshold determined during calibration.
  • ~/.config/vspell/input.wav: The temporary audio file of your last recording.

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

vspell-0.1.0.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

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

vspell-0.1.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file vspell-0.1.0.tar.gz.

File metadata

  • Download URL: vspell-0.1.0.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for vspell-0.1.0.tar.gz
Algorithm Hash digest
SHA256 113e43a513ea77bc90d53a10ae5b0a87ac88f21c5737be9310bcb17eefd6ccfb
MD5 bb693d7ddb18afebfd8b99c071167e74
BLAKE2b-256 9e76b0b8223778325c4077c618922bb7ce09cf8253b405bf6b9fa35f862a3c73

See more details on using hashes here.

File details

Details for the file vspell-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: vspell-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for vspell-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 31549d4a3765337efb1a7560bf8585874972508a38f2033e8ec83448784d2090
MD5 3b95b7a9c2fc05de4269d6e748b8ac7f
BLAKE2b-256 42eeb0a28766783869c3cfd00a2b7db0f3c7550d11f67c9cbe38e7fd00d8fcf5

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