低延迟本地语音转文字引擎
简介
基于CTranslate2优化的开源Whisper实现,支持模型缓存复用,无需云端依赖即可在本地完成高质量语音转录,特别适合隐私敏感场景。
原始描述
Local speech-to-text with the faster-whisper backend (CTranslate2). Use when transcribing audio locally, setting up the faster-whisper model cache, or replac...
通过你的 Agent 添加
安装目录:mj-windows-faster-whisper/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
Faster-Whisper是一个针对OpenAI Whisper模型进行性能优化的本地语音转文字解决方案。与原始Whisper相比,它通过CTranslate2推理引擎实现了显著的速度提升,同时保持相同的转录质量。
使用流程清晰明确:首先需要确认系统已安装Python和FFmpeg环境,然后通过pip安装faster-whisper、ctranslate2和huggingface_hub三个核心依赖。关键步骤是从Hugging Face下载Systran/faster-whisper-small模型到本地固定目录,后续所有转录任务均可复用该缓存模型,避免重复下载。实际转录时,系统会自动处理音频格式转换(如Telegram的OGG/Opus转WAV),加载本地模型后输出纯文本结果。
技术实现上,该技能默认采用CPU模式(device='cpu')和8位整数计算(compute_type='int8'),这种配置在大多数消费级设备上都能获得良好的性价比平衡,无需强制要求GPU支持。
显著优点
性能优化突出:CTranslate2引擎通过算子融合、层融合和量化技术,在CPU上的推理速度可比原始Whisper快2-4倍,内存占用也更低。
完全本地运行:所有数据处理在本地完成,音频文件无需上传至第三方服务器,对隐私合规要求严格的场景(如医疗、法律、金融录音转录)具有天然优势。
模型缓存机制:一次下载后永久复用,支持离线环境使用,也避免了重复下载带来的带宽消耗和时间成本。
格式兼容性好:内置FFmpeg集成,可自动处理多种音频格式转换,降低用户使用门槛。
硬件要求灵活:默认CPU配置即可工作,不强制绑定NVIDIA GPU,适合部署环境多样的场景。
潜在缺点与局限性
模型格式专有性:明确不支持whisper.cpp的ggml格式模型,用户若已有此类模型需重新下载CTranslate2格式版本,造成一定的迁移成本。
功能相对精简:与一些云端语音服务相比,缺乏说话人分离(diarization)、实时流式转录、特定领域术语定制等高级功能。
输出格式单一:默认仅输出纯文本,时间戳和字幕格式需要额外配置,对需要精确时间对齐的视频字幕制作场景不够便捷。
中文优化有限:虽然Whisper多语言支持较好,但在中文场景下的准确率和标点处理仍略逊于部分针对中文特化的商业方案。
依赖管理复杂:需要同时维护Python环境、FFmpeg和多个Python包的正确版本兼容性,对非技术用户存在一定门槛。
适合的目标群体
- 隐私敏感型用户:处理含敏感信息的音频内容,如律师、医生、心理咨询师等专业人士
- 离线环境工作者:网络条件不稳定或完全无法联网的场景,如野外调研、保密单位
- 成本控制型团队:需要高频转录且希望避免按量计费的API调用成本
- 开发者与技术爱好者:希望深度定制语音处理流程,集成到自有产品或自动化工作流
- 内容创作者:需要批量处理播客、会议录音、访谈素材的文字整理工作
使用风险
性能瓶颈风险:CPU模式虽然兼容性好,但处理长音频时耗时较长;若盲目开启GPU模式而未正确配置CUDA环境,可能导致推理失败或性能反而下降。
模型质量局限:small模型在复杂场景(口音重、背景噪音大、专业术语多)下准确率会明显下降,需要根据实际需求权衡选择更大的模型版本。
依赖版本冲突:CTranslate2与部分PyTorch版本存在已知兼容性问题,升级环境时可能破坏现有功能。
存储空间占用:模型文件体积较大(small模型约500MB,large模型可达数GB),需预留充足磁盘空间。
音频预处理质量:自动格式转换虽方便,但若源音频编码异常或采样率过低,可能影响最终转录效果,建议提前检查音频质量。
技能正文
name: faster-whisper
description: Local speech-to-text with the faster-whisper backend (CTranslate2). Use when transcribing audio locally, setting up the faster-whisper model cache, or replacing a whisper-cli workflow with a faster local engine.
Faster Whisper
Overview
Overview
Use faster-whisper for local transcription with low latency and a reusable model cache.
Rules
- Do not assume
ggml models work here; faster-whisper uses CTranslate2 model folders.
- Prefer CPU
device='cpu' and compute_type='int8' unless the machine is explicitly configured for GPU.
- Keep output plain text unless the user asks for timestamps or captions.
Setup
- Confirm
python and ffmpeg are available.
- Install the Python packages needed for local inference:
faster-whisper
ctranslate2
huggingface_hub
- Use the project repo
https://github.com/SYSTRAN/faster-whisper for install/setup guidance.
- Download
Systran/faster-whisper-small from https://huggingface.co/Systran/faster-whisper-small into a stable local folder such as:
C:\Users\joshu\.openclaw\tools\faster-whisper\models\Systran-faster-whisper-small
- Reuse that folder for repeat runs.
- If the user only has a
ggml-*.bin file, explain that it belongs to whisper.cpp and is not usable here.
Transcription
- Convert Telegram OGG/Opus audio to WAV if needed.
- Load the local model folder.
- Transcribe and return the plain-text result.
ggml models work here; faster-whisper uses CTranslate2 model folders.device='cpu' and compute_type='int8' unless the machine is explicitly configured for GPU.- Confirm
pythonandffmpegare available. - Install the Python packages needed for local inference:
faster-whisperctranslate2huggingface_hub
- Use the project repo
https://github.com/SYSTRAN/faster-whisperfor install/setup guidance. - Download
Systran/faster-whisper-smallfromhttps://huggingface.co/Systran/faster-whisper-smallinto a stable local folder such as:C:\Users\joshu\.openclaw\tools\faster-whisper\models\Systran-faster-whisper-small
- Reuse that folder for repeat runs.
- If the user only has a
ggml-*.binfile, explain that it belongs to whisper.cpp and is not usable here.
Transcription
- Convert Telegram OGG/Opus audio to WAV if needed.
- Load the local model folder.
- Transcribe and return the plain-text result.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。