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 your computer doesn't have a modern GPU, 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.4.dev6.tar.gz (64.9 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.4.dev6-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (514.9 kB view details)

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

whisptray-0.3.4.dev6-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (501.2 kB view details)

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

whisptray-0.3.4.dev6-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (514.9 kB view details)

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

whisptray-0.3.4.dev6-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (501.2 kB view details)

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

whisptray-0.3.4.dev6-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (514.9 kB view details)

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

whisptray-0.3.4.dev6-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (501.2 kB view details)

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

whisptray-0.3.4.dev6-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (514.9 kB view details)

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

whisptray-0.3.4.dev6-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (501.2 kB view details)

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

whisptray-0.3.4.dev6-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (514.7 kB view details)

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

whisptray-0.3.4.dev6-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (501.0 kB view details)

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

File details

Details for the file whisptray-0.3.4.dev6.tar.gz.

File metadata

  • Download URL: whisptray-0.3.4.dev6.tar.gz
  • Upload date:
  • Size: 64.9 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.4.dev6.tar.gz
Algorithm Hash digest
SHA256 a2601d4016e374cee22d3d719279af8d7e338a7a86af801aa985efcf7214fdf4
MD5 3e10959e4fd76663b4baed7da835b303
BLAKE2b-256 1543644f646046d5d78ce09182a3485a6a279f944d2afa6c65e7c2751e04dc87

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.3.4.dev6.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.4.dev6-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.4.dev6-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 09b6f0da11fb3ec4515dabc3992217a2255c9d9351548e9bf2eddb050cf65ab5
MD5 5d7e6307c061a31a8af070c7a0942044
BLAKE2b-256 d7029fb836c7db8f56d35829fa67406e5e4923a2bacef5d1b083d964b0263992

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.3.4.dev6-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.4.dev6-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for whisptray-0.3.4.dev6-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 9437e000f56ca0cb6221d9b5231e3b83c3f29bd31c350099cb885dda07edc292
MD5 dabd266e57f51aef9a0c2c983b4b83f4
BLAKE2b-256 9e3e3ee74adc1f8ec8bd2b89b2493871e4a8def884263a9238640396cb08566c

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.3.4.dev6-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.4.dev6-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.4.dev6-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 352d2b317120bf1f273cb6d00ff5657e3174f6e34d0b3469010b9923eefb956a
MD5 188aa79899bdda67c7e02a32e406adf5
BLAKE2b-256 598d4e73c4a03818d7bbe274bca3fd299f7e0248277bc6d599209986ed252911

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.3.4.dev6-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.4.dev6-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for whisptray-0.3.4.dev6-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5bbdded0a2a7a86203dac771de42e29ceb78288be0929c6a5587d5d34a86f735
MD5 afd2344d199748d562fdc94b9d21eca7
BLAKE2b-256 d584bdd80c2b0d39eb4612bb329f8149fd87cbc4552c56c6541ca1c61ed79772

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.3.4.dev6-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.4.dev6-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.4.dev6-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 552f945569aeb57f827feb2953def3aff169c6be80d47fcdbecd75d400d8c535
MD5 ab2584b039b9673d70918a579a2de639
BLAKE2b-256 8846de639f5946ce9f8c0d3ccbea10d6227dc27e024fcb81ef102c810d2faec4

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.3.4.dev6-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.4.dev6-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for whisptray-0.3.4.dev6-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5dd3d02028abf88b71c91bf738fc3d3665ad1108c368fdd4aa1bb8730de6aae5
MD5 fd4dfc3deb21fd6b1197a366505ad5b7
BLAKE2b-256 86a3f4129215d555ec64425a7e4f5c3334423c56e466d4744a93e44711bed730

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.3.4.dev6-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.4.dev6-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.4.dev6-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9e8be676f4a705836167ff361d71f76528ea069e2af6955ab45b73ce06ab4c9a
MD5 60dcbd4f4d643ce790eed975d85e2554
BLAKE2b-256 e7227ce905d0c9eacc47d9560c4e11127682282b07dd6ad61825cf1f02484baa

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.3.4.dev6-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.4.dev6-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for whisptray-0.3.4.dev6-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 9f978a04e259e344627e37098e8fe7f036253f792ddd679b3c58a23c800e3ed1
MD5 a4bbd9d83316283ff296ef131602098f
BLAKE2b-256 d47bc7343d0bcf210c04d640ab1d05a39337d3dbf471a851092b75e790e3f726

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.3.4.dev6-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.4.dev6-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.4.dev6-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 df2d31dd10b83fa54ff0a7ef2147b5aca72986c548b22302d46a3555e5a9c2db
MD5 4b3cc10217c9d893b2b44f91eb1b9810
BLAKE2b-256 ca74dbfb488e1f9258eb823330525cf17bbdce224bdff03202462dcb4f6d8cec

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.3.4.dev6-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.4.dev6-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for whisptray-0.3.4.dev6-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 463160590741f777d052babe95203fd2a47e8d44bc6bd493e0ea7451e019ff1a
MD5 48119c08b12ff182a0bd9fa4d1d9bbd9
BLAKE2b-256 d2e547fe0f50ca126803d733060cd408f2347b9f8b31bc2d45d73806ab7483fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.3.4.dev6-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