@data-netmonk/mona-chat-widget 2.6.3 → 2.6.5
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.
- package/README.md +26 -2
- package/dist/index.cjs +56 -56
- package/dist/index.js +8769 -8665
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,9 +8,15 @@ Chat widget package developed by Netmonk data & solution team to be imported in
|
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
**Latest Version Changes (`v2.6.
|
|
11
|
+
**Latest Version Changes (`v2.6.5`):**
|
|
12
12
|
|
|
13
|
-
✅ **
|
|
13
|
+
✅ **Patch Updates:**
|
|
14
|
+
1. **Voice mode now fully controls TTS playback** - Disabling voice mode clears queued audio and stops active playback cleanly
|
|
15
|
+
2. **Library build now resolves phoneme assets correctly** - Avatar viseme images are bundled through module URLs so published packages can load them reliably
|
|
16
|
+
3. **Message rendering is more stable** - Messages now receive deterministic IDs and React keys to avoid collisions during history load and streaming updates
|
|
17
|
+
4. **Streaming flow is more consistent** - Mock responses, webhook responses, and TTS playback now use the same streaming helper to keep text timing aligned
|
|
18
|
+
|
|
19
|
+
✅ **Previous Non-breaking Changes (`v2.6.1`):**
|
|
14
20
|
1. **Built-in voice mode button** - Chat widget now includes a microphone button to toggle voice mode directly from the input area
|
|
15
21
|
2. **Speech-to-text flow for voice mode** - Recorded user audio is sent to the configured `VITE_STT_ENDPOINT`, then the transcription is forwarded as a normal chat message
|
|
16
22
|
3. **Phoneme-driven avatar animation** - The widget can animate Mona's avatar during TTS playback based on phoneme/viseme IDs returned by the backend
|
|
@@ -133,6 +139,24 @@ Chat widget package developed by Netmonk data & solution team to be imported in
|
|
|
133
139
|
The widget expects the TTS response body to contain raw audio binary such as `audio/wav`, and reads lip-sync metadata from `x-tts-visemes-b64`, `x-tts-phonemes-b64`, and `x-tts-phoneme-timeline-b64` response headers.
|
|
134
140
|
If your TTS endpoint is called cross-origin, the server must expose those headers with `Access-Control-Expose-Headers`.
|
|
135
141
|
If your TTS service uses a different header such as `x-api-key`, set `VITE_TTS_API_KEY_HEADER=x-api-key` and leave the prefix empty.
|
|
142
|
+
If you are consuming the published package inside another project, prefer passing these values via the `voiceConfig` prop because the host app `.env` is not injected into an already-built library bundle.
|
|
143
|
+
Example:
|
|
144
|
+
```jsx
|
|
145
|
+
<ChatWidget
|
|
146
|
+
sourceId="source456"
|
|
147
|
+
webhookUrl="https://api.example.com/webhook"
|
|
148
|
+
voiceConfig={{
|
|
149
|
+
sttEndpoint: "https://voice.netmonk-ai.tech/stt",
|
|
150
|
+
sttApiKey: "your-key",
|
|
151
|
+
sttApiKeyHeader: "x-api-key",
|
|
152
|
+
sttApiKeyPrefix: "",
|
|
153
|
+
ttsEndpoint: "https://voice.example.com/tts",
|
|
154
|
+
ttsApiKey: "your-key",
|
|
155
|
+
ttsApiKeyHeader: "Authorization",
|
|
156
|
+
ttsApiKeyPrefix: "Bearer",
|
|
157
|
+
}}
|
|
158
|
+
/>
|
|
159
|
+
```
|
|
136
160
|
5. Optional TTS debug logging
|
|
137
161
|
|
|
138
162
|
To inspect TTS queue and playback lifecycle in browser console, set `VITE_DEBUG_TTS=true` in your `.env` file.
|