Skip to main content

A simple dictation program using Whisper, pynput, and pystray. After installing, run with 'whisptray'. A tray icon will appear in the system tray. Click it to toggle dictation. Double click to exit.

Project description

Whisptray

A fast, accurate, and private speech-to-text dictation program.

Speak into your microphone to type text into any program on your computer. Whisptray combines the state of the art Whisper audio-to-text engine with pynput and pystray for fast, accurate, and private dictation. Whisptray is intended for Linux (major commercial OSes include dictation already,) but should work on any platform with the requisite support.

IMPORTANT: Your system requires the correct audio capabilities to be setup before it can use Whisptray. See the Installation section for instructions.

After installation, run whisptray. Whisptray will create a record button, a red circle, in the corner of your screen. Dication begins when you click the record button. The record button changes into a stop button, a white square, to indicate that recording has started. Speak into your microphone, and the text will be entered into your currently active program. Click the stop button to stop dictation. You can double click the button at any time to exit Whisptray.

Recommended System Requirements

Whisptray works best with a Pytorch-supported GPU.

Installation

Some common prerequisites are required before installation.

Prerequisites for Ubuntu:

sudo apt update && sudo apt install build-essential python3-dev libportaudio2 ffmpeg

Prerequisites for Fedora:

sudo dnf groupinstall "Development Tools" && sudo dnf install python3-devel alsa-lib-devel ffmpeg

Installation Command:

pip3 install whisptray

Or if you have a newer system that requires pipx to install Python applications:

pipx install whisptray

Usage

Run:

whisptray

Click the tray icon to toggle dictation. Double click to exit.

If you have an older computer, try:

whisptray --model tiny

This and several other model options offer various performance vs. accurancy tradeoffs. The turbo model is the best quality, and is the default. Use the --help options for more details.

If whisptray fails to start with errors related to audio input (e.g., cannot find microphone, errors from sounddevice despite installing prerequisites), please double-check:

  • Your microphone is correctly connected and configured in your OS sound settings.
  • Your Python environment is correctly set up and sounddevice installed properly within it.

Advanced Usage

You can customize the behavior using command-line arguments. For example, to use a specific microphone (ID 2, found by running with --device list) and a different energy multiplier:

whisptray --device 2 --energy_multiplier 2.0

Available arguments:

  • --device DEVICE: Microphone name or ID to use (e.g., "pulse", "USB Microphone", or an integer ID like 1). Pass list to see available microphone IDs and names. If omitted, the system default microphone is used.
  • --model MODEL: Whisper model to use. (choices: "tiny", "base", "small", "medium", "large", "turbo"; default: "turbo").
  • --max_key_rate COUNT: The maximum rate of generated keyboard events per second. Higher values are more responsive. Lower values give better compatibility with slow apps. Robust apps can tolerate up to --max-key-rate 1000, while the glitchiest only work as low as --max-key-rate 50.
  • --ambient_duration SECONDS: Duration (in seconds) to measure ambient noise before starting dictation. This helps set a baseline for voice activity detection. (default: 1.0)
  • --energy_multiplier MULTIPLIER: Multiplier applied to the measured ambient noise level to set the energy threshold for voice activity detection. Higher values are less sensitive. (default: 1.5)
  • -v, --verbose: Enable debug logging.
  • --version: Show program's version number and exit.
  • --help: Show the program's options and exit.

Troubleshooting

If the text appears garbled in some applications, trying specifying a slower key rate using the --max_key_rate command line argument.

Development

  1. Ensure thesystem prerequisites are installed as described in the Installation section.
  2. Clone this repository:
    git clone https://github.com/coder0xff/whisptray.git # Replace with your repo URL
    cd whisptray
    
  3. make develop

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

whisptray-0.3.3.tar.gz (64.8 kB view details)

Uploaded Source

Built Distributions

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

whisptray-0.3.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (514.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

whisptray-0.3.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (501.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

whisptray-0.3.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (514.8 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

whisptray-0.3.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (501.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

whisptray-0.3.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (514.8 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

whisptray-0.3.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (501.0 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

whisptray-0.3.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (514.8 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

whisptray-0.3.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (501.0 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

whisptray-0.3.3-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (514.6 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

whisptray-0.3.3-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (500.8 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

File details

Details for the file whisptray-0.3.3.tar.gz.

File metadata

  • Download URL: whisptray-0.3.3.tar.gz
  • Upload date:
  • Size: 64.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for whisptray-0.3.3.tar.gz
Algorithm Hash digest
SHA256 ebf05d5b63fb4ccef7d5d50d4776eeaacb765fbd8d3e41bd05521abfc13ae462
MD5 6a6fc3f82a8503193ed25cdd3408375d
BLAKE2b-256 af0ad7d4e7a2a9fa025bbf75611d825fc79460d2d566056c45701ffc991858a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.3.3.tar.gz:

Publisher: publish-to-pypi.yml on coder0xff/whisptray

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file whisptray-0.3.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for whisptray-0.3.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 95576d6aaf62f556bccb75af646d556593f10a52ac5493c18b6acdab845afead
MD5 6d16e57cf4ef389c4f2a02cd7a480efb
BLAKE2b-256 6729b981c01b3205e9ae2a724d5fe224dcc07d63d00df88a68c94ec8fca41d2d

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.3.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish-to-pypi.yml on coder0xff/whisptray

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file whisptray-0.3.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for whisptray-0.3.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 9e49e089fe22a217cee82e0cc40e6b9a7dc61cb1434933270d8a596bbf70bd8a
MD5 7855a749027eb147f16bc72cc773efdd
BLAKE2b-256 69e7cf1e46258ca0b79bde1caa91f36fd27230651e10f3b864d79185ffe1187e

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.3.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish-to-pypi.yml on coder0xff/whisptray

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file whisptray-0.3.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for whisptray-0.3.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0274e8d9c190d8b21198aa393945de5ee517d155aba60948c7ca05651e4da6a1
MD5 1eff06f85b944c089fc3c6d554db902e
BLAKE2b-256 ebbfa691e1e74ad4763d813c1f498a5c7bd0d44bd51ebb6ab0dc2ff5ed28d4fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.3.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish-to-pypi.yml on coder0xff/whisptray

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file whisptray-0.3.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for whisptray-0.3.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 4cad5db0b120b20b09dfea8bfa53515fecc1c18fe54fa0421db9c443dce018cf
MD5 1dc1e0bb1378a6b31f46b6e9bcc904bd
BLAKE2b-256 96318c746575288d87ae556c48f2d49624b8dcc38343fb30404e174625271d3a

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.3.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish-to-pypi.yml on coder0xff/whisptray

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file whisptray-0.3.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for whisptray-0.3.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9b22ca46c7c9ed4973422a361d470dc53aa75d547d146058bbdcead532c9eade
MD5 19bfb525f57a31a11524170f6d5ca08a
BLAKE2b-256 e92d533d44b25ae96f19ae51adb903b61ba4b31f995785493a40bcfc4363caf7

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.3.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish-to-pypi.yml on coder0xff/whisptray

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file whisptray-0.3.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for whisptray-0.3.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 296a66007016374cb4730bb6f3114d88b5411ec9cd3b871fd7289df42459b639
MD5 06b7db7c7a2544653d90af4e394e64ef
BLAKE2b-256 b7fe17a45bbb53bb3bc387f39f53df568a30deb984807ce3d344156be1fb26cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.3.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish-to-pypi.yml on coder0xff/whisptray

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file whisptray-0.3.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for whisptray-0.3.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 520770ea77ee97a4da1a4aa0cd4e13b5b9e7ad47a0159540bcd8908795dc3cd4
MD5 7917e80a4295bc96704cb57b56ade981
BLAKE2b-256 bc248c7548eabb37c0c2a57c03bc150437326e58076ffd9ed65a0029185d1b3b

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.3.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish-to-pypi.yml on coder0xff/whisptray

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file whisptray-0.3.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for whisptray-0.3.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5f6fa3dad4be2d780489a5090293bc492550822cd4b32bad9d11c016ffeae32b
MD5 a59b603e919fcbb607b21877f8a01673
BLAKE2b-256 4bd1478f6aa6985237a731d0447d79e9ee97c5118f9995255bc53cccc510fec1

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.3.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish-to-pypi.yml on coder0xff/whisptray

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file whisptray-0.3.3-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for whisptray-0.3.3-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 96af8357c08ce089ae06e4ee4c3e1d0ac2acaa12d3e73e793d80b9f3fc0a952d
MD5 db5f909b98de4e7191e22165293804e9
BLAKE2b-256 42a8d0d20abbe9f6aa00576d0e0d246429472a14d5424ad13b09b87131e7ba18

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.3.3-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish-to-pypi.yml on coder0xff/whisptray

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file whisptray-0.3.3-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for whisptray-0.3.3-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 91ff3c820c56035db3293921719e89f506e784f5275e12415c7cb0ae5ad48916
MD5 dbbc277511ec72d9e375d893fb5a9950
BLAKE2b-256 c90968e0c55b4206816a8368b63e98127c93416bf459f12149863f6850b7bf94

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.3.3-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish-to-pypi.yml on coder0xff/whisptray

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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