uneeq-js 2.50.1 → 2.52.0

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.
@@ -8,6 +8,7 @@ export interface SpeechHandlerOptions {
8
8
  messages: Subject<any>;
9
9
  assetBasePath?: string;
10
10
  hintPhrases: string;
11
+ hintPhrasesBoost?: number;
11
12
  locales: string;
12
13
  jwtToken: string;
13
14
  chatMetadata: ChatMetadata;
@@ -6,4 +6,5 @@ export interface SpeechRecognitionStartMessage {
6
6
  interimResults: boolean;
7
7
  lang: string;
8
8
  phrases: string;
9
+ phraseBoost: number;
9
10
  }
@@ -84,9 +84,14 @@ export interface UneeqOptions {
84
84
  assetBasePath?: string;
85
85
  /**
86
86
  * Speech Recognition Hint Phrases
87
- * A space separated list of phrases the speech recognition system should expect.
87
+ * A comma separated list of phrases the speech recognition system should expect.
88
88
  */
89
89
  speechRecognitionHintPhrases?: string;
90
+ /**
91
+ * Speech Recognition Hint Phrases Boost
92
+ * An integer number between 0 and 20 that can be used to boost the hint phrases likely hood to match.
93
+ */
94
+ speechRecognitionHintPhrasesBoost?: number;
90
95
  /**
91
96
  * Custom Metadata
92
97
  * A stringified value that will be sent to BYO NLPs with all chat calls like playWelcomeMessage and sendTranscript requests.
package/dist/umd/index.js CHANGED
@@ -4073,6 +4073,7 @@ class Uneeq {
4073
4073
  assetBasePath: this.options.assetBasePath,
4074
4074
  locales: this.options.speechToTextLocales || '',
4075
4075
  hintPhrases: this.options.speechRecognitionHintPhrases || '',
4076
+ hintPhrasesBoost: this.options.speechRecognitionHintPhrasesBoost,
4076
4077
  jwtToken: token,
4077
4078
  chatMetadata: this.chatMetadata,
4078
4079
  enableVad: this.options.enableVad
@@ -13315,7 +13316,7 @@ exports.race = race;
13315
13316
  /***/ ((module) => {
13316
13317
 
13317
13318
  "use strict";
13318
- module.exports = JSON.parse('{"name":"uneeq-js","version":"2.50.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"}}');
13319
+ module.exports = JSON.parse('{"name":"uneeq-js","version":"2.52.0","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"}}');
13319
13320
 
13320
13321
  /***/ }),
13321
13322
  /* 242 */
@@ -51315,6 +51316,11 @@ class SpeechHandler {
51315
51316
  return false;
51316
51317
  }
51317
51318
  resume() {
51319
+ // If VAD is disabled and the digital human is speaking, stop the digital human from speaking when push to talk is engaged.
51320
+ if (!this.options.enableVad && this.digitalHumanSpeaking) {
51321
+ this.options.api.stopSpeaking();
51322
+ this.digitalHumanSpeaking = false;
51323
+ }
51318
51324
  this.storedTranscription = undefined;
51319
51325
  if (this.stream && this.micVad) {
51320
51326
  this.stream.getTracks().forEach((track) => track.enabled = true);
@@ -51483,7 +51489,8 @@ class SpeechHandler {
51483
51489
  sampleRate: audioSampleRate,
51484
51490
  interimResults: true,
51485
51491
  lang: this.options.locales,
51486
- phrases: this.options.hintPhrases
51492
+ phrases: this.options.hintPhrases,
51493
+ phraseBoost: this.options.hintPhrasesBoost || 0,
51487
51494
  };
51488
51495
  this.wsSend(JSON.stringify(startMsg));
51489
51496
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uneeq-js",
3
- "version": "2.50.1",
3
+ "version": "2.52.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/src/index.d.ts",
package/readme.md CHANGED
@@ -8,6 +8,12 @@ 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.52.0
12
+ * Stop the digital human from speaking when engaging push to talk.
13
+
14
+ #### 2.51.0
15
+ * Added speechRecognitionHintPhrasesBoost to allow implementers to boost the chance of hint phrase words matching.
16
+
11
17
  #### 2.50.1
12
18
  * Fixed an edge case that caused speech to not be sent when using enableVad = false.
13
19