Faster-Whisper
High-performance local speech-to-text using faster-whisper.
Setup
1. Run Setup Script
Execute the setup script to create a virtual environment and install dependencies. It will automatically detect NVIDIA GPUs for CUDA acceleration.
CODEBLOCK0
Requirements:
- - Python 3.10 or later
- ffmpeg (installed on the system)
Usage
Use the transcription script to process audio files.
Basic Transcription
CODEBLOCK1
Advanced Options
- - Specific Model: INLINECODE0
- Word Timestamps: INLINECODE1
- JSON Output: INLINECODE2
- VAD (Silence Removal): INLINECODE3
Available Models
- -
distil-large-v3 (default): Best balance of speed and accuracy. - INLINECODE5 : Recommended for multilingual or highest accuracy tasks.
- INLINECODE6 ,
small.en: Faster, English-only versions.
Troubleshooting
- - No GPU detected: Ensure NVIDIA drivers and CUDA are correctly installed. CPU transcription is significantly slower.
- OOM Error: Use a smaller model (e.g.,
small or base) or use --compute-type int8.
Faster-Whisper
使用faster-whisper实现高性能本地语音转文字。
设置
1. 运行设置脚本
执行设置脚本以创建虚拟环境并安装依赖项。它将自动检测NVIDIA GPU以实现CUDA加速。
bash
./setup.sh
要求:
- - Python 3.10或更高版本
- ffmpeg(已安装在系统中)
使用方法
使用转录脚本处理音频文件。
基础转录
bash
./scripts/transcribe audio.mp3
高级选项
- - 指定模型:./scripts/transcribe audio.mp3 --model large-v3-turbo
- 词级时间戳:./scripts/transcribe audio.mp3 --word-timestamps
- JSON输出:./scripts/transcribe audio.mp3 --json
- VAD(静音移除):./scripts/transcribe audio.mp3 --vad
可用模型
- - distil-large-v3(默认):速度与准确性的最佳平衡。
- large-v3-turbo:推荐用于多语言或最高准确性任务。
- medium.en、small.en:更快的纯英文版本。
故障排除
- - 未检测到GPU:确保NVIDIA驱动程序和CUDA已正确安装。CPU转录速度会显著变慢。
- 内存溢出错误:使用较小的模型(例如small或base),或使用--compute-type int8参数。