简介
本地化 GPU 加速语音转文字工具,基于 Faster Whisper 实现隐私安全、零 API 成本的高速转录,支持 99 种语言与多格式导出。
原始描述
High-performance local speech-to-text transcription using Faster Whisper with NVIDIA GPU acceleration. Transcribe audio files locally without sending data to...
通过你的 Agent 添加
安装目录:faster-whisper-gpu/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
Faster Whisper GPU是一款面向隐私优先场景的高性能语音转文本工具,基于SYSTRAN优化的Faster Whisper引擎,专为NVIDIA GPU加速设计。用户通过命令行或Python API即可将MP3、WAV、FLAC等格式的音频文件快速转换为TXT、SRT、JSON等多种输出格式。
基础使用极为简洁:安装faster-whisper和torch后,执行python transcribe.py audio.mp3即可自动检测GPU并完成转写。进阶功能涵盖语言显式指定(--language pt)、字幕生成(--format srt)、模型精度选择(tiny至large-v3)、语音活动检测(VAD)过滤、以及词级时间戳等。特别支持--task translate模式,可将任意语言音频直译为英文文本。
硬件层面,推荐配置为4GB+显存的NVIDIA GPU,但同步提供CPU-only模式确保兼容性。模型按需自动下载至本地缓存,首次使用后即可完全离线运行。
显著优点
隐私安全为核心卖点:100%本地处理,音频数据绝不外发,满足企业会议、医疗记录、法律取证等高敏感场景的合规要求。相比云端API方案,彻底消除数据泄露风险。
经济性突出:零API调用费用,无使用次数限制,适合长音频、大批量转写需求。large-v3模型虽需10GB显存,但单次投入硬件后即可无限次使用。
速度与精度平衡:GPU加速下,base模型可实现约16倍实时转写速度,large-v3模型在RTX 4090上仍保持实时处理能力。多模型梯队设计让用户按需取舍。
多语言与格式覆盖:自动识别99种语言,支持主流音频格式输入,输出格式涵盖纯文本、SRT字幕、JSON结构化数据及VTT格式,满足播客制作、视频字幕、会议纪要等多场景需求。
潜在缺点与局限性
硬件门槛限制:CUDA加速依赖NVIDIA显卡,AMD/Intel GPU及Apple Silicon用户仅能使用CPU模式,速度显著下降。large-v3模型需10GB显存,对消费级显卡构成压力。
模型存储开销:首次使用需下载39MB至1.5GB不等的模型文件,large-v3完整部署约占用10GB磁盘空间。网络受限环境需提前预下载。
文件覆盖风险:输出路径由用户指定,当前版本缺少覆盖确认机制,误操作可能导致现有文件被清空。
依赖链复杂:依赖PyTorch、CTranslate2等重型ML库,环境配置可能遇到CUDA版本兼容性问题,对非技术用户存在上手门槛。
适合的目标群体
内容创作者:播客主、视频UP主需批量生成字幕,本地处理避免原始素材上传云端。
企业与研究机构:会议记录、访谈转写、学术演讲整理等场景,满足数据不出域的合规要求。
隐私敏感用户:医疗、法律、金融等行业的语音数据处理,杜绝第三方服务的数据留存风险。
技术爱好者与开发者:Python API支持深度集成,可嵌入自动化工作流或自研应用中。
使用风险与注意事项
依赖安全风险:核心依赖faster-whisper、torch等库由社区维护,需关注CVE安全更新。建议在虚拟环境中隔离安装。
性能波动风险:长音频转写可能耗时数分钟,当前版本无进度显示,用户体验待优化。
来源可信度:T3级个人开发者发布,虽代码审查无恶意痕迹,但建议关注GitHub仓库更新动态,升级前进行代码审查。
网络行为认知:首次模型下载由依赖库自动发起,虽可通过HF_HOME自定义缓存路径,但企业内网用户需提前配置代理或预下载模型。
技能正文
name: faster-whisper-gpu description: High-performance local speech-to-text transcription using Faster Whisper with NVIDIA GPU acceleration. Transcribe audio files locally without sending data to external services. homepage: https://github.com/FelipeOFF/faster-whisper-gpu metadata: clawdbot: emoji: 🎙️ category: audio tags: - transcription - stt - speech-to-text - whisper - gpu - cuda - local - privacy requires: bins: - python3 python_packages: - faster-whisper - torch install: - id: pip kind: pip packages: - faster-whisper - torch label: Install faster-whisper and PyTorch
🎙️ Faster Whisper GPU
High-performance local speech-to-text transcription using Faster Whisper with NVIDIA GPU acceleration.
✨ Features
- 🚀 GPU Accelerated: Uses NVIDIA CUDA for blazing-fast transcription
- 🔒 100% Local: No data leaves your machine. Complete privacy.
- 💰 Free Forever: No API costs. Run unlimited transcriptions.
- 🌍 Multilingual: Supports 99 languages with automatic detection
- 📁 Multiple Formats: Input: MP3, WAV, FLAC, OGG, M4A. Output: TXT, SRT, JSON
- 🎯 Multiple Models: From tiny (fast) to large-v3 (most accurate)
- 🎬 Subtitle Generation: Create SRT files with word-level timestamps
📋 Requirements
Hardware
- NVIDIA GPU with CUDA support (recommended: 4GB+ VRAM)
- Or CPU-only mode (slower but works on any machine)
Software
- Python 3.8+
- NVIDIA drivers (for GPU support)
- CUDA Toolkit 11.8+ or 12.x
🚀 Quick Start
Installation
# Install dependencies
pip install faster-whisper torch
# Verify GPU is available
python -c "import torch; print(f'CUDA available: {torch.cuda.is_available()}')"
Basic Usage
# Transcribe an audio file (auto-detects GPU)
python transcribe.py audio.mp3
# Specify language explicitly
python transcribe.py audio.mp3 --language pt
# Output as SRT subtitles
python transcribe.py audio.mp3 --format srt --output subtitles.srt
# Use larger model for better accuracy
python transcribe.py audio.mp3 --model large-v3
🔧 Advanced Usage
Command Line Options
python transcribe.py <audio_file> [options]
Options:
--model {tiny,base,small,medium,large-v1,large-v2,large-v3}
Model size to use (default: base)
--language LANG Language code (e.g., 'pt', 'en', 'es'). Auto-detect if not specified.
--format {txt,srt,json,vtt}
Output format (default: txt)
--output FILE Output file path (default: stdout)
--device {cuda,cpu} Device to use (default: cuda if available)
--compute_type {int8,int8_float16,int16,float16,float32}
Computation precision (default: float16)
--task {transcribe,translate}
Task: transcribe or translate to English (default: transcribe)
--vad_filter Enable voice activity detection filter
--vad_parameters MIN_DURATION_ON,MIN_DURATION_OFF
VAD parameters as comma-separated values
--condition_on_previous_text
Condition on previous text (default: True)
--initial_prompt PROMPT
Initial prompt to guide transcription
--word_timestamps Include word-level timestamps (for SRT/JSON)
--hotwords WORDS Comma-separated hotwords to boost recognition
Examples
Portuguese Transcription with SRT Output
python transcribe.py meeting.mp3 --language pt --format srt --output meeting.srt
English Translation from Any Language
python transcribe.py japanese_audio.mp3 --task translate --format txt
High-Accuracy Mode with Large Model
python transcribe.py podcast.mp3 --model large-v3 --vad_filter --word_timestamps
CPU-Only Mode (no GPU)
python transcribe.py audio.mp3 --device cpu --compute_type int8
🐍 Python API
from faster_whisper import WhisperModel
# Load model
model = WhisperModel("base", device="cuda", compute_type="float16")
# Transcribe
segments, info = model.transcribe("audio.mp3", language="pt")
print(f"Detected language: {info.language} (probability: {info.language_probability:.2f})")
for segment in segments:
print(f"[{segment.start:.2f}s -> {segment.end:.2f}s] {segment.text}")
📊 Model Sizes & VRAM Requirements
| Model | Parameters | VRAM Required | Relative Speed | Accuracy |
|---|---|---|---|---|
| tiny | 39 M | ~1 GB | ~32x | Basic |
| base | 74 M | ~1 GB | ~16x | Good |
| small | 244 M | ~2 GB | ~6x | Better |
| medium | 769 M | ~5 GB | ~2x | Great |
| large-v3 | 1550 M | ~10 GB | 1x | Best |
Benchmarks measured on NVIDIA RTX 4090
🔍 Supported Languages
Faster Whisper supports 99 languages including:
- Portuguese (
pt) - English (
en) - Spanish (
es) - French (
fr) - German (
de) - Italian (
it) - Japanese (
ja) - Chinese (
zh) - Russian (
ru) - And 90+ more...
🛠️ Troubleshooting
CUDA Out of Memory
# Use smaller model
python transcribe.py audio.mp3 --model tiny
# Or use CPU
python transcribe.py audio.mp3 --device cpu
# Or reduce precision
python transcribe.py audio.mp3 --compute_type int8
Model Download Issues
Models are automatically downloaded on first use to ~/.cache/huggingface/hub/.
If behind a proxy, set:
export HF_HOME=/path/to/custom/cache
Slow Transcription
- Ensure GPU is being used: check
nvidia-smiduring transcription - Use smaller model for faster results
- Enable VAD filter to skip silent parts
🤝 Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Submit a pull request
📜 License
MIT License - See LICENSE for details.
Faster Whisper is developed by SYSTRAN and based on OpenAI's Whisper.
🙏 Acknowledgments
- OpenAI Whisper - Original model
- Faster Whisper - Optimized implementation
- CTranslate2 - Fast inference engine
Made with ❤️ for the OpenClaw community
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。