Skip to main content

A simple, privacy-focused speech-to-text CLI tool

Project description

hns - A simple, privacy-focused speech-to-text CLI tool

A simple, privacy-focused speech-to-text CLI tool that records your voice, transcribes it locally using faster-whisper, and copies the transcription to your clipboard. Perfect for interacting with Claude Code, VS Code, Slack, or any application where native dictation falls short.

Click the image below to see the demo ⬇️ (warning: demo has sound)

Watch Demo

Highlights

  • 100% Local & Private: Audio is processed entirely on your local machine. No data leaves your device
  • Works Offline: After the initial model download, no internet connection is required
  • Instant Clipboard: Transcribed text is automatically copied to your clipboard for immediate pasting
  • Multi-Language Support: Transcribe in any language supported by Whisper
  • Configurable: Choose models and languages via environment variables
  • Focused - Does one thing well: speech → clipboard
  • Open Source - MIT licensed, fully transparent

Use Cases

  • Claude Code & AI Assistants: Perfect for Claude Code or any AI interface without native dictation. Run hns, speak your prompt, then paste into Claude Code.
  • Brain Dump → Structured Output: Ramble your scattered thoughts, then paste into an LLM to organize:
    hns  # "So I'm thinking about the refactor... we need to handle auth, but also consider caching..."
    # Paste to LLM: "Create a structured plan from these thoughts:"
    
  • Communication: Compose Slack messages, emails, or chat responses hands-free.
  • Note-Taking: Quickly capture thoughts and ideas without switching from the keyboard.
  • Accessibility: Helpful for users who find typing difficult or painful.

Installation

Install via uv (recommended):

uv tool install hns

or pipx:

pipx install hns

or pip:

pip install --user hns

The first time you run hns, it will download the default Whisper model (base). This requires an internet connection and may take a few moments. Subsequent runs can be fully offline.

Usage

Basic Transcription

  1. Run the command in your terminal:
    hns
    
  2. The tool will display 🎤 Recording.... Speak into your microphone.
  3. Press Enter when you have finished.
  4. The transcribed text is automatically copied to your clipboard and printed to the console.

Configuration

Listing Models

To see all available transcription models:

hns --list-models

Setting the Model

Select a model by setting the HNS_WHISPER_MODEL environment variable. The default is base. For higher accuracy, use a larger model like medium or large-v3.

# Use the 'small' model for the current session
export HNS_WHISPER_MODEL="small"
hns

To make the change permanent, add export HNS_WHISPER_MODEL="<model_name>" to your shell profile (.zshrc, .bash_profile, etc.).

Setting the Language

By default, Whisper auto-detects the language. To force a specific language, set the HNS_LANG environment variable.

# Use an environment variable for Japanese
export HNS_LANG="ja"
hns

License

This project is licensed under the MIT License.

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

hns-1.0.1.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

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

hns-1.0.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file hns-1.0.1.tar.gz.

File metadata

  • Download URL: hns-1.0.1.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.6

File hashes

Hashes for hns-1.0.1.tar.gz
Algorithm Hash digest
SHA256 0321e4cb317ceffac1b7bed013dc5bfac24528b353b6768c98710dbbb11d77bd
MD5 db00f926e5316177802242badba19c83
BLAKE2b-256 c173b2cda3ddd1c60f9c7a176e8e590f2776d84e447ee5adb7ed3b3913f1deb3

See more details on using hashes here.

File details

Details for the file hns-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: hns-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.6

File hashes

Hashes for hns-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bddcb6811af538b8e0d4fa5da67e8dcf7d4dff64d3795e7f601d36c2c46cec62
MD5 c22a02e75872084501bd8929e169e8c6
BLAKE2b-256 306536b91805feb76fd8fa54c8aa09fc5ccb704f1601a7f6f0ce1bf72b7a99a9

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