dsh-live-voice 0.2.3 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/CHANGELOG.md +35 -1
  2. package/DEVELOPMENT.md +13 -0
  3. package/LICENSE +201 -674
  4. package/PLAN.md +34 -0
  5. package/README.md +68 -108
  6. package/docs/ARCHITECTURE.md +33 -0
  7. package/docs/CHOOSING-AN-ENGINE.md +120 -0
  8. package/docs/CONFIGURATION.md +149 -0
  9. package/docs/REVIEW.md +35 -0
  10. package/docs/VOICE-LIFECYCLE.md +59 -0
  11. package/lib/client.js +3608 -1695
  12. package/lib/server.js +641 -453
  13. package/package.json +17 -7
  14. package/scripts/build.ts +7 -3
  15. package/scripts/preview-ui.ts +1 -1
  16. package/src/app/AGENTS.md +7 -0
  17. package/src/app/ARCHITECTURE.md +10 -0
  18. package/src/{client/index.ts → app/client/apply.tsx} +152 -59
  19. package/src/app/client/i18n/DshLanguageBoundary.tsx +42 -0
  20. package/src/app/client/i18n/catalogs/base.ts +232 -0
  21. package/src/app/client/i18n/catalogs/en.ts +259 -0
  22. package/src/app/client/i18n/catalogs/es.ts +280 -0
  23. package/src/app/client/i18n/catalogs/fr.ts +282 -0
  24. package/src/app/client/i18n/catalogs/hi.ts +264 -0
  25. package/src/app/client/i18n/catalogs/index.ts +18 -0
  26. package/src/app/client/i18n/catalogs/pt-BR.ts +271 -0
  27. package/src/app/client/i18n/catalogs/zh.ts +249 -0
  28. package/src/app/client/i18n/index.ts +4 -0
  29. package/src/app/client/i18n/registerDshLocales.ts +43 -0
  30. package/src/app/client/i18n/runtime.tsx +58 -0
  31. package/src/app/client/index.ts +3 -0
  32. package/src/app/client/registerSlots.tsx +30 -0
  33. package/src/app/client/slotDefinitions.ts +32 -0
  34. package/src/app/server/apply.ts +479 -0
  35. package/src/app/server/index.ts +2 -0
  36. package/src/app/server/registerRoutes.ts +11 -0
  37. package/src/modules/AGENTS.md +5 -0
  38. package/src/modules/conversation/ARCHITECTURE.md +5 -0
  39. package/src/modules/conversation/components/ConversationControls.tsx +40 -0
  40. package/src/modules/conversation/components/ConversationStatusBar.tsx +155 -0
  41. package/src/modules/conversation/components/DeliveryModeButton.tsx +43 -0
  42. package/src/modules/conversation/components/MicrophoneButton.tsx +6 -0
  43. package/src/modules/conversation/components/PlaybackControls.tsx +41 -0
  44. package/src/modules/conversation/components/SpeakButton.tsx +30 -0
  45. package/src/modules/conversation/components/Waveform.tsx +68 -0
  46. package/src/modules/conversation/components/conversationStatus.ts +17 -0
  47. package/src/modules/conversation/components/createConversationComponents.tsx +505 -0
  48. package/src/modules/conversation/components/index.ts +8 -0
  49. package/src/modules/conversation/hooks/index.ts +2 -0
  50. package/src/modules/conversation/hooks/useConversationActions.ts +27 -0
  51. package/src/modules/conversation/hooks/useConversationController.ts +15 -0
  52. package/src/modules/conversation/index.ts +3 -0
  53. package/src/{client → modules/conversation/models}/chat.ts +2 -1
  54. package/src/modules/conversation/models/index.ts +1 -0
  55. package/src/modules/core/ARCHITECTURE.md +5 -0
  56. package/src/{core → modules/core}/coordinator.ts +133 -7
  57. package/src/modules/core/index.ts +6 -0
  58. package/src/{engines/qwen-http-host.ts → modules/core/qwen/QwenHttpHost.ts} +3 -3
  59. package/src/modules/core/qwen/QwenSettings.tsx +148 -0
  60. package/src/{core → modules/core}/settings.ts +23 -0
  61. package/src/modules/recognition/ARCHITECTURE.md +5 -0
  62. package/src/modules/recognition/components/RecognitionCapabilityStatus.tsx +19 -0
  63. package/src/{engines/recognition/qwen-http.ts → modules/recognition/engines/qwen/QwenRecognitionEngine.ts} +1 -1
  64. package/src/{engines/recognition/whisper-http.ts → modules/recognition/engines/whisper/WhisperRecognitionEngine.ts} +1 -1
  65. package/src/modules/recognition/engines/whisper/WhisperSettings.tsx +150 -0
  66. package/src/modules/recognition/index.ts +4 -0
  67. package/src/modules/recognition/qwen/QwenRecognitionSettings.tsx +4 -0
  68. package/src/modules/settings/ARCHITECTURE.md +5 -0
  69. package/src/modules/settings/components/LiveVoiceSettings.tsx +80 -0
  70. package/src/modules/settings/components/SettingsHeader.tsx +49 -0
  71. package/src/modules/settings/components/VersionBadges.tsx +39 -0
  72. package/src/modules/settings/components/createLiveVoiceSettings.tsx +8 -0
  73. package/src/modules/settings/components/index.ts +4 -0
  74. package/src/modules/settings/hooks/index.ts +3 -0
  75. package/src/modules/settings/hooks/useAudioDevices.ts +38 -0
  76. package/src/modules/settings/hooks/useLiveVoiceSettings.ts +4 -0
  77. package/src/modules/settings/hooks/useReleaseStatus.ts +17 -0
  78. package/src/modules/settings/index.ts +4 -0
  79. package/src/modules/settings/models/index.ts +1 -0
  80. package/src/modules/settings/models/settingsStorage.ts +14 -0
  81. package/src/modules/settings/sections/conversation/ConversationDelaySettings.tsx +24 -0
  82. package/src/modules/settings/sections/conversation/ConversationSettingsSection.tsx +29 -0
  83. package/src/modules/settings/sections/conversation/DeliverySettings.tsx +38 -0
  84. package/src/modules/settings/sections/conversation/HoldToTalkSettings.tsx +20 -0
  85. package/src/modules/settings/sections/conversation/VoiceModeSettings.tsx +31 -0
  86. package/src/modules/settings/sections/conversation/index.ts +5 -0
  87. package/src/modules/settings/sections/index.ts +3 -0
  88. package/src/modules/settings/sections/recognition/RecognitionEngineSettings.tsx +109 -0
  89. package/src/modules/settings/sections/recognition/RecognitionFilterSettings.tsx +33 -0
  90. package/src/modules/settings/sections/recognition/RecognitionSettingsSection.tsx +24 -0
  91. package/src/modules/settings/sections/recognition/RecognitionStatus.tsx +19 -0
  92. package/src/modules/settings/sections/recognition/SilenceDetectionSettings.tsx +58 -0
  93. package/src/modules/settings/sections/recognition/VoiceCommandSettings.tsx +41 -0
  94. package/src/modules/settings/sections/recognition/index.ts +5 -0
  95. package/src/modules/settings/sections/speak/OutputFilterSettings.tsx +39 -0
  96. package/src/modules/settings/sections/speak/PlaybackPolicySettings.tsx +26 -0
  97. package/src/modules/settings/sections/speak/SpeakSettingsSection.tsx +20 -0
  98. package/src/modules/settings/sections/speak/SpeechAdvancedSettings.tsx +81 -0
  99. package/src/modules/settings/sections/speak/SpeechEngineSettings.tsx +80 -0
  100. package/src/modules/settings/sections/speak/index.ts +4 -0
  101. package/src/{client → modules/settings/services}/releases.ts +1 -1
  102. package/src/modules/speak/ARCHITECTURE.md +5 -0
  103. package/src/modules/speak/engines/audio/HostAudioEngine.ts +167 -0
  104. package/src/modules/speak/engines/audio/M4aAacTranscoder.ts +58 -0
  105. package/src/modules/speak/engines/qwen/QwenSpeakingEngine.ts +14 -0
  106. package/src/{engines/speaking/say.ts → modules/speak/engines/say/SaySpeakingEngine.ts} +26 -4
  107. package/src/modules/speak/index.ts +5 -0
  108. package/src/modules/speak/qwen/QwenSpeakingSettings.tsx +4 -0
  109. package/src/modules/speak/services/speechQueue.ts +2 -0
  110. package/src/server.ts +9 -365
  111. package/src/shared/ARCHITECTURE.md +5 -0
  112. package/src/shared/design-system/buttons/IconButton.tsx +33 -0
  113. package/src/shared/design-system/buttons/PillButton.tsx +11 -0
  114. package/src/shared/design-system/buttons/ToggleButton.tsx +6 -0
  115. package/src/shared/design-system/buttons/index.ts +3 -0
  116. package/src/shared/design-system/feedback/ErrorMessage.tsx +27 -0
  117. package/src/shared/design-system/feedback/StatusBadge.tsx +9 -0
  118. package/src/shared/design-system/feedback/StatusMessage.tsx +4 -0
  119. package/src/shared/design-system/feedback/index.ts +3 -0
  120. package/src/shared/design-system/forms/CheckboxField.tsx +20 -0
  121. package/src/shared/design-system/forms/NumberField.tsx +12 -0
  122. package/src/shared/design-system/forms/SelectField.tsx +20 -0
  123. package/src/shared/design-system/forms/TextAreaField.tsx +12 -0
  124. package/src/shared/design-system/forms/TextField.tsx +12 -0
  125. package/src/shared/design-system/forms/index.ts +5 -0
  126. package/src/shared/design-system/icons/Icon.tsx +20 -0
  127. package/src/shared/design-system/icons/icons.ts +20 -0
  128. package/src/shared/design-system/icons/index.ts +2 -0
  129. package/src/shared/design-system/index.ts +5 -0
  130. package/src/shared/design-system/layout/SettingsCard.tsx +9 -0
  131. package/src/shared/design-system/layout/SettingsSection.tsx +9 -0
  132. package/src/shared/design-system/layout/SettingsSubcard.tsx +26 -0
  133. package/src/shared/design-system/layout/SettingsTabs.tsx +56 -0
  134. package/src/shared/design-system/layout/index.ts +4 -0
  135. package/src/{client/styles.ts → styles/index.ts} +2 -2
  136. package/src/client/components.ts +0 -1189
  137. package/src/client/qwen-settings.ts +0 -144
  138. package/src/client/whisper-settings.ts +0 -147
  139. package/src/engines/speaking/qwen-http.ts +0 -124
  140. /package/src/{core → modules/core}/filters.ts +0 -0
  141. /package/src/{core → modules/core}/microphone.ts +0 -0
  142. /package/src/{core → modules/core}/ownership.ts +0 -0
  143. /package/src/{core → modules/core}/transcript.ts +0 -0
  144. /package/src/{engines/recognition/browser.ts → modules/recognition/engines/browser/BrowserRecognitionEngine.ts} +0 -0
  145. /package/src/{engines/recognition/whisper-http-host.ts → modules/recognition/engines/whisper/whisperRecognitionHost.ts} +0 -0
  146. /package/src/{engines/speaking/browser.ts → modules/speak/engines/browser/BrowserSpeakingEngine.ts} +0 -0
  147. /package/src/{engines/speaking/say-client.ts → modules/speak/engines/say/sayClient.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,39 @@
2
2
 
3
3
  All notable changes to DSH Live Voice are documented in this file.
4
4
 
5
+ ## [0.3.1] - Unreleased
6
+
7
+ ### Changes
8
+
9
+ - Group the primary speech, recognition, and conversation settings into collapsed General sections, with icons on tabs and subsection headings.
10
+ - Start silence-detection settings collapsed and keep recognition capability status visible outside the General section.
11
+ - Add the General section label to every supported interface language and update accessibility and mounted-component regression coverage.
12
+
13
+ ### Documentation
14
+
15
+ - Split agent guidance and architecture documentation by application, domain module, and shared design-system boundaries.
16
+
17
+ ### Compatibility
18
+
19
+ - Confirm tested compatibility with DeepSeek Harness **0.2.0-rc.2**.
20
+
21
+ ## [0.3.0] - Unreleased
22
+
23
+ ### Features
24
+
25
+ - Add a configurable, session-scoped Live Voice context for agent responses. During an active voice conversation with automatic spoken responses enabled, the agent receives editable guidance that its user-facing response will be spoken aloud.
26
+ - Add an English Live Voice context editor and Restore default action to Speaking settings; interface labels and help remain localized.
27
+ - Standardize host speech as compact AAC/M4A played in the browser: macOS `say` and Qwen synthesize internally to WAV, the DSH host transcodes it before transport, and up to three upcoming segments are synthesized ahead to reduce gaps.
28
+ - Add a configurable pause between consecutive spoken segments, with a 400 ms default for more natural pacing.
29
+ - Add a Next speech control that skips only the current spoken segment, immediately starts the next queued segment, and keeps queued and incoming streaming speech intact.
30
+
31
+ ### Bug Fixes
32
+
33
+ - Preserve spaces and in-progress edits in text settings until the field loses focus, then normalize and save the value.
34
+ - Make automatic Steer delivery use DSH's Ctrl/Cmd+Enter accelerated composer gesture instead of the public normal-submit action, so messages are sent to the running agent rather than silently added to its queue. Add a lifecycle regression for the gesture.
35
+ - Deduplicate voice-context synchronization so the PUT request fires only when the payload actually changes, instead of on every coordinator state update.
36
+ - Prevent automatic assistant speech in speaker mode from overtaking the user's turn. Playback now waits for all pending backend transcriptions to finish and for the automatic-send countdown and delivery attempt to complete, avoiding canceled recognition, discarded transcripts, and interrupted automatic delivery.
37
+
5
38
  ## [0.2.3] - 2026-09-21
6
39
 
7
40
  ### Features
@@ -125,7 +158,8 @@ This release expands conversation control, audio routing, speech filtering, and
125
158
  - Support browser speech synthesis and native macOS `say` output.
126
159
  - Add Live Voice controls, Whisper settings, build and browser-preview scripts, and an initial test suite.
127
160
 
128
- [0.2.3]: https://github.com/victorwads/dsh-live-voice/compare/v0.2.2...HEAD
161
+ [0.3.0]: https://github.com/victorwads/dsh-live-voice/compare/v0.2.3...HEAD
162
+ [0.2.3]: https://github.com/victorwads/dsh-live-voice/compare/v0.2.2...v0.2.3
129
163
  [0.2.2]: https://github.com/victorwads/dsh-live-voice/compare/v0.2.1...v0.2.2
130
164
  [0.2.1]: https://github.com/victorwads/dsh-live-voice/compare/v0.2.0...v0.2.1
131
165
  [0.2.0]: https://github.com/victorwads/dsh-live-voice/compare/v0.1.0...v0.2.0
package/DEVELOPMENT.md CHANGED
@@ -9,6 +9,19 @@ npm run build
9
9
 
10
10
  Implementation, test, and build-script source is TypeScript (`.ts`). `npm run typecheck` compiles the TypeScript project; `npm test` typechecks, builds the browser and host bundles, transpiles the TypeScript tests, then runs them. Tests exercise engines, coordination, transcript edits, RPC, configuration, and UI contracts, but do not record the microphone. `npm run dev` watches the browser and host bundles only; it is not a replacement DSH server.
11
11
 
12
+ ## Component previews
13
+
14
+ [Preview.js](https://previewjs.com/docs/guides/react) runs the plugin UI in isolation from DSH. Install dependencies and start the local preview workspace:
15
+
16
+ ```sh
17
+ npm ci
18
+ npm run preview
19
+ ```
20
+
21
+ The Preview.js component list includes `VoiceBarPreview` and `SettingsScreenPreview` from `__previewjs__/LiveVoicePreviews.tsx`. The voice-bar preview accepts the scenarios `listening`, `processing`, `speaking`, `paused`, and `queued`; its controls update an in-memory controller only. The settings preview uses the same mock controller and the real translation provider. The shared wrapper injects the production plugin CSS plus a small set of DSH-like theme tokens. It never starts microphone capture, speech recognition, speech synthesis, or a DSH server.
22
+
23
+ Preview-only state belongs under `__previewjs__/`; production components must not import it. The next planned preview target is a DevInfo screen that subscribes to the controller snapshot and displays state-machine transitions in real time.
24
+
12
25
  ## Qwen3 HTTP engine contract
13
26
 
14
27
  The plugin can connect to a separately managed Qwen3 speech service on an unauthenticated loopback HTTP base URL. The service lifecycle and weights are deliberately outside this repository. It must expose `GET /health`, `POST /v1/audio/transcriptions`, and `POST /v1/audio/speech`. Standard OpenAI multipart transcription and OminiX-API's JSON/base64 transcription contract are detected automatically. Host configuration is stored at `~/.dsh/dsh-live-voice-qwen.json` with owner-only permissions and rejects non-loopback URLs.