New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

web-speech-cognitive-services

Package Overview
Dependencies
Maintainers
1
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web-speech-cognitive-services - npm Package Compare versions

Comparing version

to
5.0.2-master.f0db5a5

1

CHANGELOG.md

@@ -42,2 +42,3 @@ # Changelog

- `credentials` option is added for obtaining authorization token and region, or subscription key and region, in a single object or function call, by [@compulim](https://github.com/compulim) in PR [#80](https://github.com/compulim/web-speech-cognitive-services/pull/80)
- Speech recognition: Polyfill will have `abort`/`stop` function set to `undefined` if the underlying recognizer from Cognitive Services SDK does not support stop/abort, in PR [#81](https://github.com/compulim/web-speech-cognitive-services/pull/81)

@@ -44,0 +45,0 @@ ### Changed

2

lib/BingSpeech/SpeechToText/createSpeechRecognitionPonyfill.js

@@ -46,3 +46,3 @@ "use strict";

var VERSION = "5.0.2-master.e85a10c";
var VERSION = "5.0.2-master.f0db5a5";

@@ -49,0 +49,0 @@ function buildSpeechResult(transcript, confidence, isFinal) {

@@ -67,4 +67,4 @@ "use strict";

meta.setAttribute('name', 'web-speech-cognitive-services');
meta.setAttribute('content', "version=".concat("5.0.2-master.e85a10c"));
meta.setAttribute('content', "version=".concat("5.0.2-master.f0db5a5"));
document.head.appendChild(meta);
//# sourceMappingURL=SpeechServices.js.map

@@ -217,5 +217,2 @@ "use strict";

}, {
key: "abort",
value: function abort() {}
}, {
key: "start",

@@ -363,13 +360,17 @@ value: function start() {

case 20:
this.abort = function () {
return queue.push({
abort: {}
});
};
if (recognizer.stopContinuousRecognitionAsync) {
this.abort = function () {
return queue.push({
abort: {}
});
};
this.stop = function () {
return queue.push({
stop: {}
});
};
this.stop = function () {
return queue.push({
stop: {}
});
};
} else {
this.abort = this.stop = undefined;
}

@@ -456,5 +457,7 @@ finalizedResults = [];

stopping = 'stop';
}
} // Abort should not be dispatched without support of "stopContinuousRecognitionAsync".
// But for defensive purpose, we make sure "stopContinuousRecognitionAsync" is available before we can call.
if (!abort) {
if (!(abort && recognizer.stopContinuousRecognitionAsync)) {
_context.next = 20;

@@ -581,3 +584,3 @@ break;

if (_this3.continuous) {
if (!(!_this3.continuous && recognizer.stopContinuousRecognitionAsync)) {
_context.next = 57;

@@ -621,26 +624,26 @@ break;

case 25:
case 24:
if (!(!stopping || audioStarted)) {
_context2.next = 33;
_context2.next = 32;
break;
}
return _context2.delegateYield(_loop(loop), "t0", 27);
return _context2.delegateYield(_loop(loop), "t0", 26);
case 27:
case 26:
_ret = _context2.t0;
if (!(_ret === "break")) {
_context2.next = 30;
_context2.next = 29;
break;
}
return _context2.abrupt("break", 33);
return _context2.abrupt("break", 32);
case 30:
case 29:
loop++;
_context2.next = 25;
_context2.next = 24;
break;
case 33:
case 32:
if (speechStarted) {

@@ -677,7 +680,7 @@ this.dispatchEvent(new SpeechRecognitionEvent('speechend'));

detachAudioConfigEvent();
_context2.next = 45;
_context2.next = 44;
break;
case 41:
_context2.prev = 41;
case 40:
_context2.prev = 40;
_context2.t1 = _context2["catch"](4);

@@ -688,9 +691,9 @@ // Logging out the erorr because Speech SDK would fail silently.

case 45:
_context2.prev = 45;
case 44:
_context2.prev = 44;
unprepare();
recognizer.dispose();
return _context2.finish(45);
return _context2.finish(44);
case 49:
case 48:
case "end":

@@ -700,3 +703,3 @@ return _context2.stop();

}
}, _callee, this, [[4, 41, 45, 49]]);
}, _callee, this, [[4, 40, 44, 48]]);
}));

@@ -711,5 +714,2 @@

}, {
key: "stop",
value: function stop() {}
}, {
key: "continuous",

@@ -716,0 +716,0 @@ get: function get() {

{
"name": "web-speech-cognitive-services",
"version": "5.0.2-master.e85a10c",
"version": "5.0.2-master.f0db5a5",
"description": "Polyfill Web Speech API with Cognitive Services Speech-to-Text service",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display