Skip to content

feat(voice): wire composed voice into gateway and prewarm TTS - #326

Merged
gac0812 merged 4 commits into
1024XEngineer:mainfrom
yyy-router:feature/composed-voice-gateway-wiring
Aug 20, 2026
Merged

feat(voice): wire composed voice into gateway and prewarm TTS#326
gac0812 merged 4 commits into
1024XEngineer:mainfrom
yyy-router:feature/composed-voice-gateway-wiring

Conversation

@yyy-router

Copy link
Copy Markdown
Contributor

Part of #312

把组合式语音接入网关并做 TTS 预热(依赖 #319 的组合式编排器):

  • composition.pybuild_composed_voice_agent 组合根,装配 ASR + LLM + TTS + Agent
  • composed_audio.pyComposedAgentAudioSink 网关适配器(consume / interrupt / close_session)
  • ports.py:新增 AudioSessionLifecycle 会话生命周期契约
  • voice_stream.py:新流触发 interrupt、断连触发 close_session
  • main.pyTIMEFLOW_VOICE_AGENT_MODE=2 分派到组合式 agent,移除原 mode-2 的 RuntimeError 占位
  • pipeline.py + qwen_audio_tts.pyspeech_expected 提前建立 TTS 连接,WebSocket 握手与分词并行
  • settings.py:VAD 阈值 0.0 → 0.6,抑制背景噪声误触发

@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.04950% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ckend/src/timeflow/intelligence/speech/pipeline.py 83.33% 1 Missing and 2 partials ⚠️
backend/src/timeflow/composition.py 96.87% 1 Missing ⚠️
...flow/infrastructure/external/tts/qwen_audio_tts.py 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the fixed 6a896276a1950546c0f2e1b6b26f82cc73ec4085...945e2e408a37d5fe3e9af2ea3106ab8bc2a1b52f diff across composition-root wiring, gateway lifecycle hooks, speech/TTS prewarming, settings, and associated tests. I found no actionable correctness, reliability, security, or compatibility regressions meeting the review threshold.

Validation: python3 -m compileall -q backend/src backend/tests and git diff --check passed. The focused pytest suite could not run because pytest and uv are not installed in the workspace.

@gac0812 gac0812 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@gac0812
gac0812 merged commit f76a85a into 1024XEngineer:main Aug 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants