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 simple dictation program that uses OpenAI's Whisper for speech-to-text, pynput for simulating keyboard input, and pystray for a system tray icon.

Features

  • Real-time dictation using Whisper.
  • Types recognized text into the currently active application.
  • System tray icon to toggle dictation and exit the application.
  • Configurable Whisper model and audio parameters via command-line arguments.

Installation And Use

pip install whisptray
whisptray

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

You can customize the behavior using command-line arguments:

whisptray --model small --energy_threshold 1200

Available arguments:

  • --mic: Name of the microphone to use. Pass "list" to see available mics. (default: "default)
  • --model: Whisper model to use (choices: "tiny", "base", "small", "medium", "large", "turbo" - default: "turbo").
  • --non_english: Use the multilingual model variant (if applicable for the chosen size).
  • --energy_threshold: Energy level for mic to detect (default: 1000).
  • --record_timeout: How real-time the recording is in seconds (default: 2.0).
  • --phrase_timeout: Silence duration before a new phrase is considered (default: 3.0).
  • --default_microphone (Linux only): Name or part of the name of the microphone to use (default: 'pulse'). Use whisptray --default_microphone list to see available microphones.

Development

  1. Clone this repository:

    git clone https://github.com/coder0xff/whisptray.git # Replace with your repo URL
    cd whisptray
    
  2. Linux System Dependency (PortAudio for PyAudio): PyAudio is a dependency for microphone access and requires the PortAudio library. If installation in the previous step fails or PyAudio has issues, you may need to install the development headers.

    • Debian/Ubuntu-based systems:
      sudo apt-get update && sudo apt-get install portaudio19-dev
      
    • For other distributions, please consult their package manager for the appropriate PortAudio development package.
  3. System Dependency (ffmpeg for Whisper): Ensure ffmpeg is installed on your system, as Whisper requires it for audio processing.

    • Debian/Ubuntu-based systems: sudo apt update && sudo apt install ffmpeg
  4. 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.2.2.tar.gz (57.7 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.2.2-cp312-cp312-manylinux_2_28_aarch64.whl (497.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

whisptray-0.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (478.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

whisptray-0.2.2-cp311-cp311-manylinux_2_28_aarch64.whl (497.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

whisptray-0.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (478.8 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

whisptray-0.2.2-cp310-cp310-manylinux_2_28_aarch64.whl (497.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

whisptray-0.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (478.8 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

whisptray-0.2.2-cp39-cp39-manylinux_2_28_aarch64.whl (497.5 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ ARM64

whisptray-0.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (478.8 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

whisptray-0.2.2-cp38-cp38-manylinux_2_28_aarch64.whl (497.3 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.28+ ARM64

whisptray-0.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (478.6 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

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

File metadata

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

File hashes

Hashes for whisptray-0.2.2.tar.gz
Algorithm Hash digest
SHA256 a4b6425574dbf99c663afd379e5c79361bbbd8f4f9679f26d88d73782de8ac17
MD5 946e49f69ecebeed3af1ed5e98c12626
BLAKE2b-256 1dd9af1e8c9dd033869283d288b1ac3d0f6f0de2de27aa64743d8743680ece9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.2.2.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.2.2-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for whisptray-0.2.2-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 9c689a6acc39d290ad30682ac62f9609584454797c5aa03f35c0bc9d86cd4a6e
MD5 371b7dbb2c7683225ddefa0c65091070
BLAKE2b-256 4c5a2d9e5e061584c51449d5adf8684fdf936fc9035395fa8c9c2a701385799f

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.2.2-cp312-cp312-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.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for whisptray-0.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f5c81293f8bf41662c75eb845e6be0605ea8fdf40d73f2fd93b69555ea5a5501
MD5 42056fe65d7cf8613cc951e93bc77b3e
BLAKE2b-256 226cdcafbc2af17d4d519df5acc2e042c42e39e3186c1d374d3e438533aa7504

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_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.2.2-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for whisptray-0.2.2-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 88b9233af7a168b1b220dc48a551c7852b1a8dfbb24fd00beda3e933599f3bc8
MD5 1061bb02171d72e6f30a40d72b9cb912
BLAKE2b-256 df88fdcc5880d102e95532a92499ad499eed9d2ec2ded8f041de6a36cf2a8714

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.2.2-cp311-cp311-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.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for whisptray-0.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8a9854f3aabf6990b87b59a8de9e6d54d08bf0f1272342cc84a402a6112e3b5b
MD5 1e4263f599b6e27702d8f89a959ea832
BLAKE2b-256 0dd6ec412485e696a2592b715868988c26355914f8d09a8b45d7abc72dd2a538

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_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.2.2-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for whisptray-0.2.2-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 9379739f841da13a553d4c5d9ee9c42b0a2d58c16b987e2435017be5c4b15d63
MD5 7e45ba121389baa15dc05a79cd45f3de
BLAKE2b-256 b217b9b64107e0cee6f2c837e8245518465b7d9a78cce6ad6f13dc1e05857686

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.2.2-cp310-cp310-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.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for whisptray-0.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 565521a0d471c1bd71c382356197d6306d84b146b1fe4e534077f784918bc460
MD5 7afe9d28fbb21ef0922f17a49288124c
BLAKE2b-256 665a6a4e0bc08e5a396c502eddcbda80771c739e6780e246d8f8f977d6671773

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_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.2.2-cp39-cp39-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for whisptray-0.2.2-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 191f0769d4db3cdf25c7d770e79f045620d8288e5c516d3e978ceb1cd8fbedec
MD5 da73064dd5537b353294eb04c74643c1
BLAKE2b-256 418212f268820a4d54529f90ea9bb4615fff4b1f115d4ef4de8340916c3e547a

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.2.2-cp39-cp39-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.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for whisptray-0.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3ece80dd670d7994d15123b091f52e8413c6f226ebd914a763b96459d91c2920
MD5 88947f49beb19fa6a4a7c9b0c537abd7
BLAKE2b-256 f460292eb8b401b302f9c5d73b43480b157b8f45a620714b789f35d6694b08e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_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.2.2-cp38-cp38-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for whisptray-0.2.2-cp38-cp38-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 94c0659205e6d00f25efc53ee596fd72d429f03a8824d8142c6fa4fedb65a641
MD5 11386d00a4ff650c36699a5e567d2591
BLAKE2b-256 ae6d628f4a7f652696c2c398afbf06cee1af8d51c3ad65c987bf73d87650bd29

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.2.2-cp38-cp38-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.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for whisptray-0.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1ae2fe3968e1102b01c50c66352abea0871d32cec7d17162e83807d96057053a
MD5 e42fe2e279a19489748a27c5265323b4
BLAKE2b-256 8086fed1f84f8a26d4f09b5d9dbddbb33390d418b11f3796a39eb9a3462c1e92

See more details on using hashes here.

Provenance

The following attestation bundles were made for whisptray-0.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_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.

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