uneeq-js 2.48.0 → 2.48.1
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.js +1 -1
- package/dist/src/service/speech-handler.d.ts +1 -0
- package/dist/umd/index.js +20 -3
- package/package.json +1 -1
- package/readme.md +3 -0
package/dist/umd/index.js
CHANGED
|
@@ -3828,9 +3828,20 @@ class Uneeq {
|
|
|
3828
3828
|
* @param enable Defaults to true
|
|
3829
3829
|
*/
|
|
3830
3830
|
enableMicrophone(enable = true) {
|
|
3831
|
-
if (this.
|
|
3831
|
+
if (this.speechHandler) {
|
|
3832
|
+
if (enable) {
|
|
3833
|
+
this.speechHandler.startRecognition();
|
|
3834
|
+
}
|
|
3835
|
+
else {
|
|
3836
|
+
this.speechHandler.stopRecognition();
|
|
3837
|
+
}
|
|
3838
|
+
}
|
|
3839
|
+
else if (this.deviceManager) {
|
|
3832
3840
|
this.deviceManager.enableLocalDevices(this.options.sendLocalVideo, enable);
|
|
3833
3841
|
}
|
|
3842
|
+
else {
|
|
3843
|
+
logger_1.logger.error('UneeQ: Cannot enable microphone, session is in an invalid state.');
|
|
3844
|
+
}
|
|
3834
3845
|
}
|
|
3835
3846
|
/**
|
|
3836
3847
|
* Enable or disable the users camera
|
|
@@ -13299,7 +13310,7 @@ exports.race = race;
|
|
|
13299
13310
|
/***/ ((module) => {
|
|
13300
13311
|
|
|
13301
13312
|
"use strict";
|
|
13302
|
-
module.exports = JSON.parse('{"name":"uneeq-js","version":"2.48.
|
|
13313
|
+
module.exports = JSON.parse('{"name":"uneeq-js","version":"2.48.1","description":"","main":"dist/index.js","types":"dist/src/index.d.ts","scripts":{"start":"npx webpack -w","test-local":"npx karma start karma.conf.js -logLevel=DEBUG","test":"npx karma start --browsers ChromeHeadless --single-run","test:windows":"karma start karma.conf.js","build":"webpack --config webpack.config.prod.js && webpack --config webpack.config.umd.js","lint":"npx tslint -p tsconfig.json --fix","docs":"npx typedoc --options"},"files":["dist","!dist/test"],"author":"","license":"ISC","dependencies":{"@stomp/stompjs":"^6.0.0","@uehreka/seriously":"^1.0.1","fast-text-encoding":"^1.0.0","intrinsic-scale":"^3.0.4","onnxruntime-web":"^1.15.1","promjs":"^0.4.1","ring-buffer-ts":"^1.2.0","rxjs":"^7.8.1","rxjs-compat":"^6.6.7","simple-peer":"^9.11.1","webrtc-adapter":"^8.2.3"},"devDependencies":{"@types/dom-mediacapture-record":"^1.0.16","@types/jasmine":"^2.8.8","@types/node":"^10.9.4","fetch-mock":"7.7.3","ignore-styles":"^5.0.1","jasmine":"^5.1.0","jasmine-core":"^5.1.0","karma":"^6.4.2","karma-chrome-launcher":"^3.2.0","karma-firefox-launcher":"^2.1.2","karma-jasmine":"^5.1.0","karma-jasmine-html-reporter":"^2.1.0","karma-requirejs":"^1.1.0","karma-typescript":"^5.5.4","karma-typescript-es6-transform":"^5.5.4","nock":"^9.6.1","requirejs":"^2.3.6","ts-loader":"^9.4.4","ts-node":"^7.0.1","tslint":"^5.11.0","tslint-no-focused-test":"^0.5.0","typedoc":"^0.18.0","typescript":"^5.1.6","webpack":"^5.88.2","webpack-cli":"^5.1.4"}}');
|
|
13303
13314
|
|
|
13304
13315
|
/***/ }),
|
|
13305
13316
|
/* 242 */
|
|
@@ -51267,9 +51278,11 @@ class SpeechHandler {
|
|
|
51267
51278
|
this.options.assetBasePath = this.options.assetBasePath || defaultAssetPath;
|
|
51268
51279
|
this.loadSavedAudioHeaders();
|
|
51269
51280
|
this.loadScripts();
|
|
51270
|
-
this.initWebsocket(this.options);
|
|
51271
51281
|
this.handleAppMessages();
|
|
51272
51282
|
}
|
|
51283
|
+
startRecognition() {
|
|
51284
|
+
this.initWebsocket(this.options);
|
|
51285
|
+
}
|
|
51273
51286
|
stopRecognition() {
|
|
51274
51287
|
if (this.mediaRecorder) {
|
|
51275
51288
|
this.mediaRecorder.stop();
|
|
@@ -51348,6 +51361,10 @@ class SpeechHandler {
|
|
|
51348
51361
|
});
|
|
51349
51362
|
}
|
|
51350
51363
|
initWebsocket(options) {
|
|
51364
|
+
if (this.ws && this.ws.readyState === WebSocket.OPEN) {
|
|
51365
|
+
this.ws.close();
|
|
51366
|
+
this.stopRecognition();
|
|
51367
|
+
}
|
|
51351
51368
|
let connectionUrl = options.apiUrl.replace('https://', 'wss://');
|
|
51352
51369
|
connectionUrl += `/speech-recognition/ws/recognize?jwt=${options.jwtToken}&session_id=${options.sessionId}`;
|
|
51353
51370
|
logger_1.logger.log(this.logPrefix + 'Initializing speech recognition websocket to ' + connectionUrl);
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -8,6 +8,9 @@ https://docs.uneeq.io/build-your-own-experience
|
|
|
8
8
|
To use uneeq-js with a typescript version < 3.8, 'skipLibCheck' must be set to true.
|
|
9
9
|
|
|
10
10
|
## Release Notes
|
|
11
|
+
#### 2.48.1
|
|
12
|
+
* Speech Recognition: This feature will no longer auto enable the microphone on session start. Instead developers should call enableMicrophone(true) themselves when they want to allow the user to use speech recognition. Note, this will prompt the user for microphone access permissions if they have not given it already.
|
|
13
|
+
|
|
11
14
|
#### 2.48.0
|
|
12
15
|
* Add client and custom metadata that is sent during chats with a digital human. Developers can specify anything they wish in the custom metadata using the new function setCustomChatMetadata.
|
|
13
16
|
|