Skip to content

eva 2.0#36

Open
TrajectoryL wants to merge 1 commit into
mainfrom
feat/eva2.0
Open

eva 2.0#36
TrajectoryL wants to merge 1 commit into
mainfrom
feat/eva2.0

Conversation

@TrajectoryL
Copy link
Copy Markdown

This commit introduces a major upgrade to the Python SDK, establishing parity between WebSocket and WebRTC (LiveKit) transports, alongside immediate architectural and bug fixes.

Key Features & Enhancements:

  • feat: Added eva_ws_client.py for lightweight WebSocket transport.
  • feat: Introduced TaskFSM for client-side task state coordination and edge-command routing.
  • feat: Integrated VOSK-based background WakeWordRunner for hands-free activation.
  • refactor: Extracted common audio buffer, state machine, and RTVI logic into shared.py.
  • fix: Corrected audio channel output truncation in stereo scenarios.
  • fix: Eliminated thread-safety deadlocks by releasing FSM locks prior to invoking external callbacks.
  • perf: Improved wake word detection to zero-latency using threading.Event instead of sleep polling.
  • refactor: Decoupled livekit making it a truly optional dependency for WS-only deployments.
  • refactor: Exposed auto_switch_confidence_threshold as a configurable initialization parameter.

…skFSM, WS/WebRTC parity)

This commit introduces a major upgrade to the Python SDK, establishing parity between
WebSocket and WebRTC (LiveKit) transports, alongside immediate architectural and
bug fixes.

Key Features & Enhancements:
- feat: Added `eva_ws_client.py` for lightweight WebSocket transport.
- feat: Introduced `TaskFSM` for client-side task state coordination and edge-command routing.
- feat: Integrated VOSK-based background `WakeWordRunner` for hands-free activation.
- refactor: Extracted common audio buffer, state machine, and RTVI logic into `shared.py`.
- fix: Corrected audio channel output truncation in stereo scenarios.
- fix: Eliminated thread-safety deadlocks by releasing FSM locks prior to invoking external callbacks.
- perf: Improved wake word detection to zero-latency using `threading.Event` instead of sleep polling.
- refactor: Decoupled `livekit` making it a truly optional dependency for WS-only deployments.
- refactor: Exposed `auto_switch_confidence_threshold` as a configurable initialization parameter.
云端作为中央大脑,拥有充足的算力,它持续接收音视频流并统筹复杂的业务逻辑:
1. **全局 VAD 与 ASR:** 判断用户何时说话结束,并将音频转为文本。
2. **意图理解与业务流转:** 执行复杂的工作流并响应用户请求。
3. **任务调度大权:** 云端是状态流转的最终决策者。它评估边端发来的切换建议,只有当云端根据上下文下发了 `TaskSwitchResult (approved=True)` 时,边端才会真正切入新的交互任务。
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.

端侧是状态决定者

self.mic_index = self._find_device_index(mic_index, input=True)
self.spk_index = self._find_device_index(spk_index, input=False)
# Resolve audio device indices using shared function
self.mic_index = find_audio_device_index(self.pa, mic_index, is_input=True)
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.

代码风格

Comment thread clients/python-common-sdk/eva_client.py
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