Skip to main content

Python based STT module running on GPU

Project description

STT Type v1.0.0

Python based STT module running on GPU.

Hold F2 to record your voice, release to transcribe and type the text automatically at your cursor position.

Features

  • Cross-platform - Works on Windows, Linux, and macOS
  • Hold F2 to record - Audio captures while key is held
  • Visual indicator - Semi-transparent red dot with "F2" label appears in top-right corner while recording
  • Bell sounds - Audio feedback when recording starts/stops
  • GPU-accelerated STT - Uses faster-whisper on your NVIDIA GPU
  • Auto-typing - Transcribed text is typed at cursor position
  • System tray mode - Runs silently in background
  • Auto-startup - Starts automatically on login

Requirements

  • Python 3.9+
  • NVIDIA GPU with CUDA support (for GPU mode)
  • Microphone

Installation

Prerequisites

Install PyTorch with CUDA support:

# Windows/Linux
pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu118

# macOS (CPU only, no CUDA)
pip install torch torchaudio

Windows

cd "E:\Lucas\STT Type"
.\install.ps1

Then restart PowerShell.

Linux

cd /path/to/stttype
chmod +x install.sh
./install.sh

If sounddevice fails, install PortAudio:

# Debian/Ubuntu
sudo apt-get install portaudio19-dev

# Fedora
sudo dnf install portaudio-devel

# Arch
sudo pacman -S portaudio

macOS

cd /path/to/stttype
chmod +x install.sh
./install.sh

If sounddevice fails, install PortAudio:

brew install portaudio

Note: On macOS, you need to grant Accessibility permissions for pynput to capture global hotkeys. Go to System Settings > Privacy & Security > Accessibility and add your terminal application.

Commands

Once installed, stttype works from any terminal.

Command Description
stttype --start Start STT Type in background
stttype --shutdown Stop all STT Type processes
stttype --status Check if STT Type is running
stttype --restart Restart STT Type
stttype --addtostartup Add to startup
stttype --rmtostartup Remove from startup
stttype --model <size> Set Whisper model (tiny/base/small/medium/large-v3)
stttype --lang <code> Set language (en/zh/auto/etc)
stttype --help Show help

Examples

# Start with default settings
stttype --start

# Start with a larger model for better accuracy
stttype --start --model small

# Start with Chinese language
stttype --start --lang zh

# Start with small model and auto-detect language
stttype --start --model small --lang auto

How It Works

  1. Hold F2 - A semi-transparent red dot with "F2" appears in the top-right corner, microphone starts recording
  2. Release F2 - Red dot disappears, recording stops
  3. GPU transcribes - Whisper processes audio on your NVIDIA GPU
  4. Text is typed - Result appears at your cursor position

Models

Model Size VRAM Speed Accuracy
tiny 39 MB ~1 GB Fastest Basic
base 74 MB ~1 GB Fast Good
small 244 MB ~2 GB Medium Better
medium 769 MB ~5 GB Slower Best
large-v3 1550 MB ~10 GB Slowest Excellent

Default is base - a good balance of speed and accuracy.

Uninstall

Windows

cd "E:\Lucas\STT Type"
.\uninstall.ps1

Linux/macOS

cd /path/to/stttype
chmod +x uninstall.sh
./uninstall.sh

Troubleshooting

Issue Solution
stttype not found Restart terminal after installation
"CUDA not available" Install NVIDIA drivers and CUDA toolkit
No sound on start/stop Check system volume
Text not typing Make sure the target window is focused
Model download fails Check internet connection
Hotkeys don't work (macOS) Grant Accessibility permissions to your terminal
Hotkeys don't work (Linux) Make sure you're running under X11 (not Wayland)

Publish to PyPI

# Install build tools
pip install build twine

# Build
cd /path/to/stttype
python -m build

# Upload
python -m twine upload dist/*

When prompted:

  • Username: __token__
  • Password: Your PyPI API token

Author: LucasApps
Version: 1.0.0
License: MIT

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

stttype-1.0.1.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

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

stttype-1.0.1-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stttype-1.0.1.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.1

File hashes

Hashes for stttype-1.0.1.tar.gz
Algorithm Hash digest
SHA256 4bdc22f4f5f9039a3c25168065c692f2bbd9b356fa3a15d52534b99873975732
MD5 b8e2b3fddfc73b7ca6f2ce039b32b2f2
BLAKE2b-256 15efcf253eb99a97c592356114baab6bfa77184a7343628203147a2fe3cfaaa0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: stttype-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.1

File hashes

Hashes for stttype-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 824f8f56582d4ec9b2ef8bfe008e063e8223e9e87f36f424f4e4475f641853a4
MD5 5587034c2de427c972bfdb7d3e247375
BLAKE2b-256 a7413f228038b319f68213acf2f9d20bd37065fc800a2624402c76aede3eb4f8

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