Metadata-Version: 2.4
Name: stttype
Version: 2.0.1
Summary: Cross-platform voice-to-text typing assistant with GPU acceleration and automatic CPU fallback
Author: LucasApps
License: MIT
Project-URL: Homepage, https://github.com/LucasApps/stttype
Project-URL: Issues, https://github.com/LucasApps/stttype/issues
Keywords: stt,speech-to-text,whisper,voice,typing,keyboard
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: faster-whisper>=1.0.0
Requires-Dist: sounddevice>=0.4.6
Requires-Dist: soundfile>=0.12.1
Requires-Dist: numpy>=1.24.0
Requires-Dist: pynput>=1.7.0
Requires-Dist: pyautogui>=0.9.54
Requires-Dist: pyperclip>=1.8.2
Requires-Dist: pystray>=0.19.4
Requires-Dist: pillow>=10.0.0
Requires-Dist: psutil>=5.9.0
Provides-Extra: gpu
Requires-Dist: torch>=2.0.0; extra == "gpu"
Requires-Dist: torchaudio>=2.0.0; extra == "gpu"

# 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:

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

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

### Windows

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

Then restart PowerShell.

### Linux

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

If `sounddevice` fails, install PortAudio:
```bash
# Debian/Ubuntu
sudo apt-get install portaudio19-dev

# Fedora
sudo dnf install portaudio-devel

# Arch
sudo pacman -S portaudio
```

### macOS

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

If `sounddevice` fails, install PortAudio:
```bash
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

```bash
# 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
```powershell
cd "E:\Lucas\STT Type"
.\uninstall.ps1
```

### Linux/macOS
```bash
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

```bash
# 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
