@vapi-ai/web 1.0.217 → 1.0.219
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/vapi.js +1 -1
- package/package.json +1 -1
- package/vapi.ts +1 -1
package/dist/vapi.js
CHANGED
|
@@ -148,7 +148,7 @@ class Vapi extends VapiEventEmitter {
|
|
|
148
148
|
}
|
|
149
149
|
handleRemoteParticipantsAudioLevel(e) {
|
|
150
150
|
const speechLevel = Object.values(e.participantsAudioLevel).reduce((a, b) => a + b, 0);
|
|
151
|
-
this.emit("volume-level", speechLevel);
|
|
151
|
+
this.emit("volume-level", Math.min(1, speechLevel / 0.15));
|
|
152
152
|
const isSpeaking = speechLevel > 0.1;
|
|
153
153
|
if (!isSpeaking)
|
|
154
154
|
return;
|
package/package.json
CHANGED
package/vapi.ts
CHANGED
|
@@ -185,7 +185,7 @@ export default class Vapi extends VapiEventEmitter {
|
|
|
185
185
|
(a, b) => a + b,
|
|
186
186
|
0
|
|
187
187
|
);
|
|
188
|
-
this.emit("volume-level", speechLevel);
|
|
188
|
+
this.emit("volume-level", Math.min(1, speechLevel / 0.15));
|
|
189
189
|
|
|
190
190
|
const isSpeaking = speechLevel > 0.1;
|
|
191
191
|
if (!isSpeaking) return;
|