ttp-agent-sdk 2.48.14 → 2.48.16
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/dist/agent-widget.dev.js +50 -8
- package/dist/agent-widget.esm.js +1 -1
- package/dist/agent-widget.js +1 -1
- package/dist/audio-processor.js +10 -4
- package/dist/index.html +1 -1
- package/package.json +1 -1
package/dist/audio-processor.js
CHANGED
|
@@ -183,10 +183,16 @@ class AudioProcessor extends AudioWorkletProcessor {
|
|
|
183
183
|
|
|
184
184
|
const currentTime = Date.now();
|
|
185
185
|
|
|
186
|
-
// Effective VAD floor: base threshold scaled by the mic-sensitivity multiplier
|
|
187
|
-
//
|
|
188
|
-
//
|
|
189
|
-
|
|
186
|
+
// Effective VAD floor: base threshold scaled by the mic-sensitivity multiplier —
|
|
187
|
+
// QUADRATIC below 1.0 so the strict end actually bites (0.5 → 0.08 floor, not
|
|
188
|
+
// 0.04: a linear ±6dB band is imperceptible, and browser AGC flattens level
|
|
189
|
+
// differences before we see them). Raised during agent playback (stricter
|
|
190
|
+
// barge-in), lowered while voice is already active (hysteresis, so speech
|
|
191
|
+
// tails aren't clipped).
|
|
192
|
+
const sens = this.micSensitivity;
|
|
193
|
+
let effectiveThreshold = sens >= 1
|
|
194
|
+
? this.silenceThreshold / sens
|
|
195
|
+
: this.silenceThreshold / (sens * sens);
|
|
190
196
|
if (this.playbackActive) effectiveThreshold *= this.PLAYBACK_GATE_FACTOR;
|
|
191
197
|
if (this.isVoiceActive) effectiveThreshold *= this.HYSTERESIS_FACTOR;
|
|
192
198
|
|
package/dist/index.html
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<img src="https://talktopc.com/logo192.png" alt="TTP Logo" style="width: 40px; height: 40px; border-radius: 8px;">
|
|
24
24
|
<div>
|
|
25
25
|
<h1 style="margin: 0; font-size: 1.4rem;">TTP Agent SDK</h1>
|
|
26
|
-
<p class="version" style="margin: 0;">v2.48.
|
|
26
|
+
<p class="version" style="margin: 0;">v2.48.15</p>
|
|
27
27
|
</div>
|
|
28
28
|
</div>
|
|
29
29
|
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ttp-agent-sdk",
|
|
3
|
-
"version": "2.48.
|
|
3
|
+
"version": "2.48.16",
|
|
4
4
|
"description": "Comprehensive Voice Agent SDK with Customizable Widget - Real-time audio, WebSocket communication, React components, and extensive customization options",
|
|
5
5
|
"main": "dist/agent-widget.js",
|
|
6
6
|
"module": "dist/agent-widget.esm.js",
|