Skip to content

WIP feat(moshi): subtitle Topic bus, TTS gating, and refactoring#93

Open
ChengyuSun wants to merge 2 commits into
GhostInShells:showfrom
ChengyuSun:show
Open

WIP feat(moshi): subtitle Topic bus, TTS gating, and refactoring#93
ChengyuSun wants to merge 2 commits into
GhostInShells:showfrom
ChengyuSun:show

Conversation

@ChengyuSun

Copy link
Copy Markdown

讲课翻章不再抢话

之前 Ghost 讲完第一段立刻翻章,新旧音频重叠。现在 advance_point 会等 TTS 完全播完再推进,确保"说完再走"。

句级字幕通道(代码已就绪,未通)

实现了从 TTS 引擎逐句拿字幕 → Zenoh 跨进程 → 前端显示的完整链路。字幕随语音同步出现,而非整段一起出。

讲课状态追踪

新增 LectureBrain 状态机,讲到哪里、讲了多少、是否暂停,服务端全程可查。

代码重构

moss_in_reflex.py 从 1000+ 行的单文件拆成了 5 个模块,找代码、加功能不再大海捞针。

已知问题

下一步

先修 #24 让讲课跑通,再修 #23 让字幕出来。'

scy added 2 commits June 21, 2026 12:19
…eepseek-v4-pro

Phase 2a/2b implementation + code refactoring:

## Features
- Add SubtitleTopic for cross-process subtitle via Zenoh Topic bus
- Add SubtitleTopicConfig with 3-layer fallback (ConfigStore → mode import → HTTP bypass)
- Extend subtitle_callback signature to (text, is_final, batch_id)
- Add AudioRuntimeTopic gating to advance_point for TTS playback sync
- Add LectureBrain state machine for lecture flow control

## Refactor
- Split moss_in_reflex.py (1052→385 lines) into 5 modules:
  state.py, subtitle.py, channel_commands.py, http_endpoints.py
- moss() function: 592→60 lines pure orchestration

## Chore
- Remove .moss_ws/assets/courses/ from git tracking, add to .gitignore

via claude code
@17Wang 17Wang changed the title feat(moshi): subtitle Topic bus, TTS gating, and refactoring WIP feat(moshi): subtitle Topic bus, TTS gating, and refactoring Jun 22, 2026
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.

1 participant