@unith-ai/core-client 2.0.64 → 2.0.65
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/index.d.ts +1 -0
- package/dist/lib.js +6 -0
- package/dist/lib.js.map +1 -1
- package/dist/lib.module.js +6 -0
- package/dist/lib.module.js.map +1 -1
- package/dist/lib.web.js +6 -0
- package/dist/lib.web.js.map +1 -1
- package/package.json +1 -1
package/dist/lib.module.js
CHANGED
|
@@ -24121,6 +24121,12 @@ var Conversation = class Conversation {
|
|
|
24121
24121
|
this.options.onStatusChange({ status });
|
|
24122
24122
|
}
|
|
24123
24123
|
}
|
|
24124
|
+
async generateSpeechRecognitionToken() {
|
|
24125
|
+
if (this.options.microphoneProvider === "custom") {
|
|
24126
|
+
const response = await this.user.getAsrToken("elevenlabs");
|
|
24127
|
+
this.options.onSpeechRecognitionToken(response.token);
|
|
24128
|
+
} else throw new Error("Speech recognition token generation is only applicable for custom microphone provider.");
|
|
24129
|
+
}
|
|
24124
24130
|
/**
|
|
24125
24131
|
* To stop streaming response, we'll send a stop message to the BE. The BE will then stop sending audio and video frames, which will naturally end the response. This is more efficient and leads to a better user experience as it allows for a smoother transition when stopping the response.
|
|
24126
24132
|
*
|