@vapi-ai/web 1.0.206 → 1.0.208

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
@@ -67,6 +67,10 @@ vapi.on('call-start', () => {
67
67
  vapi.on('call-end', () => {
68
68
  console.log('Call has stopped');
69
69
  });
70
+
71
+ vapi.on('error', (e) => {
72
+ console.error(e)
73
+ });
70
74
  ```
71
75
 
72
76
  These events allow you to react to changes in the state of the call or speech.
package/dist/vapi.js CHANGED
@@ -108,9 +108,17 @@ class Vapi extends events_1.default {
108
108
  yield this.call.join({ url, subscribeToTracksAutomatically: false });
109
109
  this.call.startRemoteParticipantsAudioLevelObserver();
110
110
  this.call.on("remote-participants-audio-level", (e) => this.handleRemoteParticipantsAudioLevel(e));
111
+ this.call.updateInputSettings({
112
+ audio: {
113
+ processor: {
114
+ type: "noise-cancellation",
115
+ },
116
+ },
117
+ });
111
118
  }))
112
119
  .catch((error) => {
113
120
  console.error(error);
121
+ this.emit("error", error.message);
114
122
  });
115
123
  }
116
124
  handleRemoteParticipantsAudioLevel(e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vapi-ai/web",
3
- "version": "1.0.206",
3
+ "version": "1.0.208",
4
4
  "description": "",
5
5
  "main": "dist/vapi.js",
6
6
  "types": "dist/vapi.d.ts",
package/vapi.ts CHANGED
@@ -109,9 +109,18 @@ export default class Vapi extends EventEmitter {
109
109
  this.call.on("remote-participants-audio-level", (e) =>
110
110
  this.handleRemoteParticipantsAudioLevel(e)
111
111
  );
112
+
113
+ this.call.updateInputSettings({
114
+ audio: {
115
+ processor: {
116
+ type: "noise-cancellation",
117
+ },
118
+ },
119
+ });
112
120
  })
113
121
  .catch((error) => {
114
122
  console.error(error);
123
+ this.emit("error", error.message);
115
124
  });
116
125
  }
117
126