Skip to content

pika-online/XSound

Repository files navigation

Xsound: 语音日志服务搭建

Xsound Icon

GitHub Documentation

功能

  • 支持离线文件实时句子生成,支持热词,时间戳,角色,多语言翻译
  • 引入 paraformer-onnx-gpu (parajet,2000x速度) 大幅提升推理速度
  • 基于生成生产-消费者范式构建 模型并发吞吐引擎
  • 基于fastapi & 异步设计,支持多路并发请求

安装

  1. create conda env
conda create -n xsound python=3.10
conda activate xsound
  1. install faster whisper (先装!!!因为其依赖onnxruntime-cpu会覆盖gpu版本)
pip install faster-whisper
  1. install onnxruntime-gpu
conda install -c nvidia cuda-runtime=12.4 cudnn=9.1 -y
pip install --force-reinstall onnxruntime-gpu==1.22
  1. install necessary packages
pip install -r xsound/requirements.txt

使用

服务端设计(暂不开放)

  • server.py 用户登录,语音转写接口设计
  • database.py 用户数据库设计

启动服务

uvicorn server:app --host 0.0.0.0 --port 9031

客户端转写请参考:

  • client.sh 通用http接口
  • client.py 实时流式返回结果

About

支持多路并发的语音日志服务搭建

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published