Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Voice Recognition to Text Tool / 一个离线运行的本地音视频转字幕工具,输出json、srt字幕、纯文字格式
| Date | Stars |
|---|---|
| 2026-07-24 | 4699 |
| 2026-07-25 | 4700 |
| 2026-07-28 | 4700 |
| 2026-07-30 | 4700 |
| 2026-08-06 | 4700 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
<div align="center"> **中文简体** | [English](./docs/en/README_EN.md) </div> --- <div align="center"> [👑 捐助本项目](https://pyvideotrans.com/about) </div> --- # 语音识别转文字工具 这是一个离线运行的本地语音识别转文字工具,基于 fast-whipser 开源模型,可将视频/音频中的人类声音识别并转为文字,可输出json格式、srt字幕带时间戳格式、纯文字格式。可用于自行部署后替代 openai 的语音识别接口或百度语音识别等,准确率基本等同openai官方api接口。 fast-whisper 开源模型有 tiny/base/small/medium/large-v3, 内置 tiny 模型,tiny->large-v3识别效果越来越好,但所需计算机资源也更多,根据需要可自行下载后解压到 models 目录下即可。 # 视频演示 https://github.com/jianchang512/stt/assets/3378335/d716acb6-c20c-4174-9620-f574a7ff095d  # 预编译Win版使用方法/Linux和Mac源码部署 1. [点击此处打开Releases页面下载](https://github.com/jianchang512/stt/releases)预编译文件 2. 下载后解压到某处,比如 E:/stt 3. 双击 start.exe ,等待自动打开浏览器窗口即可 4. 点击页面中的上传区域,在弹窗中找到想识别的音频或视频文件,或直接拖拽音频视频文件到上传区域,然后选择发生语言、文本输出格式、所用模型,点击“立即开始识别”,稍等片刻,底部文本框中会以所选格式显示识别结果 5. 如果机器拥有英伟达GPU,并正确配置了CUDA环境,将自动使用CUDA加速 # 源码部署(Linux/Mac/Window) 0. 要求 python 3.9->3.11 1. 创建空目录,比如 E:/stt, 在这个目录下打开 cmd 窗口,方法是地址栏中输入 `cmd`, 然后回车。 使用git拉取源码到当前目录 ` git clone [email protected]:jianchang512/stt.git . ` 2. 创建虚拟环境 `python -m venv venv` 3. 激活环境,win下命令 `%cd%/venv/scripts/activate`,linux和Mac下命令 `source ./venv/bin/activate` 4. 安装依赖: `pip install -r requirements.txt`,如果报版本冲突错误,请执行 `pip install -r requirements.txt --no-deps` ,如果希望支持cuda加速,继续执行代码 `pip uninstall -y torch`, `pip install torch --index-url https://download.pytorch.org/whl/cu121` 5. win下解压 ffmpeg.7z,将其中的`ffmpeg.exe`和`ffprobe.exe`放在项目目录下, linux和mac 自行搜索 如何安装ffmpeg 6. [下载模型压缩包](https://github.com/jianchang512/stt/releases/tag/0.0),根据需要下载模型,下载后将压缩包里的文件夹放到项目根目录的 models 文件夹内 7. 执行 `python start.py `,等待自动打开本地浏览器窗口。 # Api接口 接口地址: http://127.0.0.1:9977/api 请求方法: POST 请求参数: language: 语言代码:可选如下 > > 中文:zh > 英语:en > 法语:fr > 德语:de > 日语:ja > 韩语:ko > 俄语:ru > 西班牙语:es > 泰国语:th > 意大利语:it > 葡萄牙语:pt > 越南语:vi > 阿拉伯语:ar > 土耳其语:tr > model: 模型名称,可选如下 > > base 对应于 models/models--Systran--faster-whisper-base > small 对应于 models/models--Systran--faster-whisper-small > medium 对应于 models/models--Systran--faster-whisper-medium > large-v3 对应于 models/models--Systran--faster-whisper-large-v3 > response_format: 返回的字幕格式,可选 text|json|srt file: 音视频文件,二进制上传 Api 请求示例 ```python import requests # 请求地址 url = "http://127.0.0.1:9977/api" # 请求参数 file:音视频文件,language:语言代码,model:模型,response_format:text|json|srt # 返回 code==0 成功,其他失败,msg==成功为ok,其他失败原因,data=识别后返回文字 files = {"file": open("C:/Users/c1/Videos/2.wav", "rb")} data={"language":"zh","model":"base","response_format":"json"} response = requests.request("POST", url, timeout=600, data=data,files=files) print(response.json()) ``` # 兼容 openai 语音转文字接口 示例代码 ``` # openai兼容格式 from openai import OpenAI client = OpenAI(api_key='123',base_url='http://127.0.0.1:9977/v1') audio_file= open("/users/c1/videos/60.wav", "rb") transcription = client.audio.transcriptions.create( model="tiny", file=audio_file, response_format="text" # 支持 text 、srt 格式,json格式会返回srt字幕解析后的json数据 ) print(transcription.text) ``` # CUDA 加速支持 **安装CUDA工具** [详细安装方法](https://juejin.cn/post/7318704408727519270) 如果你的电脑拥有 Nvidia 显卡,先升级显卡驱动到最新,然后去安装对应的 [CUDA Toolkit](https://developer.nvidia.com/cuda-downloads) 和 [cudnn for CUDA11.X](https://developer.nvidia.com/rdp/cudnn-archive)。 安装完成成,按`Win + R`,输入 `cmd`然后回车,在弹出的窗口中输入`nvcc --version`,确认有版本信息显示,类似该图  然后继续输入`nvidia-smi`,确认有输出信息,并且能看到cuda版本号,类似该图  然后执行 `python testcuda.py`,如果提示成功,说明安装正确,否则请仔细检查重新安装 默认使用 cpu 运算,如果确定使用英伟达显卡,并且配置好了cuda环境,请修改 set.ini 中 `devtype=cpu`为 `devtype=cuda`,并重新启动,可使用cuda加速 # 注意事项 0. 如果没有英伟达显卡或未配置好CUDA环境
Excerpt of 5,175 characters
Read on GitHubokmyworld
93
2
2
1
1
1
1
Thiago Ramos
1
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:a4c67162b1f51094, topic:speech-recognition, topic:stt, topic:speech-to-text