[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-shashikg--WhisperS2T":3,"tool-shashikg--WhisperS2T":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",140436,2,"2026-04-05T23:32:43",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":70,"readme_en":71,"readme_zh":72,"quickstart_zh":73,"use_case_zh":74,"hero_image_url":75,"owner_login":76,"owner_name":77,"owner_avatar_url":78,"owner_bio":79,"owner_company":80,"owner_location":81,"owner_email":82,"owner_twitter":80,"owner_website":83,"owner_url":84,"languages":85,"stars":102,"forks":103,"last_commit_at":104,"license":105,"difficulty_score":10,"env_os":106,"env_gpu":107,"env_ram":108,"env_deps":109,"category_tags":119,"github_topics":120,"view_count":23,"oss_zip_url":80,"oss_zip_packed_at":80,"status":16,"created_at":130,"updated_at":131,"faqs":132,"releases":161},2452,"shashikg\u002FWhisperS2T","WhisperS2T","An Optimized Speech-to-Text Pipeline for the Whisper Model Supporting Multiple Inference Engine","WhisperS2T 是一个专为 OpenAI Whisper 模型打造的高性能语音转文字（ASR）开源流水线。它的核心目标是在保持高识别准确率的同时，显著提升音频处理的效率，解决传统 Whisper 实现方案在推理速度上的瓶颈问题。\n\n相较于其他主流方案，WhisperS2T 展现了卓越的性能优势。基准测试显示，其运行速度比 WhisperX 快 2.3 倍，比集成了 FlashAttention 2 的 HuggingFace Pipeline 快 3 倍。值得注意的是，这种速度提升并非单纯依赖后端引擎的优化，而是得益于其更优越的流水线架构设计。此外，WhisperS2T 内置了多种启发式算法，进一步增强了转录结果的准确性。\n\n在技术特性方面，WhisperS2T 具有高度的灵活性和兼容性。它支持多种推理后端，包括 CTranslate2、FlashAttention 2 以及最新的 TensorRT-LLM，能够适配不同的硬件环境以发挥最大效能。工具还支持 Whisper-Large-V3 和 Distil-Whisper 等先进模型，并提供词级时间戳对齐功能。为了方便集成与使用","WhisperS2T 是一个专为 OpenAI Whisper 模型打造的高性能语音转文字（ASR）开源流水线。它的核心目标是在保持高识别准确率的同时，显著提升音频处理的效率，解决传统 Whisper 实现方案在推理速度上的瓶颈问题。\n\n相较于其他主流方案，WhisperS2T 展现了卓越的性能优势。基准测试显示，其运行速度比 WhisperX 快 2.3 倍，比集成了 FlashAttention 2 的 HuggingFace Pipeline 快 3 倍。值得注意的是，这种速度提升并非单纯依赖后端引擎的优化，而是得益于其更优越的流水线架构设计。此外，WhisperS2T 内置了多种启发式算法，进一步增强了转录结果的准确性。\n\n在技术特性方面，WhisperS2T 具有高度的灵活性和兼容性。它支持多种推理后端，包括 CTranslate2、FlashAttention 2 以及最新的 TensorRT-LLM，能够适配不同的硬件环境以发挥最大效能。工具还支持 Whisper-Large-V3 和 Distil-Whisper 等先进模型，并提供词级时间戳对齐功能。为了方便集成与使用，它还提供了预构建的 Docker 镜像，并支持将转录结果直接导出为 TXT、JSON、SRT、VTT 等多种常用格式。\n\nWhisperS2T 非常适合需要处理大量音频数据的开发者、研究人员以及企业用户。无论是构建实时字幕系统、进行大规模会议记录整理，还是开发多语言语音应用，它都能提供快速且稳定的底层支持。对于追求极致推理效率且希望简化部署流程的技术团队而言，这是一个值得关注的优质选择。","\u003Ch1 align=\"center\"> WhisperS2T ⚡ \u003C\u002Fh1>\n\u003Cp align=\"center\">\u003Cb>An Optimized Speech-to-Text Pipeline for the Whisper Model Supporting Multiple Inference Engine!\u003C\u002Fb>\u003C\u002Fp>\n\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Fwww.pepy.tech\u002Fprojects\u002Fwhisper-s2t\">\n        \u003Cimg alt=\"Downloads\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fshashikg_WhisperS2T_readme_4b2f09a31b62.png\" \u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fpepy.tech\u002Fproject\u002Fwhisper-s2t\">\n        \u003Cimg alt=\"GitHub Contributors\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fcontributors\u002Fshashikg\u002FWhisperS2T\" \u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fwhisper-s2t\">\n        \u003Cimg alt=\"PyPi Release Version\" src=\"https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fwhisper-s2t.svg\" \u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T\u002Fissues\">\n        \u003Cimg alt=\"Issues\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fissues\u002Fshashikg\u002FWhisperS2T?color=0088ff\" \u002F>\n    \u003C\u002Fa>\n\u003C\u002Fp>\n\u003Chr>\u003Cbr>\n\nWhisperS2T is an optimized lightning-fast open-sourced **Speech-to-Text** (ASR) pipeline. It is tailored for the whisper model to provide faster whisper transcription. It's designed to be exceptionally fast than other implementation, boasting a **2.3X speed improvement over [WhisperX](https:\u002F\u002Fgithub.com\u002Fm-bain\u002FwhisperX\u002Ftree\u002Fmain) and a 3X speed boost compared to [HuggingFace Pipeline](https:\u002F\u002Fhuggingface.co\u002Fopenai\u002Fwhisper-large-v2) with FlashAttention 2 ([Insanely Fast Whisper](https:\u002F\u002Fgithub.com\u002FVaibhavs10\u002Finsanely-fast-whisper))**. Moreover, it includes several heuristics to enhance transcription accuracy. \n\n[**Whisper**](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fwhisper) is a general-purpose speech recognition model developed by OpenAI and not me. It is trained on a large dataset of diverse audio and is also a multitasking model that can perform multilingual speech recognition, speech translation, and language identification.\n\n\n## Release Notes\n\n* [Feb 25, 2024]: Added prebuilt docker images and transcript exporter to `txt, json, tsv, srt, vtt`. (Check complete [release note](https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T\u002Freleases\u002Ftag\u002Fv1.3.1))\n* [Jan 28, 2024]: Added support for TensorRT-LLM backend.\n* [Dec 23, 2023]: Added support for word alignment for CTranslate2 backend (check [benchmark](https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T\u002Freleases\u002Ftag\u002Fv1.2.0)).\n* [Dec 19, 2023]: Added support for Whisper-Large-V3 and Distil-Whisper-Large-V2 (check [benchmark](https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T\u002Freleases\u002Ftag\u002Fv1.1.0)).\n* [Dec 17, 2023]: Released WhisperS2T!\n\n## Quickstart\n\nCheckout the Google Colab notebooks provided here: [notebooks](notebooks)\n\n## Future Roadmaps\n\n- [x] Ready to use docker container.\n- [ ] WhisperS2T-Server: Optimized end-to-end deployment ready server codebase.\n- [ ] In depth documentation, use github pages to host it.\n- [ ] Explore possibility of integrating Meta's SeamlessM4T model.\n- [ ] Add more datasets for WER benchmarking.\n\n## Benchmark and Technical Report\n\nStay tuned for a technical report comparing WhisperS2T against other whisper pipelines. Meanwhile, check some quick benchmarks on A30 GPU. See `scripts\u002F` directory for the benchmarking scripts that I used.\n\n![A30 Benchmark](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fshashikg_WhisperS2T_readme_1396a880366d.png)\n\n**NOTE:** I conducted all the benchmarks using the `without_timestamps` parameter set as `True`. Adjusting this parameter to `False` may enhance the Word Error Rate (WER) of the HuggingFace pipeline but at the expense of increased inference time. Notably, the improvements in inference speed were achieved solely through a **superior pipeline design**, without any specific optimization made to the backend inference engines (such as CTranslate2, FlashAttention2, etc.). For instance, WhisperS2T (utilizing FlashAttention2) demonstrates significantly superior inference speed compared to the HuggingFace pipeline (also using FlashAttention2), despite both leveraging the same inference engine—HuggingFace whisper model with FlashAttention2. Additionally, there is a noticeable difference in the WER as well.\n\n\n## Features\n\n- 🔄 **Multi-Backend Support:** Support for various Whisper model backends including Original OpenAI Model, HuggingFace Model with FlashAttention2, and CTranslate2 Model.\n- 🎙️ **Easy Integration of Custom VAD Models:** Seamlessly add custom Voice Activity Detection (VAD) models to enhance control and accuracy in speech recognition.\n- 🎧 **Effortless Handling of Small or Large Audio Files:** Intelligently batch smaller speech segments from various files, ensuring optimal performance.\n- ⏳ **Streamlined Processing for Large Audio Files:** Asynchronously loads large audio files in the background while transcribing segmented batches, notably reducing loading times.\n- 🌐 **Batching Support with Multiple Language\u002FTask Decoding:** Decode multiple languages or perform both transcription and translation in a single batch for improved versatility and transcription time. (Best support with CTranslate2 backend)\n- 🧠 **Reduction in Hallucination:** Optimized parameters and heuristics to decrease repeated text output or hallucinations. (Some heuristics works only with CTranslate2 backend)\n- ⏱️ **Dynamic Time Length Support (Experimental):** Process variable-length inputs in a given input batch instead of fixed 30 seconds, providing flexibility and saving computation time during transcription. (Only with CTranslate2 backend)\n\n\n## Getting Started\n\n### From Docker Container\n\n#### Prebuilt containers\n\n```sh\ndocker pull shashikg\u002Fwhisper_s2t:dev-trtllm\n```\n\nDockerhub repo: [https:\u002F\u002Fhub.docker.com\u002Fr\u002Fshashikg\u002Fwhisper_s2t\u002Ftags](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fshashikg\u002Fwhisper_s2t\u002Ftags)\n\n#### Building your own container\n\nBuild from `main` branch.\n\n```sh\ndocker build --build-arg WHISPER_S2T_VER=main --build-arg SKIP_TENSORRT_LLM=1 -t whisper_s2t:main .\n```\n\nBuild from specific release `v1.3.0`.\n\n```sh\ngit checkout v1.3.0\ndocker build --build-arg WHISPER_S2T_VER=v1.3.0 --build-arg SKIP_TENSORRT_LLM=1 -t whisper_s2t:1.3.0 .\n```\n\nTo build the container with TensorRT-LLM support:\n\n```sh\ndocker build --build-arg WHISPER_S2T_VER=main -t whisper_s2t:main-trtllm .\n```\n\n### Local Installation\n\nInstall audio packages required for resampling and loading audio files.\n\n#### For Ubuntu\n```sh\napt-get install -y libsndfile1 ffmpeg\n```\n\n#### For MAC\n```sh\nbrew install ffmpeg\n```\n\n#### For Ubuntu\u002FMAC\u002FWindows\u002FAnyOther With Conda for Python\n```sh\nconda install conda-forge::ffmpeg\n```\n\nTo install or update to the latest released version of WhisperS2T use the following command:\n\n```sh\npip install -U whisper-s2t\n```\n\nOr to install from latest commit in this repo:\n\n```sh\npip install -U git+https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T.git\n```\n\n**NOTE:** If your CUDNN and CUBLAS installation is done using pip wheel, you can run the following to add CUDNN path to `LD_LIBRARY_PATH`:\n\n```sh\nexport LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:`python3 -c 'import os; import nvidia.cublas.lib; import nvidia.cudnn.lib; print(os.path.dirname(nvidia.cublas.lib.__file__) + \":\" + os.path.dirname(nvidia.cudnn.lib.__file__))'`\n```\n\n**To use TensorRT-LLM Backend**\n\nFor TensortRT-LLM backend, you will need to install TensorRT and TensorRT-LLM. \n\n```sh\nbash \u003Crepo_dir>\u002Finstall_tensorrt.sh\n```\n\nFor most of the debian system the given bash script should work, if it doesn't\u002Fother system please follow the official TensorRT-LLM instructions [here](https:\u002F\u002Fgithub.com\u002FNVIDIA\u002FTensorRT-LLM\u002Ftree\u002Fmain).\n\n### Usage\n\n#### CTranslate2 Backend\n\n```py\nimport whisper_s2t\n\nmodel = whisper_s2t.load_model(model_identifier=\"large-v2\", backend='CTranslate2')\n\nfiles = ['data\u002FKINCAID46\u002Faudio\u002F1.wav']\nlang_codes = ['en']\ntasks = ['transcribe']\ninitial_prompts = [None]\n\nout = model.transcribe_with_vad(files,\n                                lang_codes=lang_codes,\n                                tasks=tasks,\n                                initial_prompts=initial_prompts,\n                                batch_size=32)\n\nprint(out[0][0]) # Print first utterance for first file\n\"\"\"\n[Console Output]\n\n{'text': \"Let's bring in Phil Mackie who is there at the palace. We're looking at Teresa and Philip May. Philip, can you see how he's being transferred from the helicopters? It looks like, as you said, the beast. It's got its headlights on because the sun is beginning to set now, certainly sinking behind some clouds. It's about a quarter of a mile away down the Grand Drive\",\n 'avg_logprob': -0.25426941679184695,\n 'no_speech_prob': 8.147954940795898e-05,\n 'start_time': 0.0,\n 'end_time': 24.8}\n\"\"\"\n```\n\nTo use word alignment load the model using this: \n\n```py\nmodel = whisper_s2t.load_model(\"large-v2\", asr_options={'word_timestamps': True})\n```\n\n#### TensorRT-LLM Backend\n\n```py\nimport whisper_s2t\n\nmodel = whisper_s2t.load_model(model_identifier=\"large-v2\", backend='TensorRT-LLM')\n\nfiles = ['data\u002FKINCAID46\u002Faudio\u002F1.wav']\nlang_codes = ['en']\ntasks = ['transcribe']\ninitial_prompts = [None]\n\nout = model.transcribe_with_vad(files,\n                                lang_codes=lang_codes,\n                                tasks=tasks,\n                                initial_prompts=initial_prompts,\n                                batch_size=24)\n\nprint(out[0][0]) # Print first utterance for first file\n\"\"\"\n[Console Output]\n\n{'text': \"Let's bring in Phil Mackie who is there at the palace. We're looking at Teresa and Philip May. Philip, can you see how he's being transferred from the helicopters? It looks like, as you said, the beast. It's got its headlights on because the sun is beginning to set now, certainly sinking behind some clouds. It's about a quarter of a mile away down the Grand Drive\", \n 'start_time': 0.0, \n 'end_time': 24.8}\n\"\"\"\n```\n\nCheck this [Documentation](docs.md) for more details.\n\n**NOTE:** For first run the model may give slightly slower inference speed. After 1-2 runs it will give better inference speed. This is due to the JIT tracing of the VAD model.\n\n\n## Acknowledgements\n- [**OpenAI Whisper Team**](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fwhisper): Thanks to the OpenAI Whisper Team for open-sourcing the whisper model.\n- [**HuggingFace Team**](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftransformers\u002Fmodel_doc\u002Fwhisper): Thanks to the HuggingFace Team for their integration of FlashAttention2 and the Whisper model in the transformers library.\n- [**CTranslate2 Team**](https:\u002F\u002Fgithub.com\u002FOpenNMT\u002FCTranslate2\u002F): Thanks to the CTranslate2 Team for providing a faster inference engine for Transformers architecture.\n- [**NVIDIA NeMo Team**](https:\u002F\u002Fgithub.com\u002FNVIDIA\u002FNeMo): Thanks to the NVIDIA NeMo Team for their contribution of the open-source VAD model used in this pipeline.\n- [**NVIDIA TensorRT-LLM Team**](https:\u002F\u002Fgithub.com\u002FNVIDIA\u002FTensorRT-LLM\u002F): Thanks to the NVIDIA TensorRT-LLM Team for their awesome LLM inference optimizations.\n\n\n## License\n\nThis project is licensed under MIT License - see the [LICENSE](LICENSE) file for details.\n\n","\u003Ch1 align=\"center\"> WhisperS2T ⚡ \u003C\u002Fh1>\n\u003Cp align=\"center\">\u003Cb>一款针对 Whisper 模型优化的多推理引擎支持的语音转文本流水线！\u003C\u002Fb>\u003C\u002Fp>\n\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Fwww.pepy.tech\u002Fprojects\u002Fwhisper-s2t\">\n        \u003Cimg alt=\"下载量\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fshashikg_WhisperS2T_readme_4b2f09a31b62.png\" \u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fpepy.tech\u002Fproject\u002Fwhisper-s2t\">\n        \u003Cimg alt=\"GitHub 贡献者\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fcontributors\u002Fshashikg\u002FWhisperS2T\" \u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fwhisper-s2t\">\n        \u003Cimg alt=\"PyPi 发布版本\" src=\"https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fwhisper-s2t.svg\" \u002F>\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T\u002Fissues\">\n        \u003Cimg alt=\"问题\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fissues\u002Fshashikg\u002FWhisperS2T?color=0088ff\" \u002F>\n    \u003C\u002Fa>\n\u003C\u002Fp>\n\u003Chr>\u003Cbr>\n\nWhisperS2T 是一个经过优化、闪电般快速的开源 **语音转文本**（ASR）流水线。它专为 Whisper 模型设计，旨在提供更快的转录速度。相比其他实现方式，WhisperS2T 速度极为出色，与 [WhisperX](https:\u002F\u002Fgithub.com\u002Fm-bain\u002FwhisperX\u002Ftree\u002Fmain) 相比提升了 **2.3 倍**，而与使用 FlashAttention 2 的 [HuggingFace Pipeline](https:\u002F\u002Fhuggingface.co\u002Fopenai\u002Fwhisper-large-v2) 相比则快了 **3 倍**（参考 [Insanely Fast Whisper](https:\u002F\u002Fgithub.com\u002FVaibhavs10\u002Finsanely-fast-whisper)）。此外，它还包含多项启发式方法来提升转录准确性。\n\n[**Whisper**](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fwhisper) 是由 OpenAI 开发的通用语音识别模型，并非我所开发。该模型基于大规模多样化音频数据集进行训练，同时具备多任务能力，可执行多语言语音识别、语音翻译及语言检测等功能。\n\n\n## 发行说明\n\n* [2024年2月25日]：新增预构建的 Docker 镜像以及支持导出为 `txt、json、tsv、srt、vtt` 格式的转录文件。（完整发行说明请见 [此处](https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T\u002Freleases\u002Ftag\u002Fv1.3.1)）\n* [2024年1月28日]：新增对 TensorRT-LLM 后端的支持。\n* [2023年12月23日]：新增对 CTranslate2 后端的词对齐支持（请参阅 [基准测试](https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T\u002Freleases\u002Ftag\u002Fv1.2.0)）。\n* [2023年12月19日]：新增对 Whisper-Large-V3 和 Distil-Whisper-Large-V2 的支持（请参阅 [基准测试](https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T\u002Freleases\u002Ftag\u002Fv1.1.0)）。\n* [2023年12月17日]：WhisperS2T 正式发布！\n\n## 快速入门\n\n请查看此处提供的 Google Colab 笔记本：[notebooks](notebooks)\n\n## 未来规划\n\n- [x] 准备好使用的 Docker 容器。\n- [ ] WhisperS2T-Server：优化的端到端部署就绪服务器代码库。\n- [ ] 提供深入文档，并使用 GitHub Pages 托管。\n- [ ] 探索集成 Meta 的 SeamlessM4T 模型的可能性。\n- [ ] 添加更多用于 WER 基准测试的数据集。\n\n## 基准测试与技术报告\n\n敬请期待将 WhisperS2T 与其他 Whisper 流水线进行对比的技术报告。与此同时，您可以先查看在 A30 GPU 上的一些快速基准测试结果。我所使用的基准测试脚本位于 `scripts\u002F` 目录中。\n\n![A30 基准测试](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fshashikg_WhisperS2T_readme_1396a880366d.png)\n\n**注意：** 我在所有基准测试中均将 `without_timestamps` 参数设置为 `True`。若将其调整为 `False`，可能会改善 HuggingFace 流水线的词错误率（WER），但会相应增加推理时间。值得注意的是，WhisperS2T 在推理速度上的显著提升完全得益于其 **更优的流水线设计**，并未对后端推理引擎（如 CTranslate2、FlashAttention2 等）进行任何特定优化。例如，尽管两者都使用 FlashAttention2 作为推理引擎，WhisperS2T（采用 FlashAttention2）的推理速度仍远超 HuggingFace 流水线（同样使用 FlashAttention2）。此外，两者的 WER 也存在明显差异。\n\n\n## 特性\n\n- 🔄 **多后端支持：** 支持多种 Whisper 模型后端，包括原生 OpenAI 模型、配备 FlashAttention2 的 HuggingFace 模型以及 CTranslate2 模型。\n- 🎙️ **轻松集成自定义 VAD 模型：** 可无缝添加自定义语音活动检测（VAD）模型，以增强语音识别的控制能力和准确性。\n- 🎧 **轻松处理小型或大型音频文件：** 能够智能地将来自不同文件的小段语音合并成批次，从而确保最佳性能。\n- ⏳ **大型音频文件的高效处理：** 在后台异步加载大型音频文件的同时，对分段后的批次进行转录，显著缩短加载时间。\n- 🌐 **多语言\u002F多任务解码的批处理支持：** 可在一个批次中解码多种语言，或同时进行转录和翻译，从而提高灵活性并缩短转录时间。（CTranslate2 后端效果最佳）\n- 🧠 **减少“幻觉”现象：** 通过优化参数和启发式方法，减少重复文本输出或“幻觉”现象。（部分启发式方法仅适用于 CTranslate2 后端）\n- ⏱️ **动态时长支持（实验性）：** 可在给定输入批次中处理长度不固定的音频，而非固定为 30 秒，从而提供更大的灵活性并节省转录计算时间。（仅限 CTranslate2 后端）\n\n\n## 开始使用\n\n### 从 Docker 容器开始\n\n#### 预构建容器\n\n```sh\ndocker pull shashikg\u002Fwhisper_s2t:dev-trtllm\n```\n\nDockerhub 仓库：[https:\u002F\u002Fhub.docker.com\u002Fr\u002Fshashikg\u002Fwhisper_s2t\u002Ftags](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fshashikg\u002Fwhisper_s2t\u002Ftags)\n\n#### 构建您自己的容器\n\n从 `main` 分支构建。\n\n```sh\ndocker build --build-arg WHISPER_S2T_VER=main --build-arg SKIP_TENSORRT_LLM=1 -t whisper_s2t:main .\n```\n\n从特定版本 `v1.3.0` 构建。\n\n```sh\ngit checkout v1.3.0\ndocker build --build-arg WHISPER_S2T_VER=v1.3.0 --build-arg SKIP_TENSORRT_LLM=1 -t whisper_s2t:1.3.0 .\n```\n\n若要构建支持 TensorRT-LLM 的容器：\n\n```sh\ndocker build --build-arg WHISPER_S2T_VER=main -t whisper_s2t:main-trtllm .\n```\n\n### 本地安装\n\n安装重采样和加载音频文件所需的音频包。\n\n#### 对于 Ubuntu\n```sh\napt-get install -y libsndfile1 ffmpeg\n```\n\n#### 对于 MAC\n```sh\nbrew install ffmpeg\n```\n\n#### 对于 Ubuntu\u002FMAC\u002FWindows\u002F任何使用 Python Conda 的系统\n```sh\nconda install conda-forge::ffmpeg\n```\n\n要安装或更新到 WhisperS2T 的最新发布版本，请使用以下命令：\n\n```sh\npip install -U whisper-s2t\n```\n\n或者从本仓库的最新提交安装：\n\n```sh\npip install -U git+https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T.git\n```\n\n**注意：** 如果你的 cuDNN 和 cuBLAS 是通过 pip wheel 安装的，可以运行以下命令将 cuDNN 路径添加到 `LD_LIBRARY_PATH`：\n\n```sh\nexport LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:`python3 -c 'import os; import nvidia.cublas.lib; import nvidia.cudnn.lib; print(os.path.dirname(nvidia.cublas.lib.__file__) + \":\" + os.path.dirname(nvidia.cudnn.lib.__file__))'`\n```\n\n**使用 TensorRT-LLM 后端**\n\n对于 TensorRT-LLM 后端，你需要安装 TensorRT 和 TensorRT-LLM。\n\n```sh\nbash \u003Crepo_dir>\u002Finstall_tensorrt.sh\n```\n\n对于大多数 Debian 系统，提供的 bash 脚本应该可以正常工作。如果不行或在其他系统上，请按照官方 TensorRT-LLM 指南操作 [这里](https:\u002F\u002Fgithub.com\u002FNVIDIA\u002FTensorRT-LLM\u002Ftree\u002Fmain)。\n\n### 使用方法\n\n#### CTranslate2 后端\n\n```py\nimport whisper_s2t\n\nmodel = whisper_s2t.load_model(model_identifier=\"large-v2\", backend='CTranslate2')\n\nfiles = ['data\u002FKINCAID46\u002Faudio\u002F1.wav']\nlang_codes = ['en']\ntasks = ['transcribe']\ninitial_prompts = [None]\n\nout = model.transcribe_with_vad(files,\n                                lang_codes=lang_codes,\n                                tasks=tasks,\n                                initial_prompts=initial_prompts,\n                                batch_size=32)\n\nprint(out[0][0]) # 打印第一段音频的第一句话\n\"\"\"\n[控制台输出]\n\n{'text': \"让我们请来正在王宫现场的菲尔·麦基。我们现在看到的是特蕾莎和菲利普·梅。菲利普，你能看到他如何从直升机上被转移下来吗？就像你刚才说的那样，那辆‘野兽’车正开着大灯，因为太阳已经开始落山了，确实快要没入云层之后。它大约在大车道上一英里四分之一的地方\",\n 'avg_logprob': -0.25426941679184695,\n 'no_speech_prob': 8.147954940795898e-05,\n 'start_time': 0.0,\n 'end_time': 24.8}\n\"\"\"\n```\n\n要使用词对齐功能，请使用以下方式加载模型：\n\n```py\nmodel = whisper_s2t.load_model(\"large-v2\", asr_options={'word_timestamps': True})\n```\n\n#### TensorRT-LLM 后端\n\n```py\nimport whisper_s2t\n\nmodel = whisper_s2t.load_model(model_identifier=\"large-v2\", backend='TensorRT-LLM')\n\nfiles = ['data\u002FKINCAID46\u002Faudio\u002F1.wav']\nlang_codes = ['en']\ntasks = ['transcribe']\ninitial_prompts = [None]\n\nout = model.transcribe_with_vad(files,\n                                lang_codes=lang_codes,\n                                tasks=tasks,\n                                initial_prompts=initial_prompts,\n                                batch_size=24)\n\nprint(out[0][0]) # 打印第一段音频的第一句话\n\"\"\"\n[控制台输出]\n\n{'text': \"让我们请来正在王宫现场的菲尔·麦基。我们现在看到的是特蕾莎和菲利普·梅。菲利普，你能看到他如何从直升机上被转移下来吗？就像你刚才说的那样，那辆‘野兽’车正开着大灯，因为太阳已经开始落山了，确实快要没入云层之后。它大约在大车道上一英里四分之一的地方\",\n 'start_time': 0.0, \n 'end_time': 24.8}\n\"\"\"\n```\n\n更多详细信息请参阅此 [文档](docs.md)。\n\n**注意：** 首次运行时，模型的推理速度可能会稍慢。经过 1-2 次运行后，推理速度会有所提升。这是由于 VAD 模型进行了 JIT 跟踪所致。\n\n## 致谢\n- [**OpenAI Whisper 团队**](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fwhisper)：感谢 OpenAI Whisper 团队开源 Whisper 模型。\n- [**HuggingFace 团队**](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftransformers\u002Fmodel_doc\u002Fwhisper)：感谢 HuggingFace 团队将 FlashAttention2 和 Whisper 模型集成到 transformers 库中。\n- [**CTranslate2 团队**](https:\u002F\u002Fgithub.com\u002FOpenNMT\u002FCTranslate2\u002F)：感谢 CTranslate2 团队为 Transformer 架构提供更快的推理引擎。\n- [**NVIDIA NeMo 团队**](https:\u002F\u002Fgithub.com\u002FNVIDIA\u002FNeMo)：感谢 NVIDIA NeMo 团队贡献了本流程中使用的开源 VAD 模型。\n- [**NVIDIA TensorRT-LLM 团队**](https:\u002F\u002Fgithub.com\u002FNVIDIA\u002FTensorRT-LLM\u002F)：感谢 NVIDIA TensorRT-LLM 团队提供的卓越 LLM 推理优化。\n\n## 许可证\n\n本项目采用 MIT 许可证授权——详情请参阅 [LICENSE](LICENSE) 文件。","# WhisperS2T 快速上手指南\n\nWhisperS2T 是一个针对 Whisper 模型优化的超快语音转文本（ASR）流水线。相比 WhisperX 提速 2.3 倍，相比使用 FlashAttention 2 的 HuggingFace Pipeline 提速 3 倍，支持 CTranslate2、TensorRT-LLM 等多种推理后端。\n\n## 1. 环境准备\n\n### 系统要求\n*   **操作系统**：Linux (Ubuntu), macOS, Windows\n*   **Python**：建议 Python 3.8+\n*   **GPU**：推荐使用 NVIDIA GPU 以获得最佳性能（支持 CUDA）\n\n### 前置依赖\n在安装 Python 包之前，需先安装音频处理库（用于重采样和加载音频文件）。\n\n**Ubuntu:**\n```sh\napt-get install -y libsndfile1 ffmpeg\n```\n\n**macOS:**\n```sh\nbrew install ffmpeg\n```\n\n**Conda 用户 (通用):**\n```sh\nconda install conda-forge::ffmpeg\n```\n\n## 2. 安装步骤\n\n### 方式一：Pip 安装（推荐）\n\n安装最新稳定版：\n```sh\npip install -U whisper-s2t\n```\n\n或从源码安装最新版：\n```sh\npip install -U git+https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T.git\n```\n\n> **注意**：如果你通过 pip wheel 安装了 CUDNN 和 CUBLAS，可能需要配置环境变量：\n> ```sh\n> export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:`python3 -c 'import os; import nvidia.cublas.lib; import nvidia.cudnn.lib; print(os.path.dirname(nvidia.cublas.lib.__file__) + \":\" + os.path.dirname(nvidia.cudnn.lib.__file__))'`\n> ```\n\n### 方式二：Docker 安装\n\n拉取预构建镜像（包含 TensorRT-LLM 支持）：\n```sh\ndocker pull shashikg\u002Fwhisper_s2t:dev-trtllm\n```\n\n### 可选：TensorRT-LLM 后端支持\n若需使用 TensorRT-LLM 后端，需额外安装 TensorRT 相关组件：\n```sh\nbash \u003Crepo_dir>\u002Finstall_tensorrt.sh\n```\n*(注：`\u003Crepo_dir>` 为克隆代码后的目录路径)*\n\n## 3. 基本使用\n\nWhisperS2T 支持多种后端，以下是两种最常用的使用示例。\n\n### 示例 A：使用 CTranslate2 后端（推荐，速度快且兼容性好）\n\n```py\nimport whisper_s2t\n\n# 加载模型\nmodel = whisper_s2t.load_model(model_identifier=\"large-v2\", backend='CTranslate2')\n\n# 准备输入数据\nfiles = ['data\u002FKINCAID46\u002Faudio\u002F1.wav']\nlang_codes = ['en']       # 语言代码，如 'zh', 'en', 'ja' 等\ntasks = ['transcribe']    # 任务类型：'transcribe' (转录) 或 'translate' (翻译)\ninitial_prompts = [None]\n\n# 执行转录（带 VAD 语音活动检测）\nout = model.transcribe_with_vad(files,\n                                lang_codes=lang_codes,\n                                tasks=tasks,\n                                initial_prompts=initial_prompts,\n                                batch_size=32)\n\n# 输出结果\nprint(out[0][0]) \n```\n\n**启用词级时间戳（Word Alignment）：**\n```py\nmodel = whisper_s2t.load_model(\"large-v2\", asr_options={'word_timestamps': True})\n```\n\n### 示例 B：使用 TensorRT-LLM 后端（极致性能）\n\n```py\nimport whisper_s2t\n\n# 加载 TensorRT-LLM 后端模型\nmodel = whisper_s2t.load_model(model_identifier=\"large-v2\", backend='TensorRT-LLM')\n\nfiles = ['data\u002FKINCAID46\u002Faudio\u002F1.wav']\nlang_codes = ['en']\ntasks = ['transcribe']\ninitial_prompts = [None]\n\n# 执行转录\nout = model.transcribe_with_vad(files,\n                                lang_codes=lang_codes,\n                                tasks=tasks,\n                                initial_prompts=initial_prompts,\n                                batch_size=24)\n\nprint(out[0][0])\n```\n\n> **提示**：首次运行时，由于 VAD 模型的 JIT 追踪编译，推理速度可能稍慢。运行 1-2 次后速度将显著提升并达到最佳状态。","某在线教育平台的技术团队需要处理每日新增的 500 小时多语言课程录像，将其自动转化为带时间戳的字幕文件，以支持全球学员的无障碍学习及内容检索。\n\n### 没有 WhisperS2T 时\n- **处理效率极低**：使用标准的 HuggingFace Pipeline 或基础 Whisper 实现，转录速度缓慢，导致 500 小时的音频往往需要数天才能完成处理，严重滞后于课程上线节奏。\n- **硬件资源浪费**：由于推理效率不高，GPU 利用率未能达到最优，为了赶工期不得不临时扩容昂贵的云 GPU 实例，大幅增加了运营成本。\n- **格式转换繁琐**：原始输出通常为简单的文本或 JSON，缺乏直接生成标准字幕格式（如 SRT、VTT）的能力，开发人员需额外编写脚本进行后处理和格式转换，增加了维护负担。\n- **精度与速度难兼得**：若尝试通过加速手段（如降低精度或使用轻量模型）来提升速度，往往会牺牲转录准确率，导致专业术语识别错误率高，后期人工校对成本居高不下。\n\n### 使用 WhisperS2T 后\n- **转录速度飞跃**：得益于优化的流水线设计，WhisperS2T 在相同硬件下比 HuggingFace Pipeline 快 3 倍，比 WhisperX 快 2.3 倍，原本需要几天的任务现在仅需几小时即可完成，实现了近乎实时的处理能力。\n- **显著降低成本**：极高的推理效率意味着同样的 GPU 资源可以处理更多数据，或者在处理相同数据量时大幅缩短租用时间，直接降低了云计算账单。\n- **原生支持多格式导出**：WhisperS2T 内置了对 txt、json、tsv、srt、vtt 等多种格式的直接导出支持，无需额外开发后处理脚本，打通了从音频到最终字幕文件的自动化链路。\n- **保持高精度输出**：在大幅提升速度的同时，WhisperS2T 通过启发式算法优化了转录准确性，并支持 CTranslate2 后端的词级对齐，确保了专业课程内容的高保真还原，减少了人工复核的工作量。\n\nWhisperS2T 通过极致的推理速度优化和开箱即用的工程化特性，将大规模语音转写任务从“算力瓶颈”转变为“高效流水线”，显著提升了业务响应速度并降低了基础设施成本。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fshashikg_WhisperS2T_5014bf7d.png","shashikg","Shashi Kant","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fshashikg_4e1c046b.png","In love with Artificial Intelligence, Cognitive Sciences, and Deep Learning",null,"Kanpur(UP), India","shashikg.iitk@gmail.com","https:\u002F\u002Fshashikg.github.io\u002F","https:\u002F\u002Fgithub.com\u002Fshashikg",[86,90,94,98],{"name":87,"color":88,"percentage":89},"Jupyter Notebook","#DA5B0B",50.3,{"name":91,"color":92,"percentage":93},"Python","#3572A5",48.6,{"name":95,"color":96,"percentage":97},"Shell","#89e051",0.9,{"name":99,"color":100,"percentage":101},"Dockerfile","#384d54",0.3,559,74,"2026-03-31T23:38:50","MIT","Linux, macOS, Windows","使用 CTranslate2\u002FFlashAttention2 后端时建议 NVIDIA GPU；使用 TensorRT-LLM 后端时必须 NVIDIA GPU。具体显存和 CUDA 版本未说明（TensorRT-LLM 通常要求较新的 CUDA 版本，如 12.x）。","未说明",{"notes":110,"python":108,"dependencies":111},"1. 必须安装音频处理依赖：Ubuntu 需安装 libsndfile1 和 ffmpeg，macOS 需安装 ffmpeg，Conda 用户可通过 conda-forge 安装 ffmpeg。\n2. 若通过 pip 安装 CUDA 相关库，需手动将 nvidia.cublas.lib 和 nvidia.cudnn.lib 的路径添加到 LD_LIBRARY_PATH 环境变量中。\n3. 支持多种后端：CTranslate2、HuggingFace (FlashAttention2)、TensorRT-LLM。其中 TensorRT-LLM 后端需额外运行 install_tensorrt.sh 脚本或按照 NVIDIA 官方文档安装 TensorRT 和 TensorRT-LLM。\n4. 首次运行时由于 VAD 模型的 JIT tracing，推理速度可能稍慢，后续运行会恢复正常高速。",[112,113,114,115,116,117,118],"whisper-s2t","ffmpeg","libsndfile1","nvidia-cublas-cuXX","nvidia-cudnn-cuXX","TensorRT","TensorRT-LLM",[26,13,55],[121,122,123,124,125,126,127,128,129],"asr","deep-learning","speech-recognition","speech-to-text","whisper","tensorrt-llm","tensorrt","vad","voice-activity-detection","2026-03-27T02:49:30.150509","2026-04-06T10:24:53.617551",[133,138,143,148,152,157],{"id":134,"question_zh":135,"answer_zh":136,"source_url":137},11285,"处理文件名中包含空格的文件时出现 \"file does not start with RIFF id\" 错误怎么办？","这通常是因为旧版本代码中使用 `os.system` 调用 ffmpeg 时未正确处理带空格的文件路径。解决方案是安装 GitHub 上最新的代码（而非 PyPI 上的旧版本），最新提交已修复此问题。可以通过以下命令从源码安装：\n```bash\npip install git+https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T.git\n```","https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T\u002Fissues\u002F42",{"id":139,"question_zh":140,"answer_zh":141,"source_url":142},11286,"如何解决依赖冲突或指定所需的依赖版本范围？","建议从 main 分支拉取最新代码以获取最新的依赖兼容性支持。如果遇到问题，可以尝试不带依赖安装，然后手动确保所有要求都已满足：\n```bash\npip install --no-deps whisper-s2t\n```\n随后根据您的需求手动安装 torch、accelerate 等依赖库。维护者指出最新提交（如 PR #34）已解决相关兼容性问题。","https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T\u002Fissues\u002F29",{"id":144,"question_zh":145,"answer_zh":146,"source_url":147},11287,"使用自定义音频文件（如 .flac）时报错 \"EOFError\" 或 \"RIFF id\" 错误的原因及解决方法？","这通常与 ffmpeg 的 sox 重采样器配置有关。请尝试以下步骤：\n1. 检查是否可以使用命令行直接转换成功：`ffmpeg -i input.flac -threads 1 -acodec pcm_s16le -ac 1 -ar 16000 output.wav -y`\n2. 如果命令行可行但代码不行，可能是编译的 ffmpeg 版本缺少 sox 重采样器支持。建议重新安装 ffmpeg，确保其包含默认的重采样器。\n3. 更新 WhisperS2T 到最新 commit，维护者已针对此问题进行了修复。","https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T\u002Fissues\u002F3",{"id":149,"question_zh":150,"answer_zh":151,"source_url":142},11288,"调用 `write_outputs` 保存为 txt 格式时出现 `KeyError: 'txt'` 错误？","确保您使用的是最新版本的代码。该错误表明当前安装的版本中 `TranscriptExporter` 不支持 'txt' 格式键值。请从 GitHub 主分支更新库：\n```bash\npip install git+https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T.git\n```\n更新后，`format='txt'` 应能正常工作。",{"id":153,"question_zh":154,"answer_zh":155,"source_url":156},11289,"WhisperS2T 是否支持 whisper.cpp 作为后端？","目前官方主要支持 ctranslate2 和 huggingface 后端。虽然社区有用户询问关于 whisper.cpp 的支持，并指出 whisper.cpp 本身支持批处理，但截至目前，WhisperS2T 尚未原生集成 whisper.cpp 作为后端。建议继续使用 ctranslate2 后端以获得最佳性能，或关注后续更新。","https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T\u002Fissues\u002F33",{"id":158,"question_zh":159,"answer_zh":160,"source_url":137},11290,"如何批量处理目录及其子目录中的所有音频文件？","虽然库本身可能不直接提供递归批处理脚本，但用户可以编写自定义脚本。有社区用户分享了递归处理指定目录及所有子目录文件的脚本思路。您可以遍历目录，收集所有音频文件路径，然后传递给 `model.transcribe` 方法。例如：\n```python\nimport os\nfrom whisper_s2t import load_model\n\nmodel = load_model(\"large-v2\")\naudio_files = []\nfor root, dirs, files in os.walk(\"your_directory\"):\n    for file in files:\n        if file.endswith((\".mp3\", \".wav\", \".flac\")):\n            audio_files.append(os.path.join(root, file))\n\nout = model.transcribe(audio_files)\n```\n注意处理文件名中的空格问题（需更新至最新版库）。",[162,167,172,177,182],{"id":163,"version":164,"summary_zh":165,"released_at":166},61791,"v1.3.1","## 新特性\n* 转录导出器：可用于将预测的转录文本保存为 `vtt、srt、json、tsv、txt` 格式。（文档：[https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T\u002Fblob\u002Fmain\u002Fdocs.md#write-transcripts-to-a-file](https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T\u002Fblob\u002Fmain\u002Fdocs.md#write-transcripts-to-a-file)）\n* 预构建 Docker 镜像：发布了开箱即用的预构建 Docker 镜像。（文档：[https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T?tab=readme-ov-file#from-docker-container](https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T?tab=readme-ov-file#from-docker-container)）\n* 支持使用单个 `lang_code` 或 `tasks` 参数，而非列表——当所有音频文件属于同一种语言或任务时。https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T\u002Fissues\u002F27\n\n## 错误修复\n* 由 @shashikg 在 https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T\u002Fpull\u002F15 中修复了不使用 VAD 的 `transcribe` 函数。（文档：https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T\u002Fblob\u002Fmain\u002Fdocs.md#run-without-vad-model）\n* 由 @shashikg 在 https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T\u002Fpull\u002F12 中修复了静音文件相关的问题。\n* 由 @shashikg 在 https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T\u002Fpull\u002F32 中修复了缺失依赖项及 tensorrt-llm 运行失败的问题。\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T\u002Fcompare\u002Fv1.3.0...v1.3.1","2024-02-25T05:02:17",{"id":168,"version":169,"summary_zh":170,"released_at":171},61792,"v1.3.0","# 发行说明\n\n1. 支持 TensorRT-LLM 后端  \n2. 包含示例笔记本\n\n# TensorRT-LLM 后端\n\nWhisperS2T 现在支持 NVIDIA 的 TensorRT-LLM 后端：https:\u002F\u002Fgithub.com\u002FNVIDIA\u002FTensorRT-LLM，与 CTranslate2 后端相比，推理时间进一步缩短至原来的二分之一。目前在 A30 GPU 上的最优配置下，可实现约 1 小时音频文件的转录仅需 18 秒左右。更新后的基准测试结果如下：\n\n![benchmarks_v1_3_0](https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T\u002Fassets\u002F22556187\u002Fcaecbb38-b69e-4daa-bcdc-16beb9456de5)","2024-01-28T16:02:54",{"id":173,"version":174,"summary_zh":175,"released_at":176},61793,"v1.2.0","# 发布说明\n\n* 修复了 `ffmpeg` 重采样问题，通过添加一个选项，在 `soxr` 不可用时使用 `swr` 重采样器。\n* 新增了词级时间戳功能。\n\n## 词级时间戳基准测试结果\n\n| 模型名称                                             | 重叠准确率 | 0.1秒误差范围内的准确率 | 0.2秒误差范围内的准确率 | 0.5秒误差范围内的准确率 | 1.0秒误差范围内的准确率 | 总词数 | 推理时间 |\n|--------------------------------------------------------|-----------------|---------------------------|---------------------------|---------------------------|---------------------------|-----------------|-----------------|\n| **WhisperS2T（ASR：whsiper-large-v2 - 对齐器：whsiper-tiny）** | 66.21           | 38.67                     | 60.8                      | 76.06                     | 85.82                     | 64350           | 2.6x            |\n| WhisperS2T（ASR：whsiper-large-v2 - 对齐器：whsiper-large-v2） | 66.72           | 48.95                     | 58.54                     | 73.44                     | 84.0                      | 64350           | 1.6x            |\n| WhisperX（ASR：whsiper-large-v2 - 对齐器：wav2vec）    | 55.65           | 50.66                     | 55.84                     | 66.18                     | 75.57                     | 64307           | 1x              |\n\n我们使用 Whisper 模型进行对齐。观察发现，无论是 Whisper 自身的对齐方式，还是基于音素级别的对齐（如 WhisperX），其性能都较为接近。然而，使用 Whisper 具有若干优势，例如开箱即用的支持所有语言。而对于音素级别的对齐，每新增一种语言都需要单独训练模型，这在一定程度上削弱了使用 Whisper 模型的优势。此外，当使用 `whisper-tiny` 模型进行词级对齐时，几乎不会增加延迟开销，同时也不会影响对齐精度。我们在基准测试中采用了 [AMI-MIX-Headset-Test](https:\u002F\u002Fgroups.inf.ed.ac.uk\u002Fami\u002Fcorpus\u002F) 数据集。\n\n目前尚无明确界定的指标来评估词级对齐的准确性。因此，我们提出了一种新的度量方法，以更准确地评估词级对齐的性能。请参阅此函数：[词级对齐度量函数](https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T\u002Fblob\u002Fmain\u002Ftools\u002Fmetrics.py#L129)。\n\n该度量方法的具体步骤如下：\n1. 首先，将预测转录与参考转录进行对比，识别出预测转录中检测到的词语。这一步至关重要，因为在评估词级对齐准确率时，不应考虑预测转录中遗漏或额外插入的词语。\n2. 确定检测到的词语后，计算两个值：`overlapped_words` 和 `words_within_collar`（见下图）。最后，将这两个值分别除以检测到的总词数。\n\n![word_alignment_benchmark](https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T\u002Fassets\u002F22556187\u002F211c063c-1d30-462f-8ce1-1ea2bcbdbbab)\n","2023-12-23T10:20:32",{"id":178,"version":179,"summary_zh":180,"released_at":181},61794,"v1.1.0","新增对 Whisper Large v3 和 Distil-Whisper Large v2 的支持。以下是基准测试结果：\n\n![distil-whisper](https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T\u002Fassets\u002F22556187\u002F4e27205b-5bcc-4339-aeac-0e241f88c4b7)\n\n![large-v3](https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T\u002Fassets\u002F22556187\u002F71b31073-4ca7-47bc-a9e9-b8729bd2b3b4)\n","2023-12-19T00:28:45",{"id":183,"version":184,"summary_zh":185,"released_at":186},61795,"v1.0.0","# 初始发布\n\n# WhisperS2T ⚡\n\nWhisperS2T 是一款专为 Whisper 模型量身定制的优化型闪电般快速的语音转文本流水线！它设计得极其迅速，相比 WhisperX 提升了 1.5 倍的速度，而与使用 FlashAttention 2 的 HuggingFace Pipeline（疯狂快的 Whisper）相比，则提速 2 倍。此外，它还包含多项启发式规则，以进一步提升转写准确性。\n\n[**Whisper**](https:\u002F\u002Fgithub.com\u002Fopenai\u002Fwhisper) 是由 OpenAI 开发的一款通用语音识别模型。该模型基于大规模多样化音频数据集进行训练，同时也是一个多任务模型，能够执行多语言语音识别、语音翻译以及语言识别等功能。\n\n## 基准测试与技术报告\n\n敬请期待我们将发布的 WhispereS2T 与其他 Whisper 流水线对比的技术报告。与此同时，您可以先查看在 A30 GPU 上的一些快速基准测试结果。\n\n![benchmarks](https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T\u002Fassets\u002F22556187\u002F50e563af-f58a-488f-bd88-9f5454ae4044)\n\n## 功能特性\n\n- 🔄 **多后端支持：** 支持多种 Whisper 模型后端，包括原生 OpenAI 模型、配备 FlashAttention2 的 HuggingFace 模型以及 CTranslate2 模型。\n- 🎙️ **轻松集成自定义 VAD 模型：** 可无缝添加自定义语音活动检测（VAD）模型，从而增强语音识别的控制能力和准确性。\n- 🎧 **轻松处理小型或大型音频文件：** 能够智能地将来自不同文件的小段语音进行批处理，确保最佳性能。\n- ⏳ **大型音频文件的高效处理流程：** 在后台异步加载大型音频文件的同时，对分段后的批次进行转写，显著缩短加载时间。\n- 🌐 **支持多语言\u002F多任务解码的批量处理：** 可在一个批次中解码多种语言，或同时执行转写和翻译任务，从而提高灵活性并缩短转写时间。\n- 🧠 **减少“幻觉”现象：** 通过优化参数和启发式规则，有效降低重复文本输出或“幻觉”现象的发生。\n- ⏱️ **动态时长支持（实验性）：** 在给定输入批次中处理可变长度的输入，而非固定为 30 秒，从而提供更大的灵活性，并在转写过程中节省计算时间。\n\n\n\n## 快速上手\n\n### 安装\n\n安装用于重采样和加载音频文件所需的音频相关软件包。\n\n```sh\napt-get install -y libsndfile1 ffmpeg\n```\n\n要安装或更新到最新发布的 WhisperS2T 版本，请使用以下命令：\n\n```sh\npip install -U whisper-s2t\n```\n\n或者从本仓库的最新提交安装：\n\n```sh\npip install -U git+https:\u002F\u002Fgithub.com\u002Fshashikg\u002FWhisperS2T.git\n```\n\n### 使用方法\n\n```py\nimport whisper_s2t\n\nmodel = whisper_s2t.load_model(model_identifier=\"large-v2\", backend='CTranslate2')\n\nfiles = ['data\u002FKINCAID46\u002Faudio\u002F1.wav']\nlang_codes = ['en']\ntasks = ['transcribe']\ninitial_prompts = [None]\n\nout = model.transcribe_with_vad(files,\n                                lang_codes=lang_codes,\n    ","2023-12-17T00:01:48"]