WayneYu430/dsh-voice-plugin--packages-ui-voice0

@wayneyu430227/dsh-client-ui-voice

语音配置文件的浏览器麦克风与语音播放控制客户端插件

AI 分析

提供浏览器端的语音采集与播放控制界面,通过 WebSocket 与后端保持连接。适合需要通过网页端进行实时语音输入与收听的 DSH 用户。

包名
@wayneyu430227/dsh-client-ui-voice
版本
0.1.0
最近更新
2026年8月24日

安装

此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗

@wayneyu430227/dsh-client-ui-voice

English | 中文

Browser conversation surface for the voice profile. The microphone button creates and opens a fresh ordinary, ungrouped Session at the current Workspace or Session directory before attaching Voice Mode. Keeping Voice sources outside Workspace membership prevents the standard New Session flow from reusing their plugin-only logs as blank text conversations; the plugin history owns their Voice-specific discovery. A root-owned /voice WebSocket keeps capture and playback alive when the user visits a delegated task. Capture starts only after the server's ready frame confirms the provider session and audio settings. The package captures echo-cancelled audio, resamples it to 16 kHz PCM, schedules returned 24 kHz PCM, and stops queued playback immediately when a new transcription starts. A provider error or terminal close releases the WebSocket, microphone tracks, playback sources, and audio contexts.

Durable ASR and TTS utterances render as chat messages with a Voice badge. Each live ASR update replaces the prior interim caption, while TTS deltas append to the open assistant utterance until its durable terminal event arrives. Each delegated task renders as a compact status card whose button opens the independent DSH task Session after that Session appears in the client list.

After a Voice transport opens successfully, the plugin records its source Session in a browser-local history index. The Voice history action at the sidebar foot lists those still present in the ordinary Session catalog, marks the active conversation, and opens a saved Session without adding Voice fields to Host projections or Workspace rows. The Session log remains the durable transcript; the index stores only Session ids and local recency.

Model Experience

Voice transcript and delegation controls

What the model sees

The browser package contributes zero model-visible text. It projects Host-authored voice/utterance-*, voice/task-delegated, and voice/task-observation events; the Voice assistant and task Agent own what enters their model contexts.

Token effect

The browser package adds zero tokens directly.

KV Cache effect

Browser controls do not modify or reorder model context. Switching to a delegated task changes only the selected UI Session; the active voice transport remains bound to its source Session.

Known Limitations and Deferred Work

  • Capture uses an AudioWorkletNode; browsers without AudioWorklet support cannot start voice mode.
  • Live transcript updates are transient. Refresh reconstructs completed or interrupted utterances from the durable Session log.
  • The Voice history index is local to one browser profile. Clearing site data or using another browser removes the filtered index but does not delete the underlying DSH Sessions.
  • An unexpected socket loss enters the explicit retry state; retry within the Host reconnect grace resumes the same provider conversation, while Stop final-closes it.
  • This package targets the dsh Web UI: its browser bundle externalizes the platform module table and loads through window.__ModuleLoader__, so it depends on the dsh web runtime rather than being a framework-agnostic client plugin.