@data-netmonk/mona-chat-widget 2.6.4 → 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 CHANGED
@@ -8,7 +8,7 @@ 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.4`):**
11
+ **Latest Version Changes (`v2.6.5`):**
12
12
 
13
13
  ✅ **Patch Updates:**
14
14
  1. **Voice mode now fully controls TTS playback** - Disabling voice mode clears queued audio and stops active playback cleanly
@@ -139,6 +139,24 @@ Chat widget package developed by Netmonk data & solution team to be imported in
139
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.
140
140
  If your TTS endpoint is called cross-origin, the server must expose those headers with `Access-Control-Expose-Headers`.
141
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
+ ```
142
160
  5. Optional TTS debug logging
143
161
 
144
162
  To inspect TTS queue and playback lifecycle in browser console, set `VITE_DEBUG_TTS=true` in your `.env` file.