Speech Recognition Channel: STT Local Recognition Tool
What is this?
STT is an offline local speech recognition tool based on the Faster-Whisper open-source model, capable of converting human speech in video or audio to text.
Key features:
- Fully offline — no internet required
- Multiple output formats: JSON, SRT subtitles, plain text
- Built-in base model with additional models available for download
- CUDA GPU acceleration support
- Accuracy comparable to OpenAI's official API
GitHub repository: https://github.com/jianchang512/stt
Available Models
STT supports the following Whisper models, listed from lowest to highest recognition quality:
| Model | Parameters | VRAM | Quality | Use Case |
|---|---|---|---|---|
| base | 74M | ~1 GB | Basic | Quick testing, simple scenarios |
| small | 244M | ~2 GB | Good | Daily use |
| medium | 769M | ~5 GB | Very good | Multilingual recognition |
| large | 1550M | ~10 GB | Excellent | High-accuracy recognition |
| large-v3 | 1550M | ~10 GB | Best | Highest accuracy requirements |
Model download: https://github.com/jianchang512/stt/releases/tag/0.0
Model selection tip: If GPU VRAM is limited, start with the base or small model. Larger models are more accurate but require more hardware resources.
Pre-compiled Windows Version
Requirements
- Windows 10/11 64-bit
- For GPU acceleration: NVIDIA GPU with CUDA properly configured
Installation Steps
Download the pre-compiled package Visit the Releases page and download the latest pre-compiled package.
Extract the files Extract to any location. Paths without Chinese characters or spaces are recommended, such as
E:/stt.Start the service Double-click
start.exeand wait for the browser to automatically open the local web interface.Recognize speech
- Click the upload area or drag an audio/video file onto it
- Select the spoken language (Chinese/English/Auto-detect, etc.)
- Select the output format (JSON/SRT/plain text)
- Select the model to use (base model is built in)
- Click "Start Recognition"
- Wait for completion — results will appear in the text box at the bottom of the page
GPU acceleration If the machine has an NVIDIA GPU with CUDA properly configured, GPU acceleration will be used automatically.
Linux and macOS Source Code Deployment
Requirements
- Python 3.9 to 3.11
- pip package manager
- FFmpeg (must be installed manually)
Deployment Steps
Create project directory and clone the source code
Create an empty directory (e.g.,
E:/stt), open a terminal in that directory (on Windows, typecmdin the address bar and press Enter), then run:bashgit clone [email protected]:jianchang512/stt.git .Create and activate a virtual environment
bash# Create virtual environment python -m venv venv # Activate (choose based on OS) # Windows: %cd%/venv/scripts/activate # Linux/Mac: source ./venv/bin/activateInstall dependencies
bashpip install -r requirements.txtTip: If you encounter version conflicts, try
pip install -r requirements.txt --no-depsto skip dependency checks.Install FFmpeg
- Windows: Extract
ffmpeg.7zand placeffmpeg.exeandffprobe.exein the project root directory - Linux/Mac: Download from the FFmpeg official site and place the
ffmpegandffprobebinaries in the project root directory
- Windows: Extract
Download the model
Visit the model download page and download the desired model. Place the
.ptfile in themodelsfolder inside the project root directory.Start the service
bashpython start.pyWait for the browser window to open automatically.
API Reference
STT provides a RESTful API for integration with other tools.
Endpoint
POST {url}/apiRequest Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| file | File | Yes | Audio file (WAV format, 16kHz sample rate, mono) |
| language | String | No | Language code (e.g., zh, en). Leave empty for auto-detect. |
| model | String | No | Model name (e.g., base, small) |
| response_format | String | No | Output format: json, srt, text |
Response Format
{
"code": 0,
"data": "Recognized text or SRT content"
}codeis 0 for success, 1 for failuredatacontains the recognition result
Retry Mechanism
The API supports automatic retry — if recognition fails, it will automatically retry.
Common Issues
| Issue | Possible Cause | Solution |
|---|---|---|
| Browser doesn't open automatically | Firewall block or port in use | Manually visit http://localhost:7860 |
| Empty recognition results | Unsupported audio format | Convert audio to WAV format (16kHz, mono) using FFmpeg |
| Very slow recognition | GPU acceleration not enabled | Check CUDA environment; ensure NVIDIA drivers and CUDA Toolkit are installed correctly |
| Insufficient VRAM error | GPU VRAM not enough | Switch to a smaller model (e.g., base or small) |
| Dependency installation failed | Python version incompatibility | Ensure Python 3.9–3.11 is being used |
| FFmpeg not found | FFmpeg not placed correctly | Ensure ffmpeg and ffprobe are in the project root directory |
