登录 注册
AI 应用与 AI AgentAI 模型与开发框架图像、视频与音频 aiassistantlanguage-modelmachine-learningpythonspeech
13,675
Stars
1,689
Forks
81
Watchers
68
Open Issues
Apache-2.0
许可证
Python
语言
2024-08-07
创建时间
2026-11-10
最近更新

项目能做什么

基于开源模型构建语音智能体(Voice Agent)的开发库。
来源:AI 基于仓库事实生成 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
<div align="center">
  <div>&nbsp;</div>
  <img src="https://raw.githubusercontent.com/huggingface/speech-to-speech/main/logo.png" width="600"/>

# Speech To Speech: Build voice agents with open-source models

<p>
  <a href="https://trendshift.io/repositories/20645"><img src="https://img.shields.io/badge/GitHub%20Trending-%231%20Repository%20of%20the%20Day-7B2CBF?logo=github&amp;logoColor=white&amp;style=for-the-badge" alt="GitHub Trending: #1 Repository of the Day"></a>
</p>

[![PyPI](https://img.shields.io/pypi/v/speech-to-speech)](https://pypi.org/project/speech-to-speech/)
[![Python](https://img.shields.io/pypi/pyversions/speech-to-speech)](https://pypi.org/project/speech-to-speech/)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](./LICENSE)

</div>

A low-latency voice agent built from open models that **runs entirely on your computer**. One command starts a conversation: no API key, no cloud service.

The default pipeline is **Silero VAD → Parakeet TDT → Qwen3.5-4B → Qwen3-TTS**, and every stage is swappable. The server speaks the **OpenAI Realtime protocol** over WebSocket and WebRTC, so apps built for OpenAI's Realtime API can point at your own machine instead.

This pipeline runs in production as the conversation backend for thousands of [Reachy Mini](https://huggingface.co/blog/reachy-mini) robots.

<p align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="./docs/assets/endpoint-swap-dark.gif">
    <source media="(prefers-color-scheme: light)" srcset="./docs/assets/endpoint-swap-light.gif">
    <img src="./docs/assets/endpoint-swap-light.gif" alt="Switching an OpenAI Realtime client endpoint from hosted OpenAI to a self-hosted speech-to-speech server" width="640">
  </picture>
</p>

## Quickstart

Use CPython 3.11–3.14 (3.11 recommended):

```bash
python3 -m venv .venv
source .venv/bin/activate
pip install speech-to-speech
speech-to-speech local
```

Then talk: speak, pause, and the assistant answers through your speakers. Stop with `Ctrl+C`. The first run downloads the models, so give it a few minutes. On speakers, add `--echo-cancellation` so the assistant does not hear itself and you can still interrupt it by voice; headphones don't need it. See [echo cancellation](docs/echo-cancellation.md) for requirements and limits.

By default, `local` and `talk` show final user transcripts and streaming assistant
replies once, hiding backend transcript copies, routine logs, tool details, and protocol
events. User messages are yellow and assistant replies are green in a color-capable
terminal. Startup shows `Loading models…`, followed by `Ready — start speaking.` once
the audio devices are running and the session is configured. Routine model-loading
output is hidden; startup failures show their diagnostics. Runtime warnings and errors
remain visible.

For diagnostic output, add `--verbose`:

```bash
speech-to-speech local --verbose
```

Use `--verbose --log_level debug` for more detailed local l
阅读完整原文

商业机会分析 AI 生成

垂直场景实时AI口语陪练SaaS

产品构想基于该项目沉淀的语音到语音管道,构建面向特定考试(如雅思/托福)或特定人群的外语口语实战演练应用,强调低延迟对话与实时发音纠正
核心功能实时流式语音对话、自然打断(Barge-in)、语法与发音即时反馈、场景化对话脚本库、学习进度报告
目标用户外语学习者、留学备考人员、职场口语提升人群
难度/周期中等 · 4-6周 · 成本:GPU云服务器租用费用、ASR/TTS开源模型微调算力费、基础域名与云资源(前期约$150-$400/月)
收费模式免费试用+按月/季订阅制、口语模考单次包
竞争风险开源端到端延迟若控制不当(>1秒)会严重破坏体验;现有大厂同类App竞争激烈
依据 AI推测

开发者专属低延迟Voice Agent云服务网关

产品构想将复杂的STT->LLM->TTS流式交互封装为极简的WebRTC/WebSocket API,为无力维护复杂语音链路的中小开发者提供按量计费的中间件云服务
核心功能统一WebRTC接入端点、智能VAD(语音活动检测)与自动打断处理、主流开源模型即开即用(如Whisper、Llama、CosyVoice等)、用量统计与控制台
目标用户独立开发者、独立独立开发团队、中小型AI应用工作室
难度/周期中等偏高 · 6-8周 · 成本:高并发GPU推理实例(如A10G/L4)、网络高带宽费用(前期约$400-$800/月)
收费模式按对话时长计费($/分钟)、开发者按月席位费
竞争风险音视频流媒体高并发运维门槛较高,GPU闲置率控制不当容易导致亏损
依据 数据支持的判断

企业级离线/私有化语音对话一体机与实施服务

产品构想为对数据隐私敏感的机构(如银行内部客服、政企展厅、医疗问答)提供基于本地算力的软硬件一体或纯软件私有化语音交互系统交付
核心功能完全断网离线运行、企业知识库RAG整合、定制唤醒词与专属角色音色、可视化管理后台与权限控制
目标用户政企客户、医疗机构、保密单位、展厅与智能硬件集成商
难度/周期中等 · 8-12周 · 成本:本地工控机/小型GPU工作站采购测试成本、差旅与实施费用(约$1000-$2000初始投入)
收费模式项目制软件授权费 + 硬件差价 + 年度维保服务费
竞争风险B端交付周期长、决策链条复杂,对离线小参数模型的交互效果要求极高
依据 尚需验证的假设
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

项目中文简介Stars语言
morluto/rea 中文介绍暂未生成
Reverse engineer anything with agents, from app behavior dow
449,472 TypeScript
openclaw/openclaw 中文介绍暂未生成
The AI that really does things. Any OS. Any Platform. The lo
394,300 TypeScript
obra/superpowers 中文介绍暂未生成
An agentic skills framework & software development methodolo
315,625 Shell
NousResearch/hermes-agent 中文介绍暂未生成
The agent that grows with you
262,391 Python
n8n-io/n8n 中文介绍暂未生成
Fair-code workflow automation platform with native AI capabi
210,010 TypeScript
firecrawl/firecrawl 中文介绍暂未生成
Supercharge your AI agents with data from the web and beyond
200,445 TypeScript
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。

项目优势与风险

技术成熟度创建于 2024-08-07,近 30 天仍在推送,发布过 6 个 Release
社区活跃Star 13,675 / Fork 1,689 / Issue 68(数据支持,可自行核实)
许可证Apache-2.0
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

快速开始(以仓库 README 为准)
git clone https://github.com/huggingface/speech-to-speech.git
cd speech-to-speech
docker compose up -d   # 或参考 README 中的 docker run 命令
阅读原仓库文档
术语说明:Docker=应用容器(把程序和依赖打包运行);API Key=调用外部服务的密钥;Git Clone=把仓库代码下载到本地。常见错误:API Key 未配置 / 端口占用 / 数据库连接失败,多数项目在 README 的 Troubleshooting 章节有说明。