speech-to-speech
Operate and troubleshoot Hugging Face speech-to-speech, a modular VAD, STT, LLM, and TTS voice-agent pipeline with an OpenAI Realtime-compatible API and browser demo.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- speech-to-speech
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Operate and troubleshoot Hugging Face speech-to-speech, a modular VAD, STT, LLM, and TTS voice-agent pipeline with an OpenAI Realtime-compatible API and browser demo.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/install-and-runtime.md4.0 KB
- 参考文档references/repo-provenance.md3.8 KB
- 参考文档references/repo-routing-metadata.json512 B
- 参考文档references/troubleshooting.md3.8 KB
- 脚本scripts/package_smoke.py1.3 KB
03 SKILL.md 正文
speech-to-speech repo skill
Use this skill for package-specific tasks involving the speech-to-speech
Python package: starting its CLI, wiring a voice-agent backend, using its
OpenAI Realtime-compatible WebSocket/WebRTC API, choosing STT/LLM/TTS backends,
or running/modifying the browser demo.
First decisions
- Install or inspect package/runtime basics: read
Install and runtime. The package is
distributed as
speech-to-speech, imports asspeech_to_speech, requires Python 3.10+, and exposes thespeech-to-speechconsole command. - Start or connect from the CLI: route to cli-and-server.
- Build a WebSocket/WebRTC or OpenAI Realtime client: route to realtime-api.
- Choose or debug VAD/STT/LLM/TTS backends, language, prompts, tools, direct audio input, or benchmarks: route to components-and-backends.
- Run, deploy, or edit the browser demo: route to browser-demo.
- Diagnose cross-cutting package/runtime issues: read Troubleshooting, then route to the nearest sub-skill for workflow-specific fixes.
Common task routes
| User asks for... | Use |
|---|---|
speech-to-speech serve, talk, local, host/port, VAD flags, Smart Turn, session pool, or LLM proxy command shape |
cli-and-server |
Realtime events, session.update, response.create, tool result flow, barge-in/cancel, endpoint probes, /v1/realtime, /v1/realtime/calls |
realtime-api |
Backend names, optional extras, Qwen3-TTS, Parakeet/Whisper/Paraformer, responses-api vs chat-completions, --stt none, language prompt |
components-and-backends |
Demo server, SPEECH_TO_SPEECH_URL, LOAD_BALANCER_URL, WebSocket vs WebRTC in browser, Serper search, camera tool, HF Space limits, UI design rules |
browser-demo |
| Source freshness, evidence baseline, router metadata | Repo provenance and routing metadata |
Minimal install and smoke
pip install speech-to-speech
python -c "import speech_to_speech; print(speech_to_speech.__version__)"
speech-to-speech --help
Default quickstart:
export OPENAI_API_KEY="..."
speech-to-speech serve
# second terminal
speech-to-speech talk --url ws://127.0.0.1:8765/v1/realtime
The default server listens on loopback at ws://127.0.0.1:8765/v1/realtime
and uses Parakeet TDT STT, an OpenAI-compatible Responses API LLM, and Qwen3-TTS.
Safety and verification notes
- Keep
servebound to127.0.0.1unless a trusted network or gateway is in place.--enable_llm_proxyadds unauthenticated OpenAI-compatible HTTP proxy routes and should not be exposed casually. - Optional backends may require extra packages, CUDA/MPS runtime support, model downloads, audio devices, or provider credentials. Do not claim full model inference was verified from import/CLI checks alone.
- For safe local inspection, this skill bundles helper scripts that avoid model
downloads:
scripts/package_smoke.py,cli-and-server/scripts/check_cli_profiles.py,components-and-backends/scripts/inspect_backend_registry.py, andrealtime-api/scripts/realtime_endpoint_probe.py. - Do not rely on deprecated archive implementations or removed legacy transport flags. Use the current command family and registered backend names.
Source baseline
This skill was distilled from huggingface/speech-to-speech at commit
0071d7d0be64d77f7c66db410781109d5a2bf5b7, branch main, package version
0.2.12. See Repo provenance for evidence
paths and refresh signals.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).