[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"tool-Softcatala--whisper-ctranslate2":3,"similar-Softcatala--whisper-ctranslate2":95},{"id":4,"github_repo":5,"name":6,"description_en":7,"description_zh":8,"ai_summary_zh":9,"readme_en":10,"readme_zh":11,"quickstart_zh":12,"use_case_zh":13,"hero_image_url":14,"owner_login":15,"owner_name":16,"owner_avatar_url":17,"owner_bio":18,"owner_company":19,"owner_location":19,"owner_email":19,"owner_twitter":20,"owner_website":21,"owner_url":22,"languages":23,"stars":36,"forks":37,"last_commit_at":38,"license":39,"difficulty_score":40,"env_os":41,"env_gpu":42,"env_ram":43,"env_deps":44,"category_tags":52,"github_topics":54,"view_count":40,"oss_zip_url":19,"oss_zip_packed_at":19,"status":60,"created_at":61,"updated_at":62,"faqs":63,"releases":94},6437,"Softcatala\u002Fwhisper-ctranslate2","whisper-ctranslate2","Whisper command line client compatible with original OpenAI client based on CTranslate2.","whisper-ctranslate2 是一款基于 CTranslate2 构建的高效语音识别命令行工具，完美兼容 OpenAI 原版 Whisper 的操作指令。它主要解决了原生 Whisper 模型在推理速度慢、内存占用高方面的痛点，在保持同等识别精度的前提下，将处理速度提升至原版的 4 倍（批量推理模式下最高可达 16 倍），显著降低了硬件资源门槛。\n\n这款工具非常适合需要处理大量音频文件的开发者、研究人员，以及希望在本地快速部署语音转文字服务的普通用户。无论是进行实时麦克风转录、多说话人区分（声纹识别），还是利用语音活动检测（VAD）过滤静音以提升质量，whisper-ctranslate2 都能轻松胜任。其独特的技术亮点在于深度集成了 Faster-whisper 实现，支持 x86 与 ARM 架构的 CPU 及 NVIDIA GPU 加速，并提供预加载模型的 Docker 镜像，让用户无需复杂配置即可开箱即用。此外，它还支持加载自定义微调模型和彩色置信度可视化，为专业调优提供了便利。如果你正在寻找一个既快又省资源，且能无缝迁移现有 Whisper 工作流的解决方案，whi","whisper-ctranslate2 是一款基于 CTranslate2 构建的高效语音识别命令行工具，完美兼容 OpenAI 原版 Whisper 的操作指令。它主要解决了原生 Whisper 模型在推理速度慢、内存占用高方面的痛点，在保持同等识别精度的前提下，将处理速度提升至原版的 4 倍（批量推理模式下最高可达 16 倍），显著降低了硬件资源门槛。\n\n这款工具非常适合需要处理大量音频文件的开发者、研究人员，以及希望在本地快速部署语音转文字服务的普通用户。无论是进行实时麦克风转录、多说话人区分（声纹识别），还是利用语音活动检测（VAD）过滤静音以提升质量，whisper-ctranslate2 都能轻松胜任。其独特的技术亮点在于深度集成了 Faster-whisper 实现，支持 x86 与 ARM 架构的 CPU 及 NVIDIA GPU 加速，并提供预加载模型的 Docker 镜像，让用户无需复杂配置即可开箱即用。此外，它还支持加载自定义微调模型和彩色置信度可视化，为专业调优提供了便利。如果你正在寻找一个既快又省资源，且能无缝迁移现有 Whisper 工作流的解决方案，whisper-ctranslate2 是一个值得信赖的选择。","[![PyPI version](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fwhisper-ctranslate2.svg?logo=pypi&logoColor=FFE873)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fwhisper-ctranslate2\u002F)\n[![PyPI downloads](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fdm\u002Fwhisper-ctranslate2.svg)](https:\u002F\u002Fpypistats.org\u002Fpackages\u002Fwhisper-ctranslate2)\n\n# Introduction\n\nWhisper command line client compatible with original [OpenAI client](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fwhisper) based on CTranslate2.\n\nIt uses [CTranslate2](https:\u002F\u002Fgithub.com\u002FOpenNMT\u002FCTranslate2\u002F) and [Faster-whisper](https:\u002F\u002Fgithub.com\u002FSYSTRAN\u002Ffaster-whisper) Whisper implementation that is up to 4 times faster than openai\u002Fwhisper for the same accuracy while using less memory.\n\nKey features:\n\n- ✅ 4x faster than OpenAI's Whisper at the same accuracy (up to 16X faster with batched inference)\n- ✅ OpenAI Whisper CLI compatibility (easier migration)\n- ✅ Docker image with pre-loaded models\n- ✅ Speaker Diarization (Speaker Identification)\n- ✅ Voice Activity Detection (VAD) Filter to improve quality\n- ✅ Load your own fine-tuned Whisper models\n- ✅ Live transcription from microphone\n- ✅ Color-coded confidence visualization\n\n# Installation\n\n## Python package\n\nTo install the latest stable version, just type:\n\n    pip install whisper-ctranslate2\n\n## Using prebuild Docker image\n\nYou can use build docker image. First pull the image:\n\n    docker pull ghcr.io\u002Fsoftcatala\u002Fwhisper-ctranslate2:latest\n\nThe Docker image includes the small, medium and large-v2 models.\n\nTo run it:\n\n    docker run --gpus \"device=0\" \\\n        -v \"$(pwd)\":\u002Fsrv\u002Ffiles\u002F \\\n        -it ghcr.io\u002Fsoftcatala\u002Fwhisper-ctranslate2:latest \\\n        \u002Fsrv\u002Ffiles\u002Fe2e-tests\u002Fgossos.mp3 \\\n        --output_dir \u002Fsrv\u002Ffiles\u002F\n    \nNotes:\n* _--gpus \"device=0\"_ gives access to the GPU. If you do not have a GPU, remove this.\n* _\"$(pwd)\":\u002Fsrv\u002Ffiles\u002F_ maps your current directory to \u002Fsrv\u002Ffiles\u002F inside the container\n\nIf you always need to use a model that is not in the image, you can create a derived Docker image with the model preloaded or use Docker volumes to persist and share the model files.\n\n# CPU and GPU support\n\nGPU and CPU support is provided by [CTranslate2](https:\u002F\u002Fgithub.com\u002FOpenNMT\u002FCTranslate2\u002F).\n\nIt has compatibility with x86-64 and AArch64\u002FARM64 CPU and integrates multiple backends that are optimized for these platforms: Intel MKL, oneDNN, OpenBLAS, Ruy, and Apple Accelerate.\n\nGPU execution requires the NVIDIA libraries cuBLAS 11.x to be installed on the system. Please refer to the [CTranslate2 documentation](https:\u002F\u002Fopennmt.net\u002FCTranslate2\u002Finstallation.html)\n\nBy default the best hardware available is selected for inference. You can use the options `--device` and `--device_index` to control manually the selection.\n    \n# Usage\n\nSame command line as OpenAI Whisper.\n\nTo transcribe:\n\n    whisper-ctranslate2 inaguracio2011.mp3 --model medium\n    \n\u003Cimg alt=\"image\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FSoftcatala_whisper-ctranslate2_readme_2806d2bc9dab.png\">\n\nTo translate:\n\n    whisper-ctranslate2 inaguracio2011.mp3 --model medium --task translate\n\n\u003Cimg alt=\"image\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FSoftcatala_whisper-ctranslate2_readme_6c0065b21b59.png\">\n\nWhisper translate task translates the transcription from the source language to English (the only target language supported).\n\nAdditionally using:\n\n    whisper-ctranslate2 --help\n\nAll the supported options with their help are shown.\n\n# CTranslate2 specific options\n\nOn top of the OpenAI Whisper command line options, there are some specific options provided by CTranslate2 or whiper-ctranslate2.\n\n## Batched inference\n\nBatched inference transcribes each segment independently which can provide an additional 2x-4x speed increase:\n\n    whisper-ctranslate2 inaguracio2011.mp3 --batched True\n    \nYou can additionally use the --batch_size to specify the maximum number of parallel requests to model for decoding.\n\nBatched inference uses Voice Activity Detection (VAD) filter and ignores the following parameters: compression_ratio_threshold, logprob_threshold,\nno_speech_threshold, condition_on_previous_text, prompt_reset_on_temperature, prefix, hallucination_silence_threshold.\n\n## Quantization\n\n`--compute_type` option which accepts _default,auto,int8,int8_float16,int16,float16,float32_ values indicates the type of [quantization](https:\u002F\u002Fopennmt.net\u002FCTranslate2\u002Fquantization.html) to use. On CPU _int8_ will give the best performance:\n\n    whisper-ctranslate2 myfile.mp3 --compute_type int8\n\n## Loading the model from a directory\n\n`--model_directory` option allows to specify the directory from which you want to load a CTranslate2 Whisper model. For example, if you want to load your own quantized [Whisper model](https:\u002F\u002Fopennmt.net\u002FCTranslate2\u002Fconversion.html) version or using your own [Whisper fine-tuned](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcommunity-events\u002Ftree\u002Fmain\u002Fwhisper-fine-tuning-event) version. The model must be in CTranslate2 format.\n\n## Using Voice Activity Detection (VAD) filter\n\n`--vad_filter` option enables the voice activity detection (VAD) to filter out parts of the audio without speech. This step uses the [Silero VAD model](https:\u002F\u002Fgithub.com\u002Fsnakers4\u002Fsilero-vad):\n\n    whisper-ctranslate2 myfile.mp3 --vad_filter True\n\nThe VAD filter accepts multiple additional options to determine the filter behavior:\n\n    --vad_onset VALUE (float)\n\nProbabilities above this value are considered as speech.\n\n    --vad_min_speech_duration_ms (int)\n\nFinal speech chunks shorter min_speech_duration_ms are thrown out.\n\n    --vad_max_speech_duration_s VALUE (int)\n\nMaximum duration of speech chunks in seconds. Longer will be split at the timestamp of the last silence.\n\n\n## Print colors\n\n`--print_colors True` options prints the transcribed text using a color coding strategy based on [whisper.cpp](https:\u002F\u002Fgithub.com\u002Fggerganov\u002Fwhisper.cpp) to highlight words with high or low confidence:\n\n    whisper-ctranslate2 myfile.mp3 --print_colors True\n\n\u003Cimg alt=\"image\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FSoftcatala_whisper-ctranslate2_readme_0857b87edae6.png\">\n\n## Live transcribe from your microphone\n\n`--live_transcribe True` option activates the live transcription mode from your microphone:\n\n    whisper-ctranslate2 --live_transcribe True --language en\n\nhttps:\u002F\u002Fuser-images.githubusercontent.com\u002F309265\u002F231533784-e58c4b92-e9fb-4256-b4cd-12f1864131d9.mov\n\n## Diarization (speaker identification)\n\nDiarization support using [`pyannote.audio`](https:\u002F\u002Fgithub.com\u002Fpyannote\u002Fpyannote-audio) to identify speakers. At the moment, the support is at segment level.\n\nTo enable diarization you need to follow these steps:\n\n1. Install [`pyannote.audio`](https:\u002F\u002Fgithub.com\u002Fpyannote\u002Fpyannote-audio) with `pip install \"pyannote.audio==4.0\"`\n2. Accept [`pyannote\u002Fspeaker-diarization-community-1`](https:\u002F\u002Fhuggingface.co\u002Fpyannote\u002Fspeaker-diarization-community-1) user conditions\n3. Create an access token at [`hf.co\u002Fsettings\u002Ftokens`](https:\u002F\u002Fhf.co\u002Fsettings\u002Ftokens).\n\nAnd then execute passing the HuggingFace API token as parameter to enable diarization:\n\n    whisper-ctranslate2 --hf_token YOUR_HF_TOKEN\n\nand then the name of the speaker is added in the output files (e.g. JSON, VTT and SRT files):\n\n_[SPEAKER_00]: There is a lot of people in this room_\n\nThe option `--speaker_name SPEAKER_NAME` allows to use your own string to identify the speaker.\n\n# Need help?\n\nCheck our [frequently asked questions](FAQ.md) for common questions.\n\n# Contact\n\nJordi Mas \u003Cjmas@softcatala.org>\n","[![PyPI版本](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fwhisper-ctranslate2.svg?logo=pypi&logoColor=FFE873)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fwhisper-ctranslate2\u002F)\n[![PyPI下载量](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fdm\u002Fwhisper-ctranslate2.svg)](https:\u002F\u002Fpypistats.org\u002Fpackages\u002Fwhisper-ctranslate2)\n\n# 简介\n\n基于 CTranslate2 的 Whisper 命令行客户端，与原始 [OpenAI 客户端](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fwhisper) 兼容。\n\n它使用了 [CTranslate2](https:\u002F\u002Fgithub.com\u002FOpenNMT\u002FCTranslate2\u002F) 和 [Faster-whisper](https:\u002F\u002Fgithub.com\u002FSYSTRAN\u002Ffaster-whisper) 的 Whisper 实现，在相同精度下速度最高可达 openai\u002Fwhisper 的 4 倍，同时占用更少的内存。\n\n主要特性：\n\n- ✅ 在相同精度下速度是 OpenAI Whisper 的 4 倍（批处理推理时最高可达 16 倍）\n- ✅ 与 OpenAI Whisper CLI 兼容（迁移更方便）\n- ✅ 包含预加载模型的 Docker 镜像\n- ✅ 发言人分离（说话人识别）\n- ✅ 语音活动检测 (VAD) 滤波器以提升质量\n- ✅ 加载您自己的微调 Whisper 模型\n- ✅ 实时麦克风转录\n- ✅ 彩色编码置信度可视化\n\n# 安装\n\n## Python 包\n\n要安装最新稳定版，只需输入：\n\n    pip install whisper-ctranslate2\n\n## 使用预构建的 Docker 镜像\n\n您可以使用预构建的 Docker 镜像。首先拉取镜像：\n\n    docker pull ghcr.io\u002Fsoftcatala\u002Fwhisper-ctranslate2:latest\n\n该 Docker 镜像包含了 small、medium 和 large-v2 模型。\n\n运行命令如下：\n\n    docker run --gpus \"device=0\" \\\n        -v \"$(pwd)\":\u002Fsrv\u002Ffiles\u002F \\\n        -it ghcr.io\u002Fsoftcatala\u002Fwhisper-ctranslate2:latest \\\n        \u002Fsrv\u002Ffiles\u002Fe2e-tests\u002Fgossos.mp3 \\\n        --output_dir \u002Fsrv\u002Ffiles\u002F\n    \n注意事项：\n* _--gpus \"device=0\"_ 提供 GPU 访问权限。如果您没有 GPU，请移除此选项。\n* _\"$(pwd)\":\u002Fsrv\u002Ffiles\u002F_ 将您当前目录映射到容器内的 \u002Fsrv\u002Ffiles\u002F 目录。\n\n如果您经常需要使用镜像中未包含的模型，可以创建一个预加载该模型的衍生 Docker 镜像，或者使用 Docker 卷来持久化和共享模型文件。\n\n# CPU 和 GPU 支持\n\nGPU 和 CPU 支持由 [CTranslate2](https:\u002F\u002Fgithub.com\u002FOpenNMT\u002FCTranslate2\u002F) 提供。\n\n它兼容 x86-64 和 AArch64\u002FARM64 CPU，并集成了针对这些平台优化的多个后端：Intel MKL、oneDNN、OpenBLAS、Ruy 以及 Apple Accelerate。\n\nGPU 执行需要在系统上安装 NVIDIA 库 cuBLAS 11.x。请参考 [CTranslate2 文档](https:\u002F\u002Fopennmt.net\u002FCTranslate2\u002Finstallation.html)。\n\n默认情况下，会自动选择最佳硬件进行推理。您可以使用 `--device` 和 `--device_index` 选项手动控制设备的选择。\n    \n# 使用方法\n\n与 OpenAI Whisper 的命令行相同。\n\n转录音频：\n\n    whisper-ctranslate2 inaguracio2011.mp3 --model medium\n    \n\u003Cimg alt=\"image\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FSoftcatala_whisper-ctranslate2_readme_2806d2bc9dab.png\">\n\n翻译音频：\n\n    whisper-ctranslate2 inaguracio2011.mp3 --model medium --task translate\n\n\u003Cimg alt=\"image\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FSoftcatala_whisper-ctranslate2_readme_6c0065b21b59.png\">\n\nWhisper 的翻译任务会将源语言的转录内容翻译成英语（目前仅支持这一目标语言）。\n\n此外，使用以下命令可查看所有支持的选项及其说明：\n\n    whisper-ctranslate2 --help\n\n# CTranslate2 特定选项\n\n除了 OpenAI Whisper 的命令行选项外，CTranslate2 或 whisper-ctranslate2 还提供了一些特定选项。\n\n## 批处理推理\n\n批处理推理会独立转录每个片段，从而进一步提升 2 到 4 倍的速度：\n\n    whisper-ctranslate2 inaguracio2011.mp3 --batched True\n    \n您还可以使用 `--batch_size` 参数指定解码时模型的最大并行请求数。\n\n批处理推理会使用语音活动检测 (VAD) 滤波器，并忽略以下参数：compression_ratio_threshold、logprob_threshold、no_speech_threshold、condition_on_previous_text、prompt_reset_on_temperature、prefix、hallucination_silence_threshold。\n\n## 量化\n\n`--compute_type` 选项接受 _default、auto、int8、int8_float16、int16、float16、float32_ 等值，用于指定使用的 [量化](https:\u002F\u002Fopennmt.net\u002FCTranslate2\u002Fquantization.html) 类型。在 CPU 上，_int8_ 能带来最佳性能：\n\n    whisper-ctranslate2 myfile.mp3 --compute_type int8\n\n## 从目录加载模型\n\n`--model_directory` 选项允许您指定从中加载 CTranslate2 Whisper 模型的目录。例如，如果您想加载自己量化过的 [Whisper 模型](https:\u002F\u002Fopennmt.net\u002FCTranslate2\u002Fconversion.html) 版本，或使用自己微调过的 [Whisper 模型](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fcommunity-events\u002Ftree\u002Fmain\u002Fwhisper-fine-tuning-event) 版本。模型必须为 CTranslate2 格式。\n\n## 使用语音活动检测 (VAD) 滤波器\n\n`--vad_filter` 选项启用语音活动检测 (VAD)，以过滤掉音频中无语音的部分。此步骤使用 [Silero VAD 模型](https:\u002F\u002Fgithub.com\u002Fsnakers4\u002Fsilero-vad)：\n\n    whisper-ctranslate2 myfile.mp3 --vad_filter True\n\nVAD 滤波器还接受多个附加选项来决定滤波行为：\n\n    --vad_onset VALUE (float)\n\n高于此值的概率被视为语音。\n\n    --vad_min_speech_duration_ms (int)\n\n最终的语音片段如果短于 min_speech_duration_ms，将被丢弃。\n\n    --vad_max_speech_duration_s VALUE (int)\n\n语音片段的最大持续时间（以秒为单位）。超过此时间的片段将在最后一次静音时刻处分割。\n\n\n## 打印颜色\n\n`--print_colors True` 选项会根据 [whisper.cpp](https:\u002F\u002Fgithub.com\u002Fggerganov\u002Fwhisper.cpp) 的颜色编码策略打印转录文本，以突出显示高置信度或低置信度的单词：\n\n    whisper-ctranslate2 myfile.mp3 --print_colors True\n\n\u003Cimg alt=\"image\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FSoftcatala_whisper-ctranslate2_readme_0857b87edae6.png\">\n\n## 实时从麦克风转录\n\n`--live_transcribe True` 选项会激活实时麦克风转录模式：\n\n    whisper-ctranslate2 --live_transcribe True --language en\n\nhttps:\u002F\u002Fuser-images.githubusercontent.com\u002F309265\u002F231533784-e58c4b92-e9fb-4256-b4cd-12f1864131d9.mov\n\n## 说话人分离（说话人识别）\n\n支持使用 [`pyannote.audio`](https:\u002F\u002Fgithub.com\u002Fpyannote\u002Fpyannote-audio) 进行说话人分离，以识别不同的说话人。目前，该功能仅在片段级别提供支持。\n\n要启用说话人分离功能，您需要按照以下步骤操作：\n\n1. 使用 `pip install \"pyannote.audio==4.0\"` 安装 [`pyannote.audio`](https:\u002F\u002Fgithub.com\u002Fpyannote\u002Fpyannote-audio)。\n2. 接受 [`pyannote\u002Fspeaker-diarization-community-1`](https:\u002F\u002Fhuggingface.co\u002Fpyannote\u002Fspeaker-diarization-community-1) 的用户协议。\n3. 在 [`hf.co\u002Fsettings\u002Ftokens`](https:\u002F\u002Fhf.co\u002Fsettings\u002Ftokens) 创建一个访问令牌。\n\n然后，通过将 Hugging Face API 令牌作为参数传递来启用说话人分离功能：\n\n    whisper-ctranslate2 --hf_token YOUR_HF_TOKEN\n\n之后，输出文件（例如 JSON、VTT 和 SRT 文件）中会添加说话人的名称：\n\n_[SPEAKER_00]: 这间房间里有很多人_\n\n选项 `--speaker_name SPEAKER_NAME` 允许您使用自定义字符串来标识说话人。\n\n# 需要帮助吗？\n\n请查看我们的[常见问题解答](FAQ.md)，了解常见问题。\n\n# 联系方式\n\nJordi Mas \u003Cjmas@softcatala.org>","# whisper-ctranslate2 快速上手指南\n\n`whisper-ctranslate2` 是一个基于 CTranslate2 和 Faster-whisper 实现的 Whisper 命令行工具。相比 OpenAI 官方版本，它在保持相同准确率的前提下，推理速度最高提升 4 倍（批量推理可达 16 倍），且内存占用更低。\n\n## 环境准备\n\n### 系统要求\n- **操作系统**：Linux, macOS, Windows\n- **架构支持**：x86-64, AArch64\u002FARM64\n- **GPU 支持（可选）**：\n  - 需安装 NVIDIA 驱动及 cuBLAS 11.x 库。\n  - 若无 GPU，工具将自动使用优化的 CPU 后端（如 Intel MKL, oneDNN, Apple Accelerate 等）。\n\n### 前置依赖\n- Python 3.8+\n- `pip` 包管理工具\n- （可选）若需使用说话人分离功能，需额外安装 `pyannote.audio` 并配置 HuggingFace Token。\n\n## 安装步骤\n\n### 方式一：通过 Pip 安装（推荐）\n\n直接使用 pip 安装最新稳定版：\n\n```bash\npip install whisper-ctranslate2\n```\n\n> **提示**：国内用户如遇下载缓慢，可指定清华或阿里镜像源加速：\n> ```bash\n> pip install whisper-ctranslate2 -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n> ```\n\n### 方式二：使用 Docker（预加载模型）\n\n如果你希望避免配置本地环境，可以使用包含预加载模型（small, medium, large-v2）的 Docker 镜像：\n\n1. 拉取镜像：\n   ```bash\n   docker pull ghcr.io\u002Fsoftcatala\u002Fwhisper-ctranslate2:latest\n   ```\n\n2. 运行转录（需挂载当前目录并启用 GPU）：\n   ```bash\n   docker run --gpus \"device=0\" \\\n       -v \"$(pwd)\":\u002Fsrv\u002Ffiles\u002F \\\n       -it ghcr.io\u002Fsoftcatala\u002Fwhisper-ctranslate2:latest \\\n       \u002Fsrv\u002Ffiles\u002Fyour_audio_file.mp3 \\\n       --output_dir \u002Fsrv\u002Ffiles\u002F\n   ```\n   *注：若无 GPU，请移除 `--gpus \"device=0\"` 参数。*\n\n## 基本使用\n\n该工具的命令参数与 OpenAI 原版 Whisper 完全兼容。\n\n### 1. 语音转文字 (Transcribe)\n\n将音频文件转换为文本（自动识别语言）：\n\n```bash\nwhisper-ctranslate2 inaguracio2011.mp3 --model medium\n```\n\n### 2. 语音翻译 (Translate)\n\n将音频中的语音翻译为英文：\n\n```bash\nwhisper-ctranslate2 inaguracio2011.mp3 --model medium --task translate\n```\n\n### 3. 查看帮助\n\n查看所有支持的参数选项：\n\n```bash\nwhisper-ctranslate2 --help\n```\n\n### 常用进阶选项示例\n\n- **启用批量推理加速**（速度提升 2-4 倍）：\n  ```bash\n  whisper-ctranslate2 audio.mp3 --batched True\n  ```\n\n- **CPU 量化加速**（推荐 CPU 用户使用 int8）：\n  ```bash\n  whisper-ctranslate2 audio.mp3 --compute_type int8\n  ```\n\n- **启用语音活动检测 (VAD)**（过滤静音片段，提高质量）：\n  ```bash\n  whisper-ctranslate2 audio.mp3 --vad_filter True\n  ```\n\n- **实时麦克风转录**：\n  ```bash\n  whisper-ctranslate2 --live_transcribe True --language en\n  ```","某媒体初创团队需要每天将数小时的线下访谈录音快速转为带说话人区分的中英文双语字幕，以赶在当晚发布视频内容。\n\n### 没有 whisper-ctranslate2 时\n- 转录速度极慢，处理一段 1 小时的音频需耗时近 40 分钟，严重拖慢视频剪辑进度，无法实现“当日录当日发”。\n- 显存占用过高，在普通开发机上运行原始 OpenAI Whisper 模型时常因内存溢出而崩溃，被迫升级昂贵硬件。\n- 输出结果仅为纯文本，缺乏说话人区分（Diarization），后期编辑需人工听音分辨谁在说话，极易出错且效率低下。\n- 命令行参数不兼容现有脚本，迁移成本高，团队不得不重写大量自动化流程代码。\n\n### 使用 whisper-ctranslate2 后\n- 推理速度提升 4 倍以上，同等精度下 1 小时音频仅需 10 分钟即可完成转录，轻松满足每日高频发布需求。\n- 基于 CTranslate2 优化内存管理，在相同硬件上稳定运行大模型，无需额外投入即可利用现有 GPU 资源。\n- 内置说话人识别与语音活动检测（VAD）功能，直接输出带时间戳和说话人标签的结构化字幕，大幅减少人工校对时间。\n- 完全兼容 OpenAI Whisper 原有命令格式，团队无需修改现有脚本即可无缝切换，即刻享受性能红利。\n\nwhisper-ctranslate2 通过极致的速度优化与功能增强，让中小团队也能在低成本硬件上实现专业级的高效语音转写工作流。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FSoftcatala_whisper-ctranslate2_e41bd268.png","Softcatala","Softcatalà","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FSoftcatala_c8e78e57.png","",null,"softcatala","https:\u002F\u002Fwww.softcatala.org","https:\u002F\u002Fgithub.com\u002FSoftcatala",[24,28,32],{"name":25,"color":26,"percentage":27},"Python","#3572A5",96.8,{"name":29,"color":30,"percentage":31},"Makefile","#427819",2.7,{"name":33,"color":34,"percentage":35},"Dockerfile","#384d54",0.4,1277,123,"2026-04-10T09:50:38","MIT",2,"Linux, macOS, Windows","非必需（支持 CPU）。若使用 GPU，需 NVIDIA 显卡并安装 cuBLAS 11.x 库；未明确具体型号和显存要求，但提及大模型需更多资源。","未说明（文中仅提到比原版 Whisper 占用更少内存）",{"notes":45,"python":46,"dependencies":47},"1. 支持 x86-64 和 ARM64 (AArch64) 架构，CPU 后端包括 Intel MKL, oneDNN, OpenBLAS, Ruy 和 Apple Accelerate。\n2. Docker 镜像预加载了 small, medium 和 large-v2 模型。\n3. 说话人分离功能需要额外配置 Hugging Face Token 并接受模型使用条款。\n4. 支持批量推理（batched inference）可进一步提升速度，但会忽略部分参数。\n5. 支持加载自定义的 CTranslate2 格式微调模型。","未说明（通过 pip 安装，通常隐含支持 Python 3.8+）",[48,49,50,51],"CTranslate2","faster-whisper","pyannote.audio==4.0 (用于说话人分离，可选)","Silero VAD (用于语音活动检测，内置)",[53],"音频",[55,56,57,58,59],"speech-recognition","speech-to-text","whisper","openai-","openai-whisper","ready","2026-03-27T02:49:30.150509","2026-04-11T08:11:49.955273",[64,69,74,79,84,89],{"id":65,"question_zh":66,"answer_zh":67,"source_url":68},29125,"指定了 --output_format srt 但有时仍未生成 SRT 文件，原因是什么？","这是一个已知问题，可能在某些情况下写入器未被正确调用。该问题已在版本 0.2.6 中修复。请确保您使用的是最新版本（运行 `pip install -U whisper-ctranslate2` 更新）。如果问题依旧，尝试显式指定语言参数（如 `--language en` 或 `--language zh`）。","https:\u002F\u002Fgithub.com\u002FSoftcatala\u002Fwhisper-ctranslate2\u002Fissues\u002F29",{"id":70,"question_zh":71,"answer_zh":72,"source_url":73},29124,"如何在 macOS (M1\u002FM3 芯片) 上安装并运行此工具？","在 macOS M1\u002FM3 芯片上运行可能会遇到依赖库与 Python 版本的兼容性问题。解决方案是将 Python 版本降级到 3.10（3.11 也可能有效）。您可以参考相关指南降级 Python 版本。安装命令为 `pip install -U whisper-ctranslate2`，需在终端中运行，确保终端当前目录包含您的文件或指定文件路径。","https:\u002F\u002Fgithub.com\u002FSoftcatala\u002Fwhisper-ctranslate2\u002Fissues\u002F64",{"id":75,"question_zh":76,"answer_zh":77,"source_url":78},29122,"为什么在 Windows 上运行后没有生成任何输出文件？","这通常与 Python 版本或设备设置有关。尝试将 Python 版本更改为 3.10.x（例如 3.10.6），许多用户反馈从 3.9 升级或降级到 3.10 后问题解决。此外，如果使用的是 NVIDIA GPU，尝试显式添加 `--device cpu` 参数看是否能运行（虽然速度较慢），以排除 CUDA 初始化卡住的问题。该问题已在后续版本（如 0.2.6 或 0.2.9+）中修复，请确保升级到最新版本。","https:\u002F\u002Fgithub.com\u002FSoftcatala\u002Fwhisper-ctranslate2\u002Fissues\u002F11",{"id":80,"question_zh":81,"answer_zh":82,"source_url":83},29123,"处理日语或其他非拉丁字符音频时出现 UnicodeEncodeError 怎么办？","这是由编码问题引起的，特别是在 Windows 系统上。该问题已在版本 0.2.6 中修复。请运行 `pip install -U whisper-ctranslate2` 升级到至少 0.2.6 版本即可解决日语字幕生成时的字符编码错误。","https:\u002F\u002Fgithub.com\u002FSoftcatala\u002Fwhisper-ctranslate2\u002Fissues\u002F15",{"id":85,"question_zh":86,"answer_zh":87,"source_url":88},29126,"软件卡在语言检测阶段无响应，或者命令行瞬间重置无结果，如何解决？","这种情况常见于 Windows 系统搭配 NVIDIA GPU 时，程序默认使用 CUDA 但发生挂起。解决方法是显式指定使用 CPU：在命令中添加 `--device cpu` 参数。虽然这会牺牲性能，但能让程序正常运行。同时，检查您的 Python 版本是否为 3.10.x，版本不匹配也可能导致此问题。建议升级到软件的最新版本。","https:\u002F\u002Fgithub.com\u002FSoftcatala\u002Fwhisper-ctranslate2\u002Fissues\u002F45",{"id":90,"question_zh":91,"answer_zh":92,"source_url":93},29127,"为什么只有在使用 --device cpu 时才有输出，使用 GPU 时无输出？","这是由于早期版本中 `faster_whisper` 包在 GPU 初始化上的缺陷导致的。该问题已在版本 0.2.6（部分反馈指出是 0.26，建议更新至最新）中修复。请执行 `pip install -U whisper-ctranslate2` 更新到最新版本，之后无需手动指定 `--device cpu` 即可正常使用 GPU 加速。","https:\u002F\u002Fgithub.com\u002FSoftcatala\u002Fwhisper-ctranslate2\u002Fissues\u002F26",[],[96,112,121,129,137,145],{"id":97,"name":98,"github_repo":99,"description_zh":100,"stars":101,"difficulty_score":40,"last_commit_at":102,"category_tags":103,"status":60},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",85092,"2026-04-10T11:13:16",[104,105,106,107,108,109,110,111,53],"图像","数据工具","视频","插件","Agent","其他","语言模型","开发框架",{"id":113,"name":114,"github_repo":115,"description_zh":116,"stars":117,"difficulty_score":118,"last_commit_at":119,"category_tags":120,"status":60},4128,"GPT-SoVITS","RVC-Boss\u002FGPT-SoVITS","GPT-SoVITS 是一款强大的开源语音合成与声音克隆工具，旨在让用户仅需极少量的音频数据即可训练出高质量的个性化语音模型。它核心解决了传统语音合成技术依赖海量录音数据、门槛高且成本大的痛点，实现了“零样本”和“少样本”的快速建模：用户只需提供 5 秒参考音频即可即时生成语音，或使用 1 分钟数据进行微调，从而获得高度逼真且相似度极佳的声音效果。\n\n该工具特别适合内容创作者、独立开发者、研究人员以及希望为角色配音的普通用户使用。其内置的友好 WebUI 界面集成了人声伴奏分离、自动数据集切片、中文语音识别及文本标注等辅助功能，极大地降低了数据准备和模型训练的技术门槛，让非专业人士也能轻松上手。\n\n在技术亮点方面，GPT-SoVITS 不仅支持中、英、日、韩、粤语等多语言跨语种合成，还具备卓越的推理速度，在主流显卡上可实现实时甚至超实时的生成效率。无论是需要快速制作视频配音，还是进行多语言语音交互研究，GPT-SoVITS 都能以极低的数据成本提供专业级的语音合成体验。",56375,3,"2026-04-05T22:15:46",[53],{"id":122,"name":123,"github_repo":124,"description_zh":125,"stars":126,"difficulty_score":118,"last_commit_at":127,"category_tags":128,"status":60},2863,"TTS","coqui-ai\u002FTTS","🐸TTS 是一款功能强大的深度学习文本转语音（Text-to-Speech）开源库，旨在将文字自然流畅地转化为逼真的人声。它解决了传统语音合成技术中声音机械生硬、多语言支持不足以及定制门槛高等痛点，让高质量的语音生成变得触手可及。\n\n无论是希望快速集成语音功能的开发者，还是致力于探索前沿算法的研究人员，亦或是需要定制专属声音的数据科学家，🐸TTS 都能提供得力支持。它不仅预置了覆盖全球 1100 多种语言的训练模型，让用户能够即刻上手，还提供了完善的工具链，支持用户利用自有数据训练新模型或对现有模型进行微调，轻松实现特定风格的声音克隆。\n\n在技术亮点方面，🐸TTS 表现卓越。其最新的 ⓍTTSv2 模型支持 16 种语言，并在整体性能上大幅提升，实现了低于 200 毫秒的超低延迟流式输出，极大提升了实时交互体验。此外，它还无缝集成了 🐶Bark、🐢Tortoise 等社区热门模型，并支持调用上千个 Fairseq 模型，展现了极强的兼容性与扩展性。配合丰富的数据集分析与整理工具，🐸TTS 已成为科研与生产环境中备受信赖的语音合成解决方案。",44971,"2026-04-03T14:47:02",[53,111,104],{"id":130,"name":131,"github_repo":132,"description_zh":133,"stars":134,"difficulty_score":118,"last_commit_at":135,"category_tags":136,"status":60},2375,"LocalAI","mudler\u002FLocalAI","LocalAI 是一款开源的本地人工智能引擎，旨在让用户在任意硬件上轻松运行各类 AI 模型，包括大语言模型、图像生成、语音识别及视频处理等。它的核心优势在于彻底打破了高性能计算的门槛，无需昂贵的专用 GPU，仅凭普通 CPU 或常见的消费级显卡（如 NVIDIA、AMD、Intel 及 Apple Silicon）即可部署和运行复杂的 AI 任务。\n\n对于担心数据隐私的用户而言，LocalAI 提供了“隐私优先”的解决方案，确保所有数据处理均在本地基础设施内完成，无需上传至云端。同时，它完美兼容 OpenAI、Anthropic 等主流 API 接口，这意味着开发者可以无缝迁移现有应用，直接利用本地资源替代云服务，既降低了成本又提升了可控性。\n\nLocalAI 内置了超过 35 种后端支持（如 llama.cpp、vLLM、Whisper 等），并集成了自主 AI 代理、工具调用及检索增强生成（RAG）等高级功能，且具备多用户管理与权限控制能力。无论是希望保护敏感数据的企业开发者、进行算法实验的研究人员，还是想要在个人电脑上体验最新 AI 技术的极客玩家，都能通过 LocalAI 获",44782,"2026-04-02T22:14:26",[104,53,110,108,111,105,107],{"id":138,"name":139,"github_repo":140,"description_zh":141,"stars":142,"difficulty_score":118,"last_commit_at":143,"category_tags":144,"status":60},3108,"bark","suno-ai\u002Fbark","Bark 是由 Suno 推出的开源生成式音频模型，能够根据文本提示创造出高度逼真的多语言语音、音乐、背景噪音及简单音效。与传统仅能朗读文字的语音合成工具不同，Bark 基于 Transformer 架构，不仅能模拟说话，还能生成笑声、叹息、哭泣等非语言声音，甚至能处理带有情感色彩和语气停顿的复杂文本，极大地丰富了音频表达的可能性。\n\n它主要解决了传统语音合成声音机械、缺乏情感以及无法生成非语音类音效的痛点，让创作者能通过简单的文字描述获得生动自然的音频素材。无论是需要为视频配音的内容创作者、探索多模态生成的研究人员，还是希望快速原型设计的开发者，都能从中受益。普通用户也可通过集成的演示页面轻松体验其神奇效果。\n\n技术亮点方面，Bark 支持商业使用（MIT 许可），并在近期更新中实现了显著的推理速度提升，同时提供了适配低显存 GPU 的版本，降低了使用门槛。此外，社区还建立了丰富的提示词库，帮助用户更好地驾驭模型生成特定风格的声音。只需几行 Python 代码，即可将创意文本转化为高质量音频，是连接文字与声音世界的强大桥梁。",39067,"2026-04-04T03:33:35",[53],{"id":146,"name":147,"github_repo":148,"description_zh":149,"stars":150,"difficulty_score":118,"last_commit_at":151,"category_tags":152,"status":60},5908,"ChatTTS","2noise\u002FChatTTS","ChatTTS 是一款专为日常对话场景打造的生成式语音模型，特别适用于大语言模型助手等交互式应用。它主要解决了传统文本转语音（TTS）技术在对话中缺乏自然感、情感表达单一以及难以处理停顿、笑声等细微语气的问题，让机器生成的语音听起来更像真人在聊天。\n\n这款工具非常适合开发者、研究人员以及希望为应用增添自然语音交互功能的设计师使用。普通用户也可以通过社区开发的衍生产品体验其能力。ChatTTS 的核心亮点在于其对对话任务的深度优化：它不仅支持中英文双语，还能精准控制韵律细节，自动生成自然的 laughter（笑声）、pauses（停顿）和 interjections（插入语），从而实现多说话人的互动对话效果。在韵律表现上，ChatTTS 超越了大多数开源 TTS 模型。目前开源版本基于 4 万小时数据预训练而成，虽主要用于学术研究与教育目的，但已展现出强大的潜力，并支持流式音频生成与零样本推理，为后续的多情绪控制等进阶功能奠定了基础。",39042,"2026-04-09T11:54:03",[110,108,111,53]]