{"id":29190837,"url":"https://github.com/jianchang512/parakeet-api","last_synced_at":"2025-07-07T08:02:06.783Z","repository":{"id":302176669,"uuid":"1011121002","full_name":"jianchang512/parakeet-api","owner":"jianchang512","description":"一个基于 NVIDIA Parakeet-tdt-0.6b 模型的本地语音转录服务。它提供了一个与  OpenAI API 兼容的接口和一个简洁的 Web 用户界面","archived":false,"fork":false,"pushed_at":"2025-07-01T00:23:19.000Z","size":9,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-01T01:29:33.362Z","etag":null,"topics":["parakeet","speech-recognition","speech-to-text"],"latest_commit_sha":null,"homepage":"https://pyvideotrans.com","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jianchang512.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-30T10:32:53.000Z","updated_at":"2025-07-01T01:04:08.000Z","dependencies_parsed_at":"2025-07-01T01:31:06.776Z","dependency_job_id":"2b81c4fb-9d9c-45a3-9f41-797de73c55b5","html_url":"https://github.com/jianchang512/parakeet-api","commit_stats":null,"previous_names":["jianchang512/parakeet-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jianchang512/parakeet-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jianchang512%2Fparakeet-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jianchang512%2Fparakeet-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jianchang512%2Fparakeet-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jianchang512%2Fparakeet-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jianchang512","download_url":"https://codeload.github.com/jianchang512/parakeet-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jianchang512%2Fparakeet-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263052434,"owners_count":23406106,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["parakeet","speech-recognition","speech-to-text"],"created_at":"2025-07-02T00:12:03.341Z","updated_at":"2025-07-02T00:12:04.102Z","avatar_url":"https://github.com/jianchang512.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Parakeet-API: 高性能本地语音转录服务\n\n**parakeet-api** 项目  是一个基于 **NVIDIA Parakeet-tdt-0.6b** 模型的本地语音转录服务。它提供了一个与 `OpenAI API` 兼容的接口和一个简洁的 Web 用户界面，让您能够轻松、快速地将任何音视频文件转换为高精度的 SRT 字幕,同时可适配`pyVideoTrans v3.72+`。\n\n\u003e parakeet模型目前仅支持英语\n\n## ✨ Parakeet-API 核心优势\n\n*   🚀 **极致的速度与性能**: Parakeet 模型经过高度优化，尤其在配备 NVIDIA GPU 的环境下，其转录速度非常快，特别适合处理大量或长时长的音视频文件。\n*   🎯 **精准的时间戳**: 采用先进的 Transducer (TDT) 技术，生成的 SRT 字幕时间戳非常精确，能与音频流完美对齐，非常适合视频字幕制作。\n*   💰 **完全免费，无限使用**: 在您自己的硬件上运行，无需支付任何 API 调用费用，也没有使用时长的限制。\n*   🌐 **灵活的访问方式**: 提供直观的 Web 界面和标准化的 API 接口，可轻松集成到 `pyVideoTrans` 等现有工作流中。\n\n## 🛠️ 安装与配置指南\n\n本项目支持 Windows, macOS 和 Linux。请按照以下步骤进行安装和配置。\n\n### 步骤 0: 配置 python3.10 环境\n\n如果你本机无python3，请照此教程安装:  [https://pvt9.com/_posts/pythoninstall](https://pvt9.com/_posts/pythoninstall)\n\n### 步骤 1: 准备 FFmpeg\n\n本项目使用 `ffmpeg` 进行音视频格式预处理。\n\n*   **Windows (推荐)**:\n    1.  从 [FFmpeg github 仓库下载](https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl-shared.zip)  解压后得到`ffmpeg.exe`。\n    2.  将下载的 **`ffmpeg.exe` 文件直接放置在本项目根目录** (与 `app.py` 文件在同一级)，程序会自动检测并使用它，无需配置环境变量。\n\n*   **macOS (使用 Homebrew)**:\n    ```bash\n    brew install ffmpeg\n    ```\n*   **Linux (Debian/Ubuntu)**:\n    ```bash\n    sudo apt update \u0026\u0026 sudo apt install ffmpeg\n    ```\n\n### 步骤 2: 创建 Python 虚拟环境并安装依赖\n\n1.  **下载或克隆本项目代码**到您的本地计算机(建议放在非系统盘的英文或数字文件夹内)。\n2.  **打开终端或命令行工具**，并进入项目根目录(windows上直接在文件夹地址栏里输入`cmd`回车即可)。\n![](https://pvtr2.pyvideotrans.com/1751277781831_image.png)\n\n3.  **创建虚拟环境**: `python -m venv venv`\n4.  **激活虚拟环境**:\n    *   **Windows (CMD/PowerShell)**: `.\\venv\\Scripts\\activate`\n    *   **macOS / Linux (Bash/Zsh)**: `source venv/bin/activate`\n\n5.  **安装依赖库**:\n    *   **如果您没有 NVIDIA 显卡 (仅使用 CPU)**:\n        ```bash\n        pip install -r requirements.txt\n        ```\n\n    *   **如果您有 NVIDIA 显卡 (使用 GPU 加速)**:\n        a. 确保您已安装最新的 [NVIDIA 驱动](https://www.nvidia.com/Download/index.aspx) 和相应的 [CUDA Toolkit](https://developer.nvidia.com/cuda-toolkit-archive)。\n        b. 卸载可能存在的旧版 PyTorch: `pip uninstall -y torch`\n        c. 安装与您的 CUDA 版本匹配的 PyTorch (以 CUDA 12.6 为例):\n        ```bash\n        pip install torch --index-url https://download.pytorch.org/whl/cu126\n        ```\n\n\u003e 如果在 `pip install -r requirements.txt` 中遇到错误无法解决，可参阅该教程: https://pyvideotrans.com/blog/pip-install-sslerror-parseerror\n\n### 步骤 3: 启动服务\n\n在**已激活虚拟环境**的终端中，运行以下命令：\n\n```bash\npython app.py\n```\n\n您将看到服务启动的提示。**首次运行**会下载模型（约1.2GB），请耐心等待。\n![](https://pvtr2.pyvideotrans.com/1751277964995_image.png)\n\n如果出现一堆提示，无需介意，\n![](https://pvtr2.pyvideotrans.com/1751278084962_image.png)\n\n**启动成功界面**\n\n![](https://pvtr2.pyvideotrans.com/1751278233994_image.png)\n\n\n## 🚀 使用方法\n\n### 方法 1: 使用 Web 界面\n\n1.  在浏览器中打开：[http://127.0.0.1:5092](http://127.0.0.1:5092)\n2.  拖拽或点击上传您的音视频文件。\n3.  点击 **\"开始转录\"**，等待处理完成即可在下方看到并下载 SRT 字幕。\n\n![](https://pvtr2.pyvideotrans.com/1751278256778_image.png)\n\n\n\n### 方法 2: API 调用 (Python 示例)\n\n使用 `openai` 库可以轻松调用本服务。\n\n```python\nfrom openai import OpenAI\n\nclient = OpenAI(\n    base_url=\"http://127.0.0.1:5092/v1\",\n    api_key=\"any-key\",\n)\n\nwith open(\"your_audio.mp3\", \"rb\") as audio_file:\n    srt_result = client.audio.transcriptions.create(\n        model=\"parakeet\",\n        file=audio_file,\n        response_format=\"srt\"\n    )\nprint(srt_result)\n```\n\n### 方法 3: 集成到 pyVideoTrans (推荐)\n\nParakeet-API 可与视频翻译工具 `pyVideoTrans` (v3.72及以上版本) 无缝集成。\n\n![](https://pvtr2.pyvideotrans.com/1751278281473_image.png)\n\n1.  确保您的 `parakeet-api` 服务正在本地运行。\n2.  打开 `pyVideoTrans` 软件。\n3.  在菜单栏中，选择 **语音识别(R) -\u003e Nvidia parakeet-tdt**。\n4.  在弹出的配置窗口中，将 **\"http地址\"** 设置为：`http://127.0.0.1:5092/v1`\n5.  点击 **\"保存\"**，即可开始使用。\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjianchang512%2Fparakeet-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjianchang512%2Fparakeet-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjianchang512%2Fparakeet-api/lists"}