Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

83 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Voice Input Service

High-quality voice-to-text with advanced hallucination filtering and intelligent silence detection

A multi-platform voice input solution featuring superior transcription quality through advanced text processing and voice activity detection.

🌟 What Makes This Special

Unlike basic Whisper wrappers, this service includes:

  • ✨ Advanced Hallucination Filtering - Removes common Whisper artifacts ("thanks for watching", timestamps, etc.)
  • 🎯 Silero VAD Integration - State-of-the-art voice activity detection
  • πŸ”„ Smart Text Processing - Intelligent overlap detection and text appending
  • 🎀 Multiple Modes - Continuous (auto-pause) and manual recording modes
  • 🌍 Multi-language Support - Works with all Whisper-supported languages

πŸ“± Platforms

Desktop (Windows/macOS/Linux)

Real-time voice-to-text service with system-wide text insertion capabilities.

Status: βœ… Production Ready

Android

System-wide voice keyboard (IME) bringing desktop-quality filtering to mobile.

Status: βœ… IME Complete!

  • Professional voice keyboard with dual modes (Tap/Hold)
  • Real-time audio visualizer
  • Advanced hallucination filtering
  • Cosmos-themed modern UI
  • See Current Status for details

πŸš€ Quick Start

Desktop

# Clone repository
git clone https://github.com/yourusername/STT
cd STT/desktop

# Install dependencies
python -m venv .venv
source .venv/bin/activate  # or .venv\Scripts\activate on Windows
pip install -e ".[dev]"

# Run
python -m voice_input_service

Keyboard Shortcuts:

  • Alt+R - Start/Stop recording
  • Alt+I - Toggle insertion mode
  • Alt+V - Paste text
  • Alt+S - Save transcript
  • Alt+C - Clear text

Android

🚧 Android version is under active development. See Android Port Plan for progress.

πŸ“š Documentation

For Users

For Developers

Android Development

πŸ—οΈ Architecture

Core Components (Shared Logic)

The heart of our quality is in these platform-agnostic algorithms:

  1. Text Processor (docs)

    • 40+ hallucination patterns
    • Intelligent overlap detection
    • Smart text appending with capitalization
  2. Voice Activity Detection (docs)

    • Silero VAD with configurable threshold
    • Frame-based processing (30ms)
    • Device optimization (CPU/GPU/NNAPI)
  3. Audio Processing Pipeline (docs)

    • Buffer management
    • Silence-triggered segmentation
    • Continuous and manual modes

Platform Implementations

Desktop (Python)

Microphone β†’ AudioRecorder β†’ TranscriptionWorker (VAD) β†’
Whisper β†’ TextProcessor β†’ System Text Insertion

Android (Kotlin - In Progress)

AudioRecord β†’ AudioProcessor (VAD) β†’ WhisperEngine β†’
TextProcessor β†’ IME Text Insertion

🎯 Features

Text Quality

  • βœ… Removes Whisper hallucinations automatically
  • βœ… Filters timestamps and artifacts
  • βœ… Intelligent text deduplication
  • βœ… Proper capitalization and spacing
  • βœ… Configurable minimum word count

Voice Detection

  • βœ… Silero VAD (neural network-based)
  • βœ… Configurable sensitivity (0.0-1.0)
  • βœ… Smart silence duration detection
  • βœ… Automatic vs manual modes

Transcription

  • βœ… OpenAI Whisper (tiny β†’ large models)
  • βœ… whisper.cpp support (faster)
  • βœ… Multi-language support
  • βœ… GPU acceleration (CUDA/MPS/CPU)

User Experience

  • βœ… System-wide operation
  • βœ… Direct text insertion or clipboard
  • βœ… Configurable keyboard shortcuts
  • βœ… Session saving with timestamps
  • βœ… Real-time transcription display

πŸ”§ Configuration

Audio Settings

sample_rate: 16000          # Hz
vad_threshold: 0.5          # 0.0-1.0 (higher = less sensitive)
silence_duration_sec: 2.0   # Seconds of silence to trigger processing
max_chunk_duration_sec: 15.0 # Maximum audio chunk size

Transcription Settings

model_name: "base"          # tiny, base, small, medium, large
language: "en"              # Language code or None for auto-detect
use_cpp: true               # Use whisper.cpp (faster)

Full configuration guide: Configuration Documentation

πŸ“Š Quality Comparison

Feature Basic Whisper Other Apps Voice Input Service
Hallucination Filtering ❌ Basic βœ… Advanced (40+ patterns)
Overlap Detection ❌ ❌ βœ… Smart deduplication
VAD Quality Basic Varies βœ… Silero (SOTA)
Text Processing None Basic βœ… Intelligent appending
Continuous Mode ❌ Limited βœ… Fully featured

🀝 Contributing

We welcome contributions! This project is unique in its quality focus.

For Desktop

See Desktop Development Guide

For Android

See Android Port Plan - We're actively porting to Android!

Areas Needing Help

  • 🟒 Easy: Testing on different devices/OS
  • 🟑 Medium: Additional hallucination patterns
  • πŸ”΄ Advanced: Android IME development

πŸ“ˆ Roadmap

Completed βœ…

  • Desktop voice input service
  • Advanced hallucination filtering
  • Silero VAD integration
  • whisper.cpp support
  • Continuous mode with smart appending
  • Comprehensive documentation

In Progress 🚧

  • Android Settings & Configuration UI
  • Main app polish
  • Real-world testing in popular apps

Planned πŸ“‹

  • iOS version
  • Web app (browser-based)
  • Cloud sync for transcripts
  • Custom model fine-tuning
  • Multi-speaker diarization

πŸ› Known Issues

See GitHub Issues for current bugs and feature requests.

Desktop:

  • FFmpeg required for Whisper
  • Large models slow on CPU
  • Windows-only keyboard shortcuts (for now)

Android:

  • In development - not yet functional

πŸ“ License

MIT License - See LICENSE file for details.

πŸ™ Acknowledgments

  • OpenAI Whisper team for the excellent STT model
  • ggerganov for whisper.cpp
  • Silero team for VAD models
  • All contributors and testers

πŸ’¬ Support


Built with ❀️ for high-quality voice input

⭐ Star this repo if you find it useful!


Repository Structure

STT/
β”œβ”€β”€ android/              # Android application (in development)
β”œβ”€β”€ desktop/              # Desktop application (Python)
β”œβ”€β”€ docs/                 # Documentation
β”‚   β”œβ”€β”€ core/            # Shared algorithm docs
β”‚   β”œβ”€β”€ desktop/         # Desktop-specific docs
β”‚   └── android/         # Android-specific docs
β”œβ”€β”€ ANDROID_PORT_PLAN.md # Detailed Android porting plan
β”œβ”€β”€ QUICKSTART.md        # Quick start for contributors
└── README.md            # This file

For developers: Start with QUICKSTART.md to understand the project structure and begin contributing.

About

Speech-to-Text utilizing Whisper locally on Android and Windows

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages