@vapi-ai/web 1.0.242 → 1.0.244

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 (3) hide show
  1. package/dist/vapi.js +1 -2
  2. package/package.json +1 -1
  3. package/vapi.ts +1 -3
package/dist/vapi.js CHANGED
@@ -175,9 +175,8 @@ class Vapi extends VapiEventEmitter {
175
175
  const speechLevel = Object.values(e.participantsAudioLevel).reduce((a, b) => a + b, 0);
176
176
  this.averageSpeechLevel =
177
177
  this.averageSpeechLevel * 0.95 + speechLevel * 0.05;
178
- this.speechLevel = this.speechLevel * 0.8 + speechLevel * 0.2;
178
+ this.speechLevel = this.speechLevel * 0.92 + speechLevel * 0.08;
179
179
  this.emit("volume-level", Math.min(1, speechLevel / 0.15));
180
- console.log(this.averageSpeechLevel, this.speechLevel);
181
180
  const hasStartedSpeaking = this.speechLevel > this.averageSpeechLevel * 1.5;
182
181
  const hasStoppedSpeaking = this.speechLevel < this.averageSpeechLevel * 0.5;
183
182
  if (!this.isSpeaking && hasStartedSpeaking) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vapi-ai/web",
3
- "version": "1.0.242",
3
+ "version": "1.0.244",
4
4
  "description": "",
5
5
  "main": "dist/vapi.js",
6
6
  "types": "dist/vapi.d.ts",
package/vapi.ts CHANGED
@@ -215,12 +215,10 @@ export default class Vapi extends VapiEventEmitter {
215
215
  );
216
216
  this.averageSpeechLevel =
217
217
  this.averageSpeechLevel * 0.95 + speechLevel * 0.05;
218
- this.speechLevel = this.speechLevel * 0.8 + speechLevel * 0.2;
218
+ this.speechLevel = this.speechLevel * 0.92 + speechLevel * 0.08;
219
219
 
220
220
  this.emit("volume-level", Math.min(1, speechLevel / 0.15));
221
221
 
222
- console.log(this.averageSpeechLevel, this.speechLevel);
223
-
224
222
  const hasStartedSpeaking = this.speechLevel > this.averageSpeechLevel * 1.5;
225
223
  const hasStoppedSpeaking = this.speechLevel < this.averageSpeechLevel * 0.5;
226
224