dsh-live-voice 0.2.2 → 0.3.0

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 (138) hide show
  1. package/CHANGELOG.md +39 -1
  2. package/DEVELOPMENT.md +13 -0
  3. package/LICENSE +201 -674
  4. package/PLAN.md +28 -0
  5. package/README.md +65 -110
  6. package/docs/ARCHITECTURE.md +40 -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 +3652 -1576
  12. package/lib/server.js +641 -453
  13. package/package.json +17 -6
  14. package/scripts/build.ts +16 -4
  15. package/scripts/preview-ui.ts +1 -1
  16. package/src/{client/index.ts → app/client/apply.tsx} +152 -59
  17. package/src/app/client/i18n/DshLanguageBoundary.tsx +42 -0
  18. package/src/app/client/i18n/catalogs/base.ts +231 -0
  19. package/src/app/client/i18n/catalogs/en.ts +258 -0
  20. package/src/app/client/i18n/catalogs/es.ts +279 -0
  21. package/src/app/client/i18n/catalogs/fr.ts +281 -0
  22. package/src/app/client/i18n/catalogs/hi.ts +263 -0
  23. package/src/app/client/i18n/catalogs/index.ts +18 -0
  24. package/src/app/client/i18n/catalogs/pt-BR.ts +270 -0
  25. package/src/app/client/i18n/catalogs/zh.ts +248 -0
  26. package/src/app/client/i18n/index.ts +4 -0
  27. package/src/app/client/i18n/registerDshLocales.ts +43 -0
  28. package/src/app/client/i18n/runtime.tsx +58 -0
  29. package/src/app/client/index.ts +3 -0
  30. package/src/app/client/registerSlots.tsx +30 -0
  31. package/src/app/client/slotDefinitions.ts +32 -0
  32. package/src/app/server/apply.ts +479 -0
  33. package/src/app/server/index.ts +2 -0
  34. package/src/app/server/registerRoutes.ts +11 -0
  35. package/src/modules/conversation/components/ConversationControls.tsx +40 -0
  36. package/src/modules/conversation/components/ConversationStatusBar.tsx +155 -0
  37. package/src/modules/conversation/components/DeliveryModeButton.tsx +43 -0
  38. package/src/modules/conversation/components/MicrophoneButton.tsx +6 -0
  39. package/src/modules/conversation/components/PlaybackControls.tsx +41 -0
  40. package/src/modules/conversation/components/SpeakButton.tsx +30 -0
  41. package/src/modules/conversation/components/Waveform.tsx +68 -0
  42. package/src/modules/conversation/components/conversationStatus.ts +17 -0
  43. package/src/modules/conversation/components/createConversationComponents.tsx +505 -0
  44. package/src/modules/conversation/components/index.ts +8 -0
  45. package/src/modules/conversation/hooks/index.ts +2 -0
  46. package/src/modules/conversation/hooks/useConversationActions.ts +27 -0
  47. package/src/modules/conversation/hooks/useConversationController.ts +15 -0
  48. package/src/modules/conversation/index.ts +3 -0
  49. package/src/{client → modules/conversation/models}/chat.ts +2 -1
  50. package/src/modules/conversation/models/index.ts +1 -0
  51. package/src/{core → modules/core}/coordinator.ts +133 -7
  52. package/src/modules/core/index.ts +6 -0
  53. package/src/{engines/qwen-http-host.ts → modules/core/qwen/QwenHttpHost.ts} +2 -2
  54. package/src/modules/core/qwen/QwenSettings.tsx +148 -0
  55. package/src/{core → modules/core}/settings.ts +23 -0
  56. package/src/modules/recognition/components/RecognitionCapabilityStatus.tsx +19 -0
  57. package/src/{engines/recognition/qwen-http.ts → modules/recognition/engines/qwen/QwenRecognitionEngine.ts} +1 -1
  58. package/src/{engines/recognition/whisper-http.ts → modules/recognition/engines/whisper/WhisperRecognitionEngine.ts} +1 -1
  59. package/src/modules/recognition/engines/whisper/WhisperSettings.tsx +150 -0
  60. package/src/modules/recognition/index.ts +4 -0
  61. package/src/modules/recognition/qwen/QwenRecognitionSettings.tsx +4 -0
  62. package/src/modules/settings/components/LiveVoiceSettings.tsx +72 -0
  63. package/src/modules/settings/components/SettingsHeader.tsx +49 -0
  64. package/src/modules/settings/components/VersionBadges.tsx +39 -0
  65. package/src/modules/settings/components/createLiveVoiceSettings.tsx +8 -0
  66. package/src/modules/settings/components/index.ts +4 -0
  67. package/src/modules/settings/hooks/index.ts +3 -0
  68. package/src/modules/settings/hooks/useAudioDevices.ts +38 -0
  69. package/src/modules/settings/hooks/useLiveVoiceSettings.ts +4 -0
  70. package/src/modules/settings/hooks/useReleaseStatus.ts +17 -0
  71. package/src/modules/settings/index.ts +4 -0
  72. package/src/modules/settings/models/index.ts +1 -0
  73. package/src/modules/settings/models/settingsStorage.ts +14 -0
  74. package/src/modules/settings/sections/conversation/ConversationDelaySettings.tsx +24 -0
  75. package/src/modules/settings/sections/conversation/ConversationSettingsSection.tsx +23 -0
  76. package/src/modules/settings/sections/conversation/DeliverySettings.tsx +38 -0
  77. package/src/modules/settings/sections/conversation/HoldToTalkSettings.tsx +20 -0
  78. package/src/modules/settings/sections/conversation/VoiceModeSettings.tsx +31 -0
  79. package/src/modules/settings/sections/conversation/index.ts +5 -0
  80. package/src/modules/settings/sections/index.ts +3 -0
  81. package/src/modules/settings/sections/recognition/RecognitionEngineSettings.tsx +109 -0
  82. package/src/modules/settings/sections/recognition/RecognitionFilterSettings.tsx +33 -0
  83. package/src/modules/settings/sections/recognition/RecognitionSettingsSection.tsx +20 -0
  84. package/src/modules/settings/sections/recognition/RecognitionStatus.tsx +19 -0
  85. package/src/modules/settings/sections/recognition/SilenceDetectionSettings.tsx +58 -0
  86. package/src/modules/settings/sections/recognition/VoiceCommandSettings.tsx +41 -0
  87. package/src/modules/settings/sections/recognition/index.ts +5 -0
  88. package/src/modules/settings/sections/speak/OutputFilterSettings.tsx +39 -0
  89. package/src/modules/settings/sections/speak/PlaybackPolicySettings.tsx +26 -0
  90. package/src/modules/settings/sections/speak/SpeakSettingsSection.tsx +16 -0
  91. package/src/modules/settings/sections/speak/SpeechAdvancedSettings.tsx +81 -0
  92. package/src/modules/settings/sections/speak/SpeechEngineSettings.tsx +80 -0
  93. package/src/modules/settings/sections/speak/index.ts +4 -0
  94. package/src/modules/settings/services/releases.ts +117 -0
  95. package/src/modules/speak/engines/audio/HostAudioEngine.ts +167 -0
  96. package/src/modules/speak/engines/audio/M4aAacTranscoder.ts +58 -0
  97. package/src/modules/speak/engines/qwen/QwenSpeakingEngine.ts +14 -0
  98. package/src/{engines/speaking/say.ts → modules/speak/engines/say/SaySpeakingEngine.ts} +26 -4
  99. package/src/modules/speak/index.ts +5 -0
  100. package/src/modules/speak/qwen/QwenSpeakingSettings.tsx +4 -0
  101. package/src/modules/speak/services/speechQueue.ts +2 -0
  102. package/src/server.ts +9 -365
  103. package/src/shared/design-system/buttons/IconButton.tsx +33 -0
  104. package/src/shared/design-system/buttons/PillButton.tsx +11 -0
  105. package/src/shared/design-system/buttons/ToggleButton.tsx +6 -0
  106. package/src/shared/design-system/buttons/index.ts +3 -0
  107. package/src/shared/design-system/feedback/ErrorMessage.tsx +27 -0
  108. package/src/shared/design-system/feedback/StatusBadge.tsx +9 -0
  109. package/src/shared/design-system/feedback/StatusMessage.tsx +4 -0
  110. package/src/shared/design-system/feedback/index.ts +3 -0
  111. package/src/shared/design-system/forms/CheckboxField.tsx +20 -0
  112. package/src/shared/design-system/forms/NumberField.tsx +12 -0
  113. package/src/shared/design-system/forms/SelectField.tsx +20 -0
  114. package/src/shared/design-system/forms/TextAreaField.tsx +12 -0
  115. package/src/shared/design-system/forms/TextField.tsx +12 -0
  116. package/src/shared/design-system/forms/index.ts +5 -0
  117. package/src/shared/design-system/icons/Icon.tsx +20 -0
  118. package/src/shared/design-system/icons/icons.ts +16 -0
  119. package/src/shared/design-system/icons/index.ts +2 -0
  120. package/src/shared/design-system/index.ts +5 -0
  121. package/src/shared/design-system/layout/SettingsCard.tsx +9 -0
  122. package/src/shared/design-system/layout/SettingsSection.tsx +9 -0
  123. package/src/shared/design-system/layout/SettingsSubcard.tsx +14 -0
  124. package/src/shared/design-system/layout/SettingsTabs.tsx +54 -0
  125. package/src/shared/design-system/layout/index.ts +4 -0
  126. package/src/{client/styles.ts → styles/index.ts} +3 -1
  127. package/src/client/components.ts +0 -1080
  128. package/src/client/qwen-settings.ts +0 -144
  129. package/src/client/whisper-settings.ts +0 -147
  130. package/src/engines/speaking/qwen-http.ts +0 -124
  131. /package/src/{core → modules/core}/filters.ts +0 -0
  132. /package/src/{core → modules/core}/microphone.ts +0 -0
  133. /package/src/{core → modules/core}/ownership.ts +0 -0
  134. /package/src/{core → modules/core}/transcript.ts +0 -0
  135. /package/src/{engines/recognition/browser.ts → modules/recognition/engines/browser/BrowserRecognitionEngine.ts} +0 -0
  136. /package/src/{engines/recognition/whisper-http-host.ts → modules/recognition/engines/whisper/whisperRecognitionHost.ts} +0 -0
  137. /package/src/{engines/speaking/browser.ts → modules/speak/engines/browser/BrowserSpeakingEngine.ts} +0 -0
  138. /package/src/{engines/speaking/say-client.ts → modules/speak/engines/say/sayClient.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,42 @@
2
2
 
3
3
  All notable changes to DSH Live Voice are documented in this file.
4
4
 
5
+ ## [0.3.0] - Unreleased
6
+
7
+ ### Features
8
+
9
+ - 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.
10
+ - Add an English Live Voice context editor and Restore default action to Speaking settings; interface labels and help remain localized.
11
+ - 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.
12
+ - Add a configurable pause between consecutive spoken segments, with a 400 ms default for more natural pacing.
13
+ - 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.
14
+
15
+ ### Bug Fixes
16
+
17
+ - Preserve spaces and in-progress edits in text settings until the field loses focus, then normalize and save the value.
18
+ - 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.
19
+ - Deduplicate voice-context synchronization so the PUT request fires only when the payload actually changes, instead of on every coordinator state update.
20
+ - 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.
21
+
22
+ ## [0.2.3] - 2026-09-21
23
+
24
+ ### Features
25
+
26
+ - Add an update notification in Live Voice settings when a newer GitHub release is available. The check runs at most once every 24 hours and the action opens the matching release.
27
+ - Show the installed Live Voice version and the tested DSH version in the settings header.
28
+ - Show Browser WebGPU Inference, sherpa-onnx Streaming, NVIDIA Parakeet, and Voxtral Realtime as disabled upcoming recognition engines.
29
+
30
+ ### Changes
31
+
32
+ - Rename recognition-engine options to describe the API they use: Browser SpeechRecognition, Qwen3 ASR HTTP API, and Whisper HTTP API.
33
+ - Show the expected HTTP URL or transcription route for the selected recognition engine.
34
+
35
+ ### Bug Fixes
36
+
37
+ - Avoid repeated GitHub requests when the release API is unavailable by caching failed checks for the same 24-hour interval.
38
+ - Handle release tags with a leading `v` and prerelease identifiers correctly when deciding whether an update is newer.
39
+ - Ignore unexpected release URLs and fall back to the repository releases page.
40
+
5
41
  ## [0.2.2] - 2026-09-19
6
42
 
7
43
  ### Features
@@ -106,7 +142,9 @@ This release expands conversation control, audio routing, speech filtering, and
106
142
  - Support browser speech synthesis and native macOS `say` output.
107
143
  - Add Live Voice controls, Whisper settings, build and browser-preview scripts, and an initial test suite.
108
144
 
109
- [0.2.2]: https://github.com/victorwads/dsh-live-voice/compare/v0.2.1...HEAD
145
+ [0.3.0]: https://github.com/victorwads/dsh-live-voice/compare/v0.2.3...HEAD
146
+ [0.2.3]: https://github.com/victorwads/dsh-live-voice/compare/v0.2.2...v0.2.3
147
+ [0.2.2]: https://github.com/victorwads/dsh-live-voice/compare/v0.2.1...v0.2.2
110
148
  [0.2.1]: https://github.com/victorwads/dsh-live-voice/compare/v0.2.0...v0.2.1
111
149
  [0.2.0]: https://github.com/victorwads/dsh-live-voice/compare/v0.1.0...v0.2.0
112
150
  [0.1.0]: https://github.com/victorwads/dsh-live-voice/compare/v0.0.2...v0.1.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.