返回模型
说明文档
VocRT - 个人实时语音转语音 AI 解决方案
https://vocrt.vercel.app
VocRT 是一个全面的、隐私优先的实时语音转语音 (V2V) 解决方案,支持与 AI 进行自然对话。VocRT 采用最先进的 TTS 模型、RAG 能力和无缝集成,能够处理您的语音输入并实时响应高质量的合成语音。
🚀 核心特性
实时语音处理
- 超低延迟语音转语音转换
- 使用 Kokoro-82M 模型实现高质量语音合成
- 可自定义语音选择,提供多种语音选项
- 可调节阈值和静音时长,优化用户体验
高级 RAG 能力
- 多格式文档支持:PDF、CSV、TXT、PPT、PPTX、DOC、DOCX、XLS、XLSX
- URL 内容提取:处理网页、Medium 博客和在线 PDF
- 无限制文档上传,无使用限制或计费顾虑
- 100% 隐私优先,本地处理
隐私与成本优势
- 无 API 使用限制或 recurring charges
- 完全数据隐私 - 所有处理均在本地进行
- 离线能力 如果资源允许,可使用本地 LLM 模型
- 不与外部 AI 服务共享数据
🏗️ 架构概览
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ React Client │◄──►│ Express Server │◄──►│ VocRT Engine │
│ (Frontend) │ │ (Backend) │ │ (Python) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
|
|
_______________________|
│ │
▼ ▼
┌──────────────────┐ ┌─────────────────┐
│ Embeddings │ │ Whisper STT │
│ (e5-base-v2) │ │ Kokoro TTS │
│ Qdrant DB │ │ │
│ (Vector Store) │ └─────────────────┘
└──────────────────┘
📁 仓库结构
VocRT/
├── backend/ # Express.js 服务器
├── frontend/ # React 客户端应用
├── models/ # AI 模型目录
├── voices/ # 可用语音配置
├── demo/ # 示例音频和演示文件
├── .env # 环境配置
├── requirements.txt # Python 依赖
└── README.md # 项目文档
🛠️ 手动安装
前置条件
- Python 3.10(必需)
- Node.js 16+ 和 npm
- Docker(用于 Qdrant 向量数据库)
- Git 用于克隆仓库
步骤 1:克隆仓库
git clone https://huggingface.co/anuragsingh922/VocRT
cd VocRT
步骤 2:Python 环境设置
macOS/Linux:
python3.10 -m venv venv
source venv/bin/activate
Windows:
python3.10 -m venv venv
venv\Scripts\activate
步骤 3:安装 Python 依赖
pip install -r requirements.txt
如果安装失败(例如由于依赖或 PyTorch 问题),请尝试以下恢复步骤:
pip install --upgrade pip setuptools wheel
pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
pip install -r requirements.txt
步骤 4:安装 eSpeak
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install espeak
macOS:
# 如果尚未安装 Homebrew
/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"
# 安装 eSpeak
brew install espeak
Windows:
- 从 eSpeak 官方网站下载
- 运行安装程序并按照说明操作
- 将安装路径添加到系统 PATH 环境变量
- 验证安装:
espeak --version
验证:
espeak \"VocRT installation successful!\"
步骤 5:后端设置
cd backend
npm install
npm run dev
步骤 6:前端设置
cd frontend
npm install
npm run dev
步骤 7:Qdrant 向量数据库设置
# 拉取 Qdrant 镜像
docker pull qdrant/qdrant
# 启动 Qdrant 容器
docker run -p 6333:6333 -p 6334:6334 \
-v \"$(pwd)/qdrant_storage:/qdrant/storage:z\" \
qdrant/qdrant
访问地址:
- REST API: http://localhost:6333
- Web 控制台: http://localhost:6333/dashboard
- gRPC API: http://localhost:6334
步骤 8:下载所需模型
嵌入模型:
将 e5-base-v2 克隆到 models/e5-base-v2

Whisper STT 模型:
选择您偏好的 Whisper 模型大小:
✅ 只需在 app.py 中指定模型名称 — 它将自动下载并加载。
- tiny:最快,准确度较低
- base:性能平衡
- small:更好的准确度
- medium/large:最高准确度,处理速度较慢

步骤 9:环境配置
编辑 .env 文件,填入您的 API 凭证:
# LLM 配置
OPENAI_API_KEY=your_openai_api_key_here
GEMINI_API_KEY=your_gemini_api_key_here
LLM_PROVIDER=google # 或 'google' 使用 Gemini
LLM_MODEL=gemini-2.0-flash # 或您偏好的模型
步骤 10:启动 VocRT 服务器
python3 app.py
🎯 使用指南
- 访问应用:打开 http://localhost:3000
- 选择语音配置:从可用语音选项中选择
- 配置设置:调整静音时长以获得最佳性能
- 添加上下文:上传文档、提供 URL 或输入文本作为 AI 上下文
- 开始对话:开始说话,享受实时语音响应
📊 支持的文档格式
| 格式 | 扩展名 | 描述 |
|---|---|---|
.pdf |
便携式文档格式 | |
| 文本 | .txt |
纯文本文件 |
| Word | .doc, .docx |
Microsoft Word 文档 |
| Excel | .xls, .xlsx |
Microsoft Excel 电子表格 |
| PowerPoint | .ppt, .pptx |
Microsoft PowerPoint 演示文稿 |
| CSV | .csv |
逗号分隔值 |
| URLs | 网页链接 | 在线内容、博客、PDF |
🤖 AI 模型与技术栈
核心模型
- TTS:Kokoro-82M - 高质量文本转语音
- STT:OpenAI Whisper - 精准语音识别
- 嵌入:e5-base-v2 - 语义文本理解
- LLM:OpenAI GPT / Google Gemini - 自然语言处理
技术栈
- 后端:Python、Express.js、gRPC
- 前端:React、Vite
- 数据库:Qdrant(向量数据库)
- 音频处理:Whisper、eSpeak、phonemizer
🔧 性能优化
硬件建议
- CPU:多核处理器(推荐 4 核以上)
- 内存:4GB+ 以获得最佳性能
- 存储:SSD 以加快模型加载速度
- GPU:可选,用于加速推理,可减少高达 60% 的延迟
配置技巧
- 调整静音时长以实现自然的对话流畅度
- 使用较小的 Whisper 模型以加快 STT 处理速度
- 如果可用,启用 GPU 加速
🤝 贡献
我们欢迎社区贡献!以下是您可以提供帮助的方式:
贡献方式
- 🐛 Bug 报告:提交包含详细复现步骤的问题
- 💡 功能请求:建议新功能和改进
- 📝 文档:改进指南、教程和 API 文档
- 🔧 代码贡献:提交带有增强功能的 Pull Request
开发环境设置
- Fork 本仓库
- 创建功能分支:
git checkout -b feature/amazing-feature - 提交更改:
git commit -m 'Add amazing feature' - 推送到分支:
git push origin feature/amazing-feature - 打开 Pull Request
📄 许可证
本项目采用 MIT 许可证授权
🙏 致谢
特别感谢以下优秀的开源社区:
- Hugging Face - 托管和维护 AI 模型
- Kokoro-82M 团队 - 卓越的 TTS 模型
- OpenAI Whisper - 革命性的语音识别
- Qdrant - 高性能向量数据库
- React 和 Node.js 社区
📞 支持与联系
📞 网站
- VocRT: https://vocrt.vercel.app
⭐ 如果 VocRT 对您的项目有帮助,请考虑给个 Star!
用 ❤️ 为开源社区构建
anuragsingh922/VocRT
作者 anuragsingh922
↓ 13
♥ 5
创建时间: 2025-01-28 07:05:25+00:00
更新时间: 2025-06-03 04:01:43+00:00
在 Hugging Face 上查看文件 (183)
.DS_Store
.env
.gitattributes
.gitignore
README.md
__pycache__/chat_database.cpython-310.pyc
__pycache__/istftnet.cpython-310.pyc
__pycache__/kokoro.cpython-310.pyc
__pycache__/models.cpython-310.pyc
__pycache__/plbert.cpython-310.pyc
__pycache__/text_to_speech_pb2.cpython-310.pyc
__pycache__/text_to_speech_pb2_grpc.cpython-310.pyc
app.py
app2.py
app_old.py
backend/.DS_Store
backend/app.js
backend/controller/chat.js
backend/controller/file.js
backend/controller/prompt.js
backend/handle-realtime-tts/cleangRPCconnections.js
backend/handle-realtime-tts/makegRPCconnection.js
backend/handle-realtime-tts/sttModelSocket.js
backend/handle-realtime-tts/sttModelSocket_whisper.js
backend/handle-realtime-tts/text_to_speech.proto
backend/handle-realtime-tts/text_to_speech_whisper.proto
backend/package-lock.json
backend/package.json
backend/providers/updateChathistory.js
backend/routes/chat.routes.js
backend/routes/prompt.routes.js
backend/routes/rag.routes.js
backend/utils/session.js
chat_database.py
chat_history.pkl
config.json
demo/HEARME.txt
demo/HEARME.wav
demo/TTS-Spaces-Arena-25-Dec-2024.png
demo/af_sky.txt
demo/af_sky.wav
demo/restoring-sky.md
embeddings.py
fastAPI.py
faster-whiper.py
fp16/halve.py
fp16/kokoro-v0_19-half.pth
frontend/.DS_Store
frontend/.env
frontend/bun.lockb
frontend/components.json
frontend/eslint.config.js
frontend/index.html
frontend/package-lock.json
frontend/package.json
frontend/postcss.config.js
frontend/public/favicon.ico
frontend/public/placeholder.svg
frontend/public/robots.txt
frontend/public/vocrt-512x512.png
frontend/public/vocrt.png
frontend/src/App.css
frontend/src/App.tsx
frontend/src/api/apiClient.ts
frontend/src/api/authApi.ts
frontend/src/assets/mic-animation.json
frontend/src/components/ChatInterface.tsx
frontend/src/components/ChatSidebar.tsx
frontend/src/components/ControlPanel.tsx
frontend/src/components/Footer.tsx
frontend/src/components/LottieMicAnimation.tsx
frontend/src/components/Messages.tsx
frontend/src/components/VoiceChat.tsx
frontend/src/components/VoiceVisualizer.tsx
frontend/src/components/ui/accordion.tsx
frontend/src/components/ui/alert-dialog.tsx
frontend/src/components/ui/alert.tsx
frontend/src/components/ui/aspect-ratio.tsx
frontend/src/components/ui/avatar.tsx
frontend/src/components/ui/badge.tsx
frontend/src/components/ui/breadcrumb.tsx
frontend/src/components/ui/button.tsx
frontend/src/components/ui/calendar.tsx
frontend/src/components/ui/card.tsx
frontend/src/components/ui/carousel.tsx
frontend/src/components/ui/chart.tsx
frontend/src/components/ui/checkbox.tsx
frontend/src/components/ui/collapsible.tsx
frontend/src/components/ui/command.tsx
frontend/src/components/ui/context-menu.tsx
frontend/src/components/ui/dialog.tsx
frontend/src/components/ui/drawer.tsx
frontend/src/components/ui/dropdown-menu.tsx
frontend/src/components/ui/form.tsx
frontend/src/components/ui/hover-card.tsx
frontend/src/components/ui/input-otp.tsx
frontend/src/components/ui/input.tsx
frontend/src/components/ui/label.tsx
frontend/src/components/ui/menubar.tsx
frontend/src/components/ui/navigation-menu.tsx
frontend/src/components/ui/pagination.tsx
frontend/src/components/ui/popover.tsx
frontend/src/components/ui/progress.tsx
frontend/src/components/ui/radio-group.tsx
frontend/src/components/ui/resizable.tsx
frontend/src/components/ui/scroll-area.tsx
frontend/src/components/ui/select.tsx
frontend/src/components/ui/separator.tsx
frontend/src/components/ui/sheet.tsx
frontend/src/components/ui/sidebar.tsx
frontend/src/components/ui/skeleton.tsx
frontend/src/components/ui/slider.tsx
frontend/src/components/ui/sonner.tsx
frontend/src/components/ui/switch.tsx
frontend/src/components/ui/table.tsx
frontend/src/components/ui/tabs.tsx
frontend/src/components/ui/textarea.tsx
frontend/src/components/ui/toast.tsx
frontend/src/components/ui/toaster.tsx
frontend/src/components/ui/toggle-group.tsx
frontend/src/components/ui/toggle.tsx
frontend/src/components/ui/tooltip.tsx
frontend/src/components/ui/use-toast.ts
frontend/src/hooks/FetchData.tsx
frontend/src/hooks/use-mobile.tsx
frontend/src/hooks/use-toast.ts
frontend/src/index.css
frontend/src/lib/utils.ts
frontend/src/main.tsx
frontend/src/pages/Index.tsx
frontend/src/pages/Landing.tsx
frontend/src/pages/NotFound.tsx
frontend/src/redux/hooks.ts
frontend/src/redux/slices/authSlice.ts
frontend/src/redux/slices/chatSlice.ts
frontend/src/redux/slices/chatsSlice.ts
frontend/src/redux/slices/sessionSlice.ts
frontend/src/redux/slices/settingsSlice.ts
frontend/src/redux/slices/themeSlice.ts
frontend/src/redux/store.ts
frontend/src/vite-env.d.ts
frontend/src/worklets/pcm-worklet.js
frontend/tailwind.config.ts
frontend/tsconfig.app.json
frontend/tsconfig.json
frontend/tsconfig.node.json
frontend/vite.config.ts
generated/text_to_speech_pb2.py
generated/text_to_speech_pb2_grpc.py
image-3.png
image.png
istftnet.py
kokoro-v0_19.onnx
ONNX
kokoro-v0_19.pth
kokoro.py
models.py
output.wav
output2.wav
plbert.py
prompts.py
protos/text_to_speech.proto
providers/audio_provider.py
providers/chunk_provider.py
providers/filler_words.py
providers/llm_provider.py
providers/ppt_and_docx_helper.py
qdrent.py
rag_database.pkl
rag_database.py
requirements.txt
text_to_speech_pb2.py
text_to_speech_pb2_grpc.py
voices/af.pt
voices/af_bella.pt
voices/af_nicole.pt
voices/af_sarah.pt
voices/af_sky.pt
voices/am_adam.pt
voices/am_michael.pt
voices/bf_emma.pt
voices/bf_isabella.pt
voices/bm_george.pt
voices/bm_lewis.pt