kaldi实现的实时语音转文字
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
old-tom 5076963f2c
feat:提交
3 months ago
.trae/rules feat:提交 3 months ago
models feat:提交 3 months ago
src feat:提交 3 months ago
.gitignore feat:提交 3 months ago
.python-version feat:提交 3 months ago
README.md feat:提交 3 months ago
main.py feat:提交 3 months ago
pyproject.toml feat:提交 3 months ago

README.md

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

本项目目标是实现实时语音识别功能,支持中英文。 实现思路如下:

  1. 语音输入:使用麦克风采集音频数据。
  2. 语音预处理:对音频数据进行预处理,如降噪、增益控制等。
  3. 语音识别:使用语音识别模型将预处理后的音频数据转换为文本。

基础环境

  • 操作系统linux
  • 语言python 3.12
  • 虚拟环境及包管理工具uv
  • 语音识别框架新一代kaldi
  • 语音识别模型zipformer
  • 部署框架sherpa-onnx

目录层级说明

.
├── .venv
│   ├── bin
│   ├── lib
│   └── pyvenv.cfg
├── .python-version
├── docs
├── src
│   └── main.py
├── config
├── tests
├── static
├── README.md
├── hello.py
├── pyproject.toml
└── uv.lock
  • docs 存放项目文档
  • src 存放项目源码
  • config 存放项目配置文件
  • tests 存放单元测试代码
  • static 目录下存放静态文件如图片、css、js等
  • README.md 项目说明文件
  • pyproject.toml 项目配置文件
  • uv.lock 虚拟环境依赖文件

除main.py外其他文件均需要放置在src子目录下要求子目录名称清晰易读不能过长。

包管理命令说明

  1. 添加包 uv add
  2. 移除包 uv remove
  3. 所有包管理命令均需要在项目根目录下执行并且强制使用uv命令不能使用pip命令。

脚本运行命令说明

  1. 运行项目 uv run main.py
  2. 运行单元测试 uv run -m pytest tests

禁止修改本文件