@poovit-banton/speech-recognition-sdk 1.0.8 → 1.0.9
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/lib/speech-recognition-sdk.cjs.js +10 -10
- package/dist/lib/speech-recognition-sdk.cjs.js.map +1 -1
- package/dist/lib/speech-recognition-sdk.es.js +137 -136
- package/dist/lib/speech-recognition-sdk.es.js.map +1 -1
- package/dist/lib/speech-recognition-sdk.umd.js +1 -1
- package/dist/lib/speech-recognition-sdk.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -93,10 +93,10 @@ function Ed() {
|
|
|
93
93
|
return l.Date.now();
|
|
94
94
|
};
|
|
95
95
|
function f(b, U, L) {
|
|
96
|
-
var y, g,
|
|
96
|
+
var y, g, x, Z, F, J, H = 0, R = !1, B = !1, _ = !0;
|
|
97
97
|
if (typeof b != "function")
|
|
98
98
|
throw new TypeError(A);
|
|
99
|
-
U = S(U) || 0, v(L) && (R = !!L.leading, B = "maxWait" in L,
|
|
99
|
+
U = S(U) || 0, v(L) && (R = !!L.leading, B = "maxWait" in L, x = B ? d(S(L.maxWait) || 0, U) : x, _ = "trailing" in L ? !!L.trailing : _);
|
|
100
100
|
function E(j) {
|
|
101
101
|
var Y = y, SA = g;
|
|
102
102
|
return y = g = void 0, H = j, Z = b.apply(SA, Y), Z;
|
|
@@ -106,11 +106,11 @@ function Ed() {
|
|
|
106
106
|
}
|
|
107
107
|
function h(j) {
|
|
108
108
|
var Y = j - J, SA = j - H, LA = U - Y;
|
|
109
|
-
return B ? q(LA,
|
|
109
|
+
return B ? q(LA, x - SA) : LA;
|
|
110
110
|
}
|
|
111
111
|
function W(j) {
|
|
112
112
|
var Y = j - J, SA = j - H;
|
|
113
|
-
return J === void 0 || Y >= U || Y < 0 || B && SA >=
|
|
113
|
+
return J === void 0 || Y >= U || Y < 0 || B && SA >= x;
|
|
114
114
|
}
|
|
115
115
|
function K() {
|
|
116
116
|
var j = V();
|
|
@@ -355,9 +355,9 @@ const pq = ({ transcribing: A = !0, clearTranscriptOnListen: e = !0, commands: t
|
|
|
355
355
|
a.resetTranscript(), f();
|
|
356
356
|
}, [
|
|
357
357
|
a
|
|
358
|
-
]), m = (y, g,
|
|
358
|
+
]), m = (y, g, x) => {
|
|
359
359
|
const F = (typeof y == "object" ? y.toString() : y).replace(/[&/\\#,+()!$~%.'":*?<>{}]/g, "").replace(/ +/g, " ").trim(), J = nq(F, g);
|
|
360
|
-
return J >=
|
|
360
|
+
return J >= x ? {
|
|
361
361
|
command: y,
|
|
362
362
|
commandWithoutSpecials: F,
|
|
363
363
|
howSimilar: J,
|
|
@@ -370,9 +370,9 @@ const pq = ({ transcribing: A = !0, clearTranscriptOnListen: e = !0, commands: t
|
|
|
370
370
|
parameters: Z.slice(1)
|
|
371
371
|
} : null;
|
|
372
372
|
}, S = aA((y, g) => {
|
|
373
|
-
V.current.forEach(({ command:
|
|
374
|
-
const B = !g && F ? y.trim() : g.trim(), E = (Array.isArray(
|
|
375
|
-
|
|
373
|
+
V.current.forEach(({ command: x, callback: Z, matchInterim: F = !1, isFuzzyMatch: J = !1, fuzzyMatchingThreshold: H = 0.8, bestMatchOnly: R = !1 }) => {
|
|
374
|
+
const B = !g && F ? y.trim() : g.trim(), E = (Array.isArray(x) ? x : [
|
|
375
|
+
x
|
|
376
376
|
]).map((z) => J ? m(z, B, H) : T(z, B)).filter((z) => z);
|
|
377
377
|
if (J && R && E.length >= 2) {
|
|
378
378
|
E.sort((K, X) => X.howSimilar - K.howSimilar);
|
|
@@ -1905,7 +1905,7 @@ var it = {}, Tp;
|
|
|
1905
1905
|
function Zq() {
|
|
1906
1906
|
if (Tp) return it;
|
|
1907
1907
|
Tp = 1, Object.defineProperty(it, "__esModule", { value: !0 }), it.ChunkedArrayBufferStream = void 0;
|
|
1908
|
-
const A = /* @__PURE__ */
|
|
1908
|
+
const A = /* @__PURE__ */ C();
|
|
1909
1909
|
let e = class extends A.Stream {
|
|
1910
1910
|
constructor(a, n) {
|
|
1911
1911
|
super(n), this.privTargetChunkSize = Math.round(a), this.privNextBufferReadyBytes = 0;
|
|
@@ -2115,7 +2115,7 @@ var pt = {}, Up;
|
|
|
2115
2115
|
function Bq() {
|
|
2116
2116
|
if (Up) return pt;
|
|
2117
2117
|
Up = 1, Object.defineProperty(pt, "__esModule", { value: !0 }), pt.BackgroundEvent = void 0;
|
|
2118
|
-
const A = /* @__PURE__ */
|
|
2118
|
+
const A = /* @__PURE__ */ C();
|
|
2119
2119
|
class e extends A.PlatformEvent {
|
|
2120
2120
|
constructor(a) {
|
|
2121
2121
|
super("BackgroundEvent", A.EventType.Error), this.privError = a;
|
|
@@ -2127,7 +2127,7 @@ function Bq() {
|
|
|
2127
2127
|
return pt.BackgroundEvent = e, pt;
|
|
2128
2128
|
}
|
|
2129
2129
|
var hp;
|
|
2130
|
-
function
|
|
2130
|
+
function C() {
|
|
2131
2131
|
return hp || (hp = 1, (function(A) {
|
|
2132
2132
|
var e = Ae && Ae.__createBinding || (Object.create ? (function(n, s, i, r) {
|
|
2133
2133
|
r === void 0 && (r = i), Object.defineProperty(n, r, { enumerable: !0, get: function() {
|
|
@@ -2174,7 +2174,7 @@ var Wp;
|
|
|
2174
2174
|
function Gq() {
|
|
2175
2175
|
if (Wp) return Je;
|
|
2176
2176
|
Wp = 1, Object.defineProperty(Je, "__esModule", { value: !0 }), Je.CognitiveSubscriptionKeyAuthentication = void 0;
|
|
2177
|
-
const A = /* @__PURE__ */
|
|
2177
|
+
const A = /* @__PURE__ */ C(), e = /* @__PURE__ */ mA(), t = /* @__PURE__ */ ls();
|
|
2178
2178
|
let a = class {
|
|
2179
2179
|
/**
|
|
2180
2180
|
* Creates and initializes an instance of the CognitiveSubscriptionKeyAuthentication class.
|
|
@@ -2215,7 +2215,7 @@ var ct = {}, Lp;
|
|
|
2215
2215
|
function kq() {
|
|
2216
2216
|
if (Lp) return ct;
|
|
2217
2217
|
Lp = 1, Object.defineProperty(ct, "__esModule", { value: !0 }), ct.CognitiveTokenAuthentication = void 0;
|
|
2218
|
-
const A = /* @__PURE__ */
|
|
2218
|
+
const A = /* @__PURE__ */ C(), e = /* @__PURE__ */ ls(), t = /* @__PURE__ */ mA();
|
|
2219
2219
|
let a = class Ei {
|
|
2220
2220
|
constructor(s, i) {
|
|
2221
2221
|
if (!s)
|
|
@@ -2245,7 +2245,7 @@ var Ja = {}, Xp;
|
|
|
2245
2245
|
function cs() {
|
|
2246
2246
|
return Xp || (Xp = 1, (function(A) {
|
|
2247
2247
|
Object.defineProperty(A, "__esModule", { value: !0 }), A.RecognitionEndedEvent = A.RecognitionCompletionStatus = A.RecognitionStartedEvent = A.ConnectingToServiceEvent = A.ListeningStartedEvent = A.RecognitionTriggeredEvent = A.SpeechRecognitionEvent = void 0;
|
|
2248
|
-
const e = /* @__PURE__ */
|
|
2248
|
+
const e = /* @__PURE__ */ C();
|
|
2249
2249
|
class t extends e.PlatformEvent {
|
|
2250
2250
|
constructor(l, c, u, d = e.EventType.Info) {
|
|
2251
2251
|
super(l, d), this.privRequestId = c, this.privSessionId = u;
|
|
@@ -2345,7 +2345,7 @@ var Da = {}, Kp;
|
|
|
2345
2345
|
function qc() {
|
|
2346
2346
|
return Kp || (Kp = 1, (function(A) {
|
|
2347
2347
|
Object.defineProperty(A, "__esModule", { value: !0 }), A.LogLevel = void 0;
|
|
2348
|
-
const e = /* @__PURE__ */
|
|
2348
|
+
const e = /* @__PURE__ */ C();
|
|
2349
2349
|
Object.defineProperty(A, "LogLevel", { enumerable: !0, get: function() {
|
|
2350
2350
|
return e.EventType;
|
|
2351
2351
|
} });
|
|
@@ -2607,7 +2607,7 @@ var Zp;
|
|
|
2607
2607
|
function Qq() {
|
|
2608
2608
|
return Zp || (Zp = 1, (function(A) {
|
|
2609
2609
|
Object.defineProperty(A, "__esModule", { value: !0 }), A.MicAudioSource = A.AudioWorkletSourceURLPropertyName = void 0;
|
|
2610
|
-
const e = /* @__PURE__ */ P(), t = /* @__PURE__ */
|
|
2610
|
+
const e = /* @__PURE__ */ P(), t = /* @__PURE__ */ C(), a = /* @__PURE__ */ ye();
|
|
2611
2611
|
A.AudioWorkletSourceURLPropertyName = "MICROPHONE-WorkletSourceUrl";
|
|
2612
2612
|
class n {
|
|
2613
2613
|
constructor(i, r, p, o) {
|
|
@@ -2748,7 +2748,7 @@ var qt = {}, Jp;
|
|
|
2748
2748
|
function Iq() {
|
|
2749
2749
|
if (Jp) return qt;
|
|
2750
2750
|
Jp = 1, Object.defineProperty(qt, "__esModule", { value: !0 }), qt.FileAudioSource = void 0;
|
|
2751
|
-
const A = /* @__PURE__ */ P(), e = /* @__PURE__ */
|
|
2751
|
+
const A = /* @__PURE__ */ P(), e = /* @__PURE__ */ C(), t = /* @__PURE__ */ ye();
|
|
2752
2752
|
let a = class {
|
|
2753
2753
|
constructor(s, i, r) {
|
|
2754
2754
|
this.privStreams = {}, this.privHeaderEnd = 44, this.privId = r || (0, e.createNoDashGuid)(), this.privEvents = new e.EventSource(), this.privSource = s, typeof window < "u" && typeof Blob < "u" && this.privSource instanceof Blob ? this.privFilename = s.name : this.privFilename = i || "unknown.wav", this.privAudioFormatPromise = this.readHeader();
|
|
@@ -2875,7 +2875,7 @@ var vt = {}, Dp;
|
|
|
2875
2875
|
function _q() {
|
|
2876
2876
|
if (Dp) return vt;
|
|
2877
2877
|
Dp = 1, Object.defineProperty(vt, "__esModule", { value: !0 }), vt.PcmRecorder = void 0;
|
|
2878
|
-
const A = /* @__PURE__ */
|
|
2878
|
+
const A = /* @__PURE__ */ C();
|
|
2879
2879
|
class e {
|
|
2880
2880
|
constructor(a) {
|
|
2881
2881
|
this.privStopInputOnRelease = a;
|
|
@@ -2988,7 +2988,7 @@ function vc() {
|
|
|
2988
2988
|
return u && u.__esModule ? u : { default: u };
|
|
2989
2989
|
};
|
|
2990
2990
|
Object.defineProperty(vA, "__esModule", { value: !0 }), vA.WebsocketMessageAdapter = void 0;
|
|
2991
|
-
const n = t(me), s = t(me), i = a(me), r = a(me), p = a(me), o = /* @__PURE__ */ mA(), l = /* @__PURE__ */
|
|
2991
|
+
const n = t(me), s = t(me), i = a(me), r = a(me), p = a(me), o = /* @__PURE__ */ mA(), l = /* @__PURE__ */ C();
|
|
2992
2992
|
let c = class Yi {
|
|
2993
2993
|
constructor(d, q, V, f, v, m) {
|
|
2994
2994
|
if (!d)
|
|
@@ -3161,7 +3161,7 @@ var Bp;
|
|
|
3161
3161
|
function $q() {
|
|
3162
3162
|
if (Bp) return Vt;
|
|
3163
3163
|
Bp = 1, Object.defineProperty(Vt, "__esModule", { value: !0 }), Vt.WebsocketConnection = void 0;
|
|
3164
|
-
const A = /* @__PURE__ */
|
|
3164
|
+
const A = /* @__PURE__ */ C(), e = /* @__PURE__ */ vc();
|
|
3165
3165
|
let t = class {
|
|
3166
3166
|
constructor(n, s, i, r, p, o = !1, l) {
|
|
3167
3167
|
if (this.privIsDisposed = !1, !n)
|
|
@@ -3343,7 +3343,7 @@ var VA = {}, Mp;
|
|
|
3343
3343
|
function fc() {
|
|
3344
3344
|
if (Mp) return VA;
|
|
3345
3345
|
Mp = 1, Object.defineProperty(VA, "__esModule", { value: !0 }), VA.PullAudioInputStreamImpl = VA.PullAudioInputStream = VA.PushAudioInputStreamImpl = VA.PushAudioInputStream = VA.AudioInputStream = void 0;
|
|
3346
|
-
const A = /* @__PURE__ */ P(), e = /* @__PURE__ */
|
|
3346
|
+
const A = /* @__PURE__ */ P(), e = /* @__PURE__ */ C(), t = /* @__PURE__ */ he(), a = /* @__PURE__ */ O(), n = /* @__PURE__ */ ye();
|
|
3347
3347
|
let s = class {
|
|
3348
3348
|
/**
|
|
3349
3349
|
* Creates and initializes an instance.
|
|
@@ -3804,7 +3804,7 @@ var Hp;
|
|
|
3804
3804
|
function Ce() {
|
|
3805
3805
|
if (Hp) return fA;
|
|
3806
3806
|
Hp = 1, Object.defineProperty(fA, "__esModule", { value: !0 }), fA.PushAudioOutputStreamImpl = fA.PushAudioOutputStream = fA.PullAudioOutputStreamImpl = fA.PullAudioOutputStream = fA.AudioOutputStream = void 0;
|
|
3807
|
-
const A = /* @__PURE__ */
|
|
3807
|
+
const A = /* @__PURE__ */ C(), e = /* @__PURE__ */ M(), t = /* @__PURE__ */ xn();
|
|
3808
3808
|
let a = class {
|
|
3809
3809
|
/**
|
|
3810
3810
|
* Creates and initializes an instance.
|
|
@@ -5365,7 +5365,7 @@ var wt = {}, fo;
|
|
|
5365
5365
|
function T3() {
|
|
5366
5366
|
if (fo) return wt;
|
|
5367
5367
|
fo = 1, Object.defineProperty(wt, "__esModule", { value: !0 }), wt.Recognizer = void 0;
|
|
5368
|
-
const A = /* @__PURE__ */ P(), e = /* @__PURE__ */
|
|
5368
|
+
const A = /* @__PURE__ */ P(), e = /* @__PURE__ */ C(), t = /* @__PURE__ */ M(), a = /* @__PURE__ */ O();
|
|
5369
5369
|
let n = class hc {
|
|
5370
5370
|
/**
|
|
5371
5371
|
* Creates and initializes an instance of a Recognizer
|
|
@@ -5492,7 +5492,7 @@ var To;
|
|
|
5492
5492
|
function b3() {
|
|
5493
5493
|
if (To) return Ct;
|
|
5494
5494
|
To = 1, Object.defineProperty(Ct, "__esModule", { value: !0 }), Ct.SpeechRecognizer = void 0;
|
|
5495
|
-
const A = /* @__PURE__ */ P(), e = /* @__PURE__ */ zA(), t = /* @__PURE__ */
|
|
5495
|
+
const A = /* @__PURE__ */ P(), e = /* @__PURE__ */ zA(), t = /* @__PURE__ */ C(), a = /* @__PURE__ */ M(), n = /* @__PURE__ */ O();
|
|
5496
5496
|
let s = class yc extends n.Recognizer {
|
|
5497
5497
|
/**
|
|
5498
5498
|
* SpeechRecognizer constructor.
|
|
@@ -5676,7 +5676,7 @@ var xt = {}, Zt = {}, ie = {}, bo;
|
|
|
5676
5676
|
function zc() {
|
|
5677
5677
|
if (bo) return ie;
|
|
5678
5678
|
bo = 1, Object.defineProperty(ie, "__esModule", { value: !0 }), ie.ConnectionMessageImpl = ie.ConnectionMessage = void 0;
|
|
5679
|
-
const A = /* @__PURE__ */ mA(), e = /* @__PURE__ */
|
|
5679
|
+
const A = /* @__PURE__ */ mA(), e = /* @__PURE__ */ C(), t = /* @__PURE__ */ Uc(), a = /* @__PURE__ */ us();
|
|
5680
5680
|
let n = class {
|
|
5681
5681
|
};
|
|
5682
5682
|
ie.ConnectionMessage = n;
|
|
@@ -5740,7 +5740,7 @@ var So;
|
|
|
5740
5740
|
function Wc() {
|
|
5741
5741
|
if (So) return Zt;
|
|
5742
5742
|
So = 1, Object.defineProperty(Zt, "__esModule", { value: !0 }), Zt.Connection = void 0;
|
|
5743
|
-
const A = /* @__PURE__ */ P(), e = /* @__PURE__ */
|
|
5743
|
+
const A = /* @__PURE__ */ P(), e = /* @__PURE__ */ C(), t = /* @__PURE__ */ zc(), a = /* @__PURE__ */ M(), n = /* @__PURE__ */ O();
|
|
5744
5744
|
let s = class Qi {
|
|
5745
5745
|
/**
|
|
5746
5746
|
* Gets the Connection instance from the specified recognizer.
|
|
@@ -5838,7 +5838,7 @@ var No;
|
|
|
5838
5838
|
function S3() {
|
|
5839
5839
|
if (No) return xt;
|
|
5840
5840
|
No = 1, Object.defineProperty(xt, "__esModule", { value: !0 }), xt.TranslationRecognizer = void 0;
|
|
5841
|
-
const A = /* @__PURE__ */ P(), e = /* @__PURE__ */ zA(), t = /* @__PURE__ */
|
|
5841
|
+
const A = /* @__PURE__ */ P(), e = /* @__PURE__ */ zA(), t = /* @__PURE__ */ C(), a = /* @__PURE__ */ Wc(), n = /* @__PURE__ */ M(), s = /* @__PURE__ */ O();
|
|
5842
5842
|
let i = class Lc extends s.Recognizer {
|
|
5843
5843
|
/**
|
|
5844
5844
|
* Initializes an instance of the TranslationRecognizer.
|
|
@@ -6668,7 +6668,7 @@ var Zo;
|
|
|
6668
6668
|
function BA() {
|
|
6669
6669
|
if (Zo) return Qt;
|
|
6670
6670
|
Zo = 1, Object.defineProperty(Qt, "__esModule", { value: !0 }), Qt.ConnectionFactoryBase = void 0;
|
|
6671
|
-
const A = /* @__PURE__ */ P(), e = /* @__PURE__ */
|
|
6671
|
+
const A = /* @__PURE__ */ P(), e = /* @__PURE__ */ C(), t = /* @__PURE__ */ O(), a = /* @__PURE__ */ IA();
|
|
6672
6672
|
let n = class {
|
|
6673
6673
|
static getHostSuffix(i) {
|
|
6674
6674
|
if (i) {
|
|
@@ -6747,7 +6747,7 @@ var Do;
|
|
|
6747
6747
|
function w3() {
|
|
6748
6748
|
if (Do) return Et;
|
|
6749
6749
|
Do = 1, Object.defineProperty(Et, "__esModule", { value: !0 }), Et.DialogServiceConnector = void 0;
|
|
6750
|
-
const A = /* @__PURE__ */ P3(), e = /* @__PURE__ */ P(), t = /* @__PURE__ */ zA(), a = /* @__PURE__ */
|
|
6750
|
+
const A = /* @__PURE__ */ P3(), e = /* @__PURE__ */ P(), t = /* @__PURE__ */ zA(), a = /* @__PURE__ */ C(), n = /* @__PURE__ */ M(), s = /* @__PURE__ */ O(), i = /* @__PURE__ */ us();
|
|
6751
6751
|
let r = class extends s.Recognizer {
|
|
6752
6752
|
/**
|
|
6753
6753
|
* Initializes an instance of the DialogServiceConnector.
|
|
@@ -7291,7 +7291,7 @@ var ei = {}, pe = {}, Io;
|
|
|
7291
7291
|
function Cc() {
|
|
7292
7292
|
if (Io) return pe;
|
|
7293
7293
|
Io = 1, Object.defineProperty(pe, "__esModule", { value: !0 }), pe.ConversationImpl = pe.Conversation = void 0;
|
|
7294
|
-
const A = /* @__PURE__ */ P(), e = /* @__PURE__ */
|
|
7294
|
+
const A = /* @__PURE__ */ P(), e = /* @__PURE__ */ C(), t = /* @__PURE__ */ M(), a = /* @__PURE__ */ O();
|
|
7295
7295
|
let n = class {
|
|
7296
7296
|
constructor() {
|
|
7297
7297
|
}
|
|
@@ -8087,7 +8087,7 @@ var i0;
|
|
|
8087
8087
|
function _3() {
|
|
8088
8088
|
return i0 || (i0 = 1, (function(A) {
|
|
8089
8089
|
Object.defineProperty(A, "__esModule", { value: !0 }), A.ConversationTranslator = A.SpeechState = void 0;
|
|
8090
|
-
const e = /* @__PURE__ */ P(), t = /* @__PURE__ */ I3(), a = /* @__PURE__ */
|
|
8090
|
+
const e = /* @__PURE__ */ P(), t = /* @__PURE__ */ I3(), a = /* @__PURE__ */ C(), n = /* @__PURE__ */ M(), s = /* @__PURE__ */ O(), i = /* @__PURE__ */ Cc(), r = /* @__PURE__ */ qs();
|
|
8091
8091
|
var p;
|
|
8092
8092
|
(function(c) {
|
|
8093
8093
|
c[c.Inactive = 0] = "Inactive", c[c.Connecting = 1] = "Connecting", c[c.Connected = 2] = "Connected";
|
|
@@ -8315,7 +8315,7 @@ var qr = {}, s0;
|
|
|
8315
8315
|
function $3() {
|
|
8316
8316
|
if (s0) return qr;
|
|
8317
8317
|
s0 = 1, Object.defineProperty(qr, "__esModule", { value: !0 }), qr.ConversationTranscriber = void 0;
|
|
8318
|
-
const A = /* @__PURE__ */ P(), e = /* @__PURE__ */ zA(), t = /* @__PURE__ */
|
|
8318
|
+
const A = /* @__PURE__ */ P(), e = /* @__PURE__ */ zA(), t = /* @__PURE__ */ C(), a = /* @__PURE__ */ M(), n = /* @__PURE__ */ O();
|
|
8319
8319
|
let s = class Jc extends n.Recognizer {
|
|
8320
8320
|
/**
|
|
8321
8321
|
* ConversationTranscriber constructor.
|
|
@@ -8513,7 +8513,7 @@ var le = {}, l0;
|
|
|
8513
8513
|
function tv() {
|
|
8514
8514
|
if (l0) return le;
|
|
8515
8515
|
l0 = 1, Object.defineProperty(le, "__esModule", { value: !0 }), le.MeetingImpl = le.Meeting = void 0;
|
|
8516
|
-
const A = /* @__PURE__ */ P(), e = /* @__PURE__ */
|
|
8516
|
+
const A = /* @__PURE__ */ P(), e = /* @__PURE__ */ C(), t = /* @__PURE__ */ M(), a = /* @__PURE__ */ O();
|
|
8517
8517
|
let n = class {
|
|
8518
8518
|
constructor() {
|
|
8519
8519
|
}
|
|
@@ -9102,7 +9102,7 @@ var Vr = {}, u0;
|
|
|
9102
9102
|
function nv() {
|
|
9103
9103
|
if (u0) return Vr;
|
|
9104
9104
|
u0 = 1, Object.defineProperty(Vr, "__esModule", { value: !0 }), Vr.MeetingTranscriber = void 0;
|
|
9105
|
-
const A = /* @__PURE__ */ P(), e = /* @__PURE__ */
|
|
9105
|
+
const A = /* @__PURE__ */ P(), e = /* @__PURE__ */ C(), t = /* @__PURE__ */ M(), a = /* @__PURE__ */ O(), n = /* @__PURE__ */ qs();
|
|
9106
9106
|
let s = class {
|
|
9107
9107
|
/**
|
|
9108
9108
|
* MeetingTranscriber constructor.
|
|
@@ -9342,7 +9342,7 @@ var ce = {}, v0;
|
|
|
9342
9342
|
function vs() {
|
|
9343
9343
|
if (v0) return ce;
|
|
9344
9344
|
v0 = 1, Object.defineProperty(ce, "__esModule", { value: !0 }), ce.SynthesisRequest = ce.Synthesizer = void 0;
|
|
9345
|
-
const A = /* @__PURE__ */ P(), e = /* @__PURE__ */
|
|
9345
|
+
const A = /* @__PURE__ */ P(), e = /* @__PURE__ */ C(), t = /* @__PURE__ */ M(), a = /* @__PURE__ */ O();
|
|
9346
9346
|
let n = class Dc {
|
|
9347
9347
|
/**
|
|
9348
9348
|
* Creates and initializes an instance of a Recognizer
|
|
@@ -9592,7 +9592,7 @@ var mr = {}, V0;
|
|
|
9592
9592
|
function iv() {
|
|
9593
9593
|
if (V0) return mr;
|
|
9594
9594
|
V0 = 1, Object.defineProperty(mr, "__esModule", { value: !0 }), mr.SpeechSynthesizer = void 0;
|
|
9595
|
-
const A = /* @__PURE__ */ P(), e = /* @__PURE__ */
|
|
9595
|
+
const A = /* @__PURE__ */ P(), e = /* @__PURE__ */ C(), t = /* @__PURE__ */ Vc(), a = /* @__PURE__ */ xn(), n = /* @__PURE__ */ Ce(), s = /* @__PURE__ */ M(), i = /* @__PURE__ */ O(), r = /* @__PURE__ */ vs();
|
|
9596
9596
|
let p = class Fc extends i.Synthesizer {
|
|
9597
9597
|
/**
|
|
9598
9598
|
* SpeechSynthesizer constructor.
|
|
@@ -10145,7 +10145,7 @@ var zr = {}, z0;
|
|
|
10145
10145
|
function Vv() {
|
|
10146
10146
|
if (z0) return zr;
|
|
10147
10147
|
z0 = 1, Object.defineProperty(zr, "__esModule", { value: !0 }), zr.SpeakerAudioDestination = void 0;
|
|
10148
|
-
const A = /* @__PURE__ */
|
|
10148
|
+
const A = /* @__PURE__ */ C(), e = /* @__PURE__ */ Ce(), t = /* @__PURE__ */ ye(), a = 1800, n = {
|
|
10149
10149
|
[t.AudioFormatTag.PCM]: "audio/wav",
|
|
10150
10150
|
[t.AudioFormatTag.MuLaw]: "audio/x-wav",
|
|
10151
10151
|
[t.AudioFormatTag.MP3]: "audio/mpeg",
|
|
@@ -10708,7 +10708,7 @@ var x0;
|
|
|
10708
10708
|
function yv() {
|
|
10709
10709
|
if (x0) return Kr;
|
|
10710
10710
|
x0 = 1, Object.defineProperty(Kr, "__esModule", { value: !0 }), Kr.AvatarSynthesizer = void 0;
|
|
10711
|
-
const A = /* @__PURE__ */ kc(), e = /* @__PURE__ */ P(), t = /* @__PURE__ */
|
|
10711
|
+
const A = /* @__PURE__ */ kc(), e = /* @__PURE__ */ P(), t = /* @__PURE__ */ C(), a = /* @__PURE__ */ xn(), n = /* @__PURE__ */ O(), s = /* @__PURE__ */ M(), i = /* @__PURE__ */ vs();
|
|
10712
10712
|
let r = class extends n.Synthesizer {
|
|
10713
10713
|
/**
|
|
10714
10714
|
* Creates and initializes an instance of this class.
|
|
@@ -10902,7 +10902,7 @@ var Cr = {}, D0;
|
|
|
10902
10902
|
function Lv() {
|
|
10903
10903
|
if (D0) return Cr;
|
|
10904
10904
|
D0 = 1, Object.defineProperty(Cr, "__esModule", { value: !0 }), Cr.Diagnostics = void 0;
|
|
10905
|
-
const A = /* @__PURE__ */ qA(), e = /* @__PURE__ */
|
|
10905
|
+
const A = /* @__PURE__ */ qA(), e = /* @__PURE__ */ C();
|
|
10906
10906
|
let t = class {
|
|
10907
10907
|
static SetLoggingLevel(n) {
|
|
10908
10908
|
this.privListener = new A.ConsoleLoggingListener(n), e.Events.instance.attachConsoleListener(this.privListener);
|
|
@@ -11047,9 +11047,9 @@ function O() {
|
|
|
11047
11047
|
Object.defineProperty(A, "Recognizer", { enumerable: !0, get: function() {
|
|
11048
11048
|
return g.Recognizer;
|
|
11049
11049
|
} });
|
|
11050
|
-
var
|
|
11050
|
+
var x = /* @__PURE__ */ b3();
|
|
11051
11051
|
Object.defineProperty(A, "SpeechRecognizer", { enumerable: !0, get: function() {
|
|
11052
|
-
return
|
|
11052
|
+
return x.SpeechRecognizer;
|
|
11053
11053
|
} });
|
|
11054
11054
|
var Z = /* @__PURE__ */ S3();
|
|
11055
11055
|
Object.defineProperty(A, "TranslationRecognizer", { enumerable: !0, get: function() {
|
|
@@ -11406,7 +11406,7 @@ function Kv() {
|
|
|
11406
11406
|
return i && i.__esModule ? i : { default: i };
|
|
11407
11407
|
};
|
|
11408
11408
|
Object.defineProperty(A, "__esModule", { value: !0 }), A.RestMessageAdapter = A.RestRequestType = void 0;
|
|
11409
|
-
const t = e(Xv()), a = /* @__PURE__ */
|
|
11409
|
+
const t = e(Xv()), a = /* @__PURE__ */ C();
|
|
11410
11410
|
var n;
|
|
11411
11411
|
(function(i) {
|
|
11412
11412
|
i.Get = "GET", i.Post = "POST", i.Delete = "DELETE", i.File = "file";
|
|
@@ -11539,7 +11539,7 @@ var Jr = {}, H0;
|
|
|
11539
11539
|
function oa() {
|
|
11540
11540
|
if (H0) return Jr;
|
|
11541
11541
|
H0 = 1, Object.defineProperty(Jr, "__esModule", { value: !0 }), Jr.SpeechConnectionMessage = void 0;
|
|
11542
|
-
const A = /* @__PURE__ */
|
|
11542
|
+
const A = /* @__PURE__ */ C(), e = /* @__PURE__ */ mA();
|
|
11543
11543
|
class t extends A.ConnectionMessage {
|
|
11544
11544
|
constructor(n, s, i, r, p, o, l, c) {
|
|
11545
11545
|
if (!s)
|
|
@@ -11656,7 +11656,7 @@ var rl;
|
|
|
11656
11656
|
function Gv() {
|
|
11657
11657
|
if (rl) return ut;
|
|
11658
11658
|
rl = 1, Object.defineProperty(ut, "__esModule", { value: !0 }), ut.ServiceRecognizerBase = void 0;
|
|
11659
|
-
const A = /* @__PURE__ */ qA(), e = /* @__PURE__ */
|
|
11659
|
+
const A = /* @__PURE__ */ qA(), e = /* @__PURE__ */ C(), t = /* @__PURE__ */ O(), a = /* @__PURE__ */ P(), n = /* @__PURE__ */ oa(), s = /* @__PURE__ */ Pv(), i = /* @__PURE__ */ zA(), r = /* @__PURE__ */ wv(), p = /* @__PURE__ */ Cv(), o = /* @__PURE__ */ xv(), l = /* @__PURE__ */ Zv(), c = /* @__PURE__ */ Jv(), u = /* @__PURE__ */ Dv(), d = /* @__PURE__ */ Fv(), q = /* @__PURE__ */ Bv();
|
|
11660
11660
|
let V = class On {
|
|
11661
11661
|
constructor(v, m, T, S, b) {
|
|
11662
11662
|
if (this.privConnectionConfigurationPromise = void 0, this.privConnectionPromise = void 0, this.privSetTimeout = setTimeout, this.privIsLiveAudio = !1, this.privAverageBytesPerMs = 0, this.privEnableSpeakerId = !1, this.privExpectContentAssessmentResponse = !1, this.recognizeOverride = void 0, this.disconnectOverride = void 0, this.receiveMessageOverride = void 0, this.sendPrePayloadJSONOverride = void 0, this.postConnectImplOverride = void 0, this.configConnectionOverride = void 0, this.handleSpeechPhraseMessage = void 0, this.handleSpeechHypothesisMessage = void 0, !v)
|
|
@@ -11843,8 +11843,8 @@ function Gv() {
|
|
|
11843
11843
|
const S = this.connectImpl();
|
|
11844
11844
|
let b;
|
|
11845
11845
|
try {
|
|
11846
|
-
const y = await this.audioSource.attach(this.privRequestSession.audioNodeId), g = await this.audioSource.format,
|
|
11847
|
-
this.privIsLiveAudio =
|
|
11846
|
+
const y = await this.audioSource.attach(this.privRequestSession.audioNodeId), g = await this.audioSource.format, x = await this.audioSource.deviceInfo;
|
|
11847
|
+
this.privIsLiveAudio = x.type && x.type === a.type.Microphones, b = new A.ReplayableAudioNode(y, g.avgBytesPerSec), await this.privRequestSession.onAudioSourceAttachCompleted(b, !1), this.privRecognizerConfig.SpeechServiceConfig.Context.audio = { source: x };
|
|
11848
11848
|
} catch (y) {
|
|
11849
11849
|
throw await this.privRequestSession.onStopRecognizing(), y;
|
|
11850
11850
|
}
|
|
@@ -12044,9 +12044,9 @@ function Gv() {
|
|
|
12044
12044
|
const y = await this.fetchConnection(), g = await v.read();
|
|
12045
12045
|
if (this.privRequestSession.isSpeechEnded)
|
|
12046
12046
|
return;
|
|
12047
|
-
let
|
|
12048
|
-
if (!g || g.isEnd ? (
|
|
12049
|
-
if (y.send(new n.SpeechConnectionMessage(e.MessageType.Binary, "audio", this.privRequestSession.requestId, null,
|
|
12047
|
+
let x, Z;
|
|
12048
|
+
if (!g || g.isEnd ? (x = null, Z = 0) : (x = g.buffer, this.privRequestSession.onAudioSent(x.byteLength), b >= this.privRequestSession.bytesSent ? Z = 0 : Z = Math.max(0, T - Date.now())), Z !== 0 && await this.delay(Z), x !== null && (T = Date.now() + x.byteLength * 1e3 / (m.avgBytesPerSec * 2)), !this.privIsDisposed && !this.privRequestSession.isSpeechEnded && this.privRequestSession.isRecognizing && this.privRequestSession.recogNumber === U)
|
|
12049
|
+
if (y.send(new n.SpeechConnectionMessage(e.MessageType.Binary, "audio", this.privRequestSession.requestId, null, x)).catch(() => {
|
|
12050
12050
|
this.privRequestSession.onServiceTurnEndResponse(this.privRecognizerConfig.isContinuousRecognition).catch(() => {
|
|
12051
12051
|
});
|
|
12052
12052
|
}), g?.isEnd)
|
|
@@ -12234,7 +12234,7 @@ var Fr = {}, sl;
|
|
|
12234
12234
|
function Rv() {
|
|
12235
12235
|
if (sl) return Fr;
|
|
12236
12236
|
sl = 1, Object.defineProperty(Fr, "__esModule", { value: !0 }), Fr.WebsocketMessageFormatter = void 0;
|
|
12237
|
-
const A = /* @__PURE__ */
|
|
12237
|
+
const A = /* @__PURE__ */ C(), e = `\r
|
|
12238
12238
|
`;
|
|
12239
12239
|
let t = class {
|
|
12240
12240
|
toConnectionMessage(n) {
|
|
@@ -12694,7 +12694,7 @@ var Yr = {}, fl;
|
|
|
12694
12694
|
function t1() {
|
|
12695
12695
|
if (fl) return Yr;
|
|
12696
12696
|
fl = 1, Object.defineProperty(Yr, "__esModule", { value: !0 }), Yr.TranslationServiceRecognizer = void 0;
|
|
12697
|
-
const A = /* @__PURE__ */
|
|
12697
|
+
const A = /* @__PURE__ */ C(), e = /* @__PURE__ */ O(), t = /* @__PURE__ */ P();
|
|
12698
12698
|
let a = class extends t.ConversationServiceRecognizer {
|
|
12699
12699
|
constructor(s, i, r, p, o) {
|
|
12700
12700
|
super(s, i, r, p, o), this.privTranslationRecognizer = o, this.connectionEvents.attach((l) => {
|
|
@@ -13189,7 +13189,7 @@ var en = {}, hl;
|
|
|
13189
13189
|
function o1() {
|
|
13190
13190
|
if (hl) return en;
|
|
13191
13191
|
hl = 1, Object.defineProperty(en, "__esModule", { value: !0 }), en.TranscriptionServiceRecognizer = void 0;
|
|
13192
|
-
const A = /* @__PURE__ */
|
|
13192
|
+
const A = /* @__PURE__ */ C(), e = /* @__PURE__ */ O(), t = /* @__PURE__ */ P(), a = /* @__PURE__ */ oa();
|
|
13193
13193
|
let n = class extends t.ConversationServiceRecognizer {
|
|
13194
13194
|
constructor(i, r, p, o, l) {
|
|
13195
13195
|
super(i, r, p, o, l), this.privTranscriberRecognizer = l, this.sendPrePayloadJSONOverride = (c) => this.sendTranscriptionStartJSON(c), this.privRecognizerConfig.parameters.getProperty(e.PropertyId.SpeechServiceResponse_RequestWordLevelTimestamps) === "true" && this.privSpeechContext.setWordLevelTimings();
|
|
@@ -13421,7 +13421,7 @@ var nn = {}, an = {}, Wl;
|
|
|
13421
13421
|
function u1() {
|
|
13422
13422
|
if (Wl) return an;
|
|
13423
13423
|
Wl = 1, Object.defineProperty(an, "__esModule", { value: !0 }), an.ServiceTelemetryListener = void 0;
|
|
13424
|
-
const A = /* @__PURE__ */
|
|
13424
|
+
const A = /* @__PURE__ */ C(), e = /* @__PURE__ */ cs();
|
|
13425
13425
|
class t {
|
|
13426
13426
|
constructor(n, s, i) {
|
|
13427
13427
|
this.privIsDisposed = !1, this.privListeningTriggerMetric = null, this.privMicMetric = null, this.privConnectionEstablishMetric = null, this.privRequestId = n, this.privAudioSourceId = s, this.privAudioNodeId = i, this.privReceivedMessages = {}, this.privPhraseLatencies = [], this.privHypothesisLatencies = [];
|
|
@@ -13518,7 +13518,7 @@ var Ll;
|
|
|
13518
13518
|
function d1() {
|
|
13519
13519
|
if (Ll) return nn;
|
|
13520
13520
|
Ll = 1, Object.defineProperty(nn, "__esModule", { value: !0 }), nn.RequestSession = void 0;
|
|
13521
|
-
const A = /* @__PURE__ */
|
|
13521
|
+
const A = /* @__PURE__ */ C(), e = /* @__PURE__ */ cs(), t = /* @__PURE__ */ u1();
|
|
13522
13522
|
let a = class {
|
|
13523
13523
|
constructor(s) {
|
|
13524
13524
|
this.privIsDisposed = !1, this.privDetachables = new Array(), this.privIsAudioNodeDetached = !1, this.privIsRecognizing = !1, this.privIsSpeechEnded = !1, this.privTurnStartAudioOffset = 0, this.privLastRecoOffset = 0, this.privHypothesisReceived = !1, this.privBytesSent = 0, this.privRecognitionBytesSent = 0, this.privRecogNumber = 0, this.privInTurn = !1, this.privConnectionAttempts = 0, this.privAudioSourceId = s, this.privRequestId = (0, A.createNoDashGuid)(), this.privAudioNodeId = (0, A.createNoDashGuid)(), this.privTurnDeferral = new A.Deferred(), this.privTurnDeferral.resolve();
|
|
@@ -13872,7 +13872,7 @@ var Jl;
|
|
|
13872
13872
|
function N1() {
|
|
13873
13873
|
if (Jl) return on;
|
|
13874
13874
|
Jl = 1, Object.defineProperty(on, "__esModule", { value: !0 }), on.DialogServiceAdapter = void 0;
|
|
13875
|
-
const A = /* @__PURE__ */ qA(), e = /* @__PURE__ */ oc(), t = /* @__PURE__ */
|
|
13875
|
+
const A = /* @__PURE__ */ qA(), e = /* @__PURE__ */ oc(), t = /* @__PURE__ */ C(), a = /* @__PURE__ */ xn(), n = /* @__PURE__ */ O(), s = /* @__PURE__ */ T1(), i = /* @__PURE__ */ P(), r = /* @__PURE__ */ _c(), p = /* @__PURE__ */ b1(), o = /* @__PURE__ */ S1(), l = /* @__PURE__ */ oa();
|
|
13876
13876
|
let c = class extends i.ServiceRecognizerBase {
|
|
13877
13877
|
constructor(d, q, V, f, v) {
|
|
13878
13878
|
super(d, q, V, f, v), this.privEvents = new t.EventSource(), this.privDialogServiceConnector = v, this.receiveMessageOverride = () => this.receiveDialogMessageOverride(), this.privTurnStateManager = new s.DialogServiceTurnStateManager(), this.recognizeOverride = (m, T, S) => this.listenOnce(m, T, S), this.postConnectImplOverride = (m) => this.dialogConnectImpl(m), this.configConnectionOverride = (m) => this.configConnection(m), this.disconnectOverride = () => this.privDisconnect(), this.privDialogAudioSource = V, this.agentConfigSent = !1, this.privLastResult = null, this.connectionEvents.attach((m) => {
|
|
@@ -14022,8 +14022,8 @@ function N1() {
|
|
|
14022
14022
|
switch (T.path.toLowerCase()) {
|
|
14023
14023
|
case "turn.start":
|
|
14024
14024
|
{
|
|
14025
|
-
const
|
|
14026
|
-
|
|
14025
|
+
const x = T.requestId.toUpperCase(), Z = this.privRequestSession.requestId.toUpperCase();
|
|
14026
|
+
x !== Z ? this.privTurnStateManager.StartTurn(x) : this.privRequestSession.onServiceTurnStartResponse();
|
|
14027
14027
|
}
|
|
14028
14028
|
break;
|
|
14029
14029
|
case "speech.startdetected":
|
|
@@ -14040,9 +14040,9 @@ function N1() {
|
|
|
14040
14040
|
break;
|
|
14041
14041
|
case "turn.end":
|
|
14042
14042
|
{
|
|
14043
|
-
const
|
|
14044
|
-
if (
|
|
14045
|
-
this.privTurnStateManager.CompleteTurn(
|
|
14043
|
+
const x = T.requestId.toUpperCase(), Z = this.privRequestSession.requestId.toUpperCase();
|
|
14044
|
+
if (x !== Z)
|
|
14045
|
+
this.privTurnStateManager.CompleteTurn(x);
|
|
14046
14046
|
else {
|
|
14047
14047
|
const F = new n.SessionEventArgs(this.privRequestSession.sessionId);
|
|
14048
14048
|
if (await this.privRequestSession.onServiceTurnEndResponse(!1), (!this.privRecognizerConfig.isContinuousRecognition || this.privRequestSession.isSpeechEnded || !this.privRequestSession.isRecognizing) && this.privRecognizer.sessionStopped && this.privRecognizer.sessionStopped(this.privRecognizer, F), this.privSuccessCallback && this.privLastResult) {
|
|
@@ -14315,7 +14315,7 @@ var de = {}, vn = {}, Vn = {}, fn = {}, Gl;
|
|
|
14315
14315
|
function $c() {
|
|
14316
14316
|
if (Gl) return fn;
|
|
14317
14317
|
Gl = 1, Object.defineProperty(fn, "__esModule", { value: !0 }), fn.ConversationConnectionMessage = void 0;
|
|
14318
|
-
const A = /* @__PURE__ */
|
|
14318
|
+
const A = /* @__PURE__ */ C();
|
|
14319
14319
|
let e = class extends A.ConnectionMessage {
|
|
14320
14320
|
constructor(a, n, s, i) {
|
|
14321
14321
|
super(a, n, s, i);
|
|
@@ -14332,7 +14332,7 @@ var kl;
|
|
|
14332
14332
|
function y1() {
|
|
14333
14333
|
if (kl) return Vn;
|
|
14334
14334
|
kl = 1, Object.defineProperty(Vn, "__esModule", { value: !0 }), Vn.ConversationWebsocketMessageFormatter = void 0;
|
|
14335
|
-
const A = /* @__PURE__ */
|
|
14335
|
+
const A = /* @__PURE__ */ C(), e = /* @__PURE__ */ $c();
|
|
14336
14336
|
let t = class {
|
|
14337
14337
|
/**
|
|
14338
14338
|
* Format incoming messages: text (speech partial/final, IM) or binary (tts)
|
|
@@ -14371,7 +14371,7 @@ var Ml;
|
|
|
14371
14371
|
function z1() {
|
|
14372
14372
|
if (Ml) return vn;
|
|
14373
14373
|
Ml = 1, Object.defineProperty(vn, "__esModule", { value: !0 }), vn.ConversationConnectionFactory = void 0;
|
|
14374
|
-
const A = /* @__PURE__ */ qA(), e = /* @__PURE__ */
|
|
14374
|
+
const A = /* @__PURE__ */ qA(), e = /* @__PURE__ */ C(), t = /* @__PURE__ */ M(), a = /* @__PURE__ */ O(), n = /* @__PURE__ */ BA(), s = /* @__PURE__ */ Vs(), i = /* @__PURE__ */ y1();
|
|
14375
14375
|
let r = class extends n.ConnectionFactoryBase {
|
|
14376
14376
|
create(o, l, c) {
|
|
14377
14377
|
const u = o.parameters.getProperty(a.PropertyId.ConversationTranslator_Host, s.ConversationConnectionConfig.host), d = o.parameters.getProperty(a.PropertyId.ConversationTranslator_CorrelationId, (0, e.createGuid)()), q = `wss://${u}${s.ConversationConnectionConfig.webSocketPath}`, V = o.parameters.getProperty(a.PropertyId.ConversationTranslator_Token, void 0);
|
|
@@ -14388,7 +14388,7 @@ var mn = {}, Tn = {}, jl;
|
|
|
14388
14388
|
function W1() {
|
|
14389
14389
|
if (jl) return Tn;
|
|
14390
14390
|
jl = 1, Object.defineProperty(Tn, "__esModule", { value: !0 }), Tn.ConversationRequestSession = void 0;
|
|
14391
|
-
const A = /* @__PURE__ */
|
|
14391
|
+
const A = /* @__PURE__ */ C();
|
|
14392
14392
|
let e = class {
|
|
14393
14393
|
constructor(a) {
|
|
14394
14394
|
this.privIsDisposed = !1, this.privDetachables = new Array(), this.privSessionId = a, this.privRequestId = (0, A.createNoDashGuid)(), this.privRequestCompletionDeferral = new A.Deferred();
|
|
@@ -14820,7 +14820,7 @@ var _l;
|
|
|
14820
14820
|
function K1() {
|
|
14821
14821
|
if (_l) return mn;
|
|
14822
14822
|
_l = 1, Object.defineProperty(mn, "__esModule", { value: !0 }), mn.ConversationServiceAdapter = void 0;
|
|
14823
|
-
const A = /* @__PURE__ */
|
|
14823
|
+
const A = /* @__PURE__ */ C(), e = /* @__PURE__ */ O(), t = /* @__PURE__ */ P(), a = /* @__PURE__ */ $c(), n = /* @__PURE__ */ W1(), s = /* @__PURE__ */ Au(), i = /* @__PURE__ */ eu(), r = /* @__PURE__ */ X1();
|
|
14824
14824
|
let p = class extends t.ServiceRecognizerBase {
|
|
14825
14825
|
constructor(l, c, u, d, q) {
|
|
14826
14826
|
super(l, c, u, d, q), this.privConnectionConfigPromise = void 0, this.privLastPartialUtteranceId = "", this.privConversationServiceConnector = q, this.privConversationAuthentication = l, this.receiveMessageOverride = () => this.receiveConversationMessageOverride(), this.recognizeOverride = () => this.noOp(), this.postConnectImplOverride = (V) => this.conversationConnectImpl(V), this.configConnectionOverride = () => this.configConnection(), this.disconnectOverride = () => this.privDisconnect(), this.privConversationRequestSession = new n.ConversationRequestSession((0, A.createNoDashGuid)()), this.privConversationConnectionFactory = c, this.privConversationIsDisposed = !1;
|
|
@@ -14972,10 +14972,10 @@ function K1() {
|
|
|
14972
14972
|
* 'LeaveSession' is sent when a user leaves the Conversation'.
|
|
14973
14973
|
*/
|
|
14974
14974
|
case "leavesession":
|
|
14975
|
-
const
|
|
14975
|
+
const x = {
|
|
14976
14976
|
id: f.participantId
|
|
14977
14977
|
};
|
|
14978
|
-
this.privConversationServiceConnector.participantLeaveCommandReceived && this.privConversationServiceConnector.participantLeaveCommandReceived(this.privConversationServiceConnector, new s.ParticipantEventArgs(
|
|
14978
|
+
this.privConversationServiceConnector.participantLeaveCommandReceived && this.privConversationServiceConnector.participantLeaveCommandReceived(this.privConversationServiceConnector, new s.ParticipantEventArgs(x, d));
|
|
14979
14979
|
break;
|
|
14980
14980
|
/**
|
|
14981
14981
|
* 'DisconnectSession' is sent when a user is disconnected from the session (e.g. network problem).
|
|
@@ -15063,7 +15063,7 @@ var $l;
|
|
|
15063
15063
|
function P1() {
|
|
15064
15064
|
if ($l) return de;
|
|
15065
15065
|
$l = 1, Object.defineProperty(de, "__esModule", { value: !0 }), de.ConversationTranslatorRecognizer = de.ConversationRecognizerFactory = void 0;
|
|
15066
|
-
const A = /* @__PURE__ */ P(), e = /* @__PURE__ */
|
|
15066
|
+
const A = /* @__PURE__ */ P(), e = /* @__PURE__ */ C(), t = /* @__PURE__ */ M(), a = /* @__PURE__ */ O(), n = /* @__PURE__ */ z1(), s = /* @__PURE__ */ K1();
|
|
15067
15067
|
class i {
|
|
15068
15068
|
static fromConfig(o, l, c) {
|
|
15069
15069
|
return new r(o, l, c);
|
|
@@ -15224,7 +15224,7 @@ var Sn = {}, A2;
|
|
|
15224
15224
|
function w1() {
|
|
15225
15225
|
if (A2) return Sn;
|
|
15226
15226
|
A2 = 1, Object.defineProperty(Sn, "__esModule", { value: !0 }), Sn.TranscriberRecognizer = void 0;
|
|
15227
|
-
const A = /* @__PURE__ */
|
|
15227
|
+
const A = /* @__PURE__ */ C(), e = /* @__PURE__ */ M(), t = /* @__PURE__ */ O(), a = /* @__PURE__ */ P(), n = /* @__PURE__ */ zA();
|
|
15228
15228
|
let s = class extends t.Recognizer {
|
|
15229
15229
|
/**
|
|
15230
15230
|
* TranscriberRecognizer constructor.
|
|
@@ -15396,7 +15396,7 @@ var Nn = {}, hA = {}, r2;
|
|
|
15396
15396
|
function x1() {
|
|
15397
15397
|
if (r2) return hA;
|
|
15398
15398
|
r2 = 1, Object.defineProperty(hA, "__esModule", { value: !0 }), hA.SynthesisStartedEvent = hA.ConnectingToSynthesisServiceEvent = hA.SynthesisTriggeredEvent = hA.SpeechSynthesisEvent = void 0;
|
|
15399
|
-
const A = /* @__PURE__ */
|
|
15399
|
+
const A = /* @__PURE__ */ C();
|
|
15400
15400
|
class e extends A.PlatformEvent {
|
|
15401
15401
|
constructor(i, r, p = A.EventType.Info) {
|
|
15402
15402
|
super(i, p), this.privRequestId = r;
|
|
@@ -15441,7 +15441,7 @@ var n2;
|
|
|
15441
15441
|
function Z1() {
|
|
15442
15442
|
if (n2) return Nn;
|
|
15443
15443
|
n2 = 1, Object.defineProperty(Nn, "__esModule", { value: !0 }), Nn.SynthesisTurn = void 0;
|
|
15444
|
-
const A = /* @__PURE__ */
|
|
15444
|
+
const A = /* @__PURE__ */ C(), e = /* @__PURE__ */ Ce(), t = /* @__PURE__ */ O(), a = /* @__PURE__ */ ru(), n = /* @__PURE__ */ x1();
|
|
15445
15445
|
let s = class As {
|
|
15446
15446
|
constructor() {
|
|
15447
15447
|
this.privIsDisposed = !1, this.privIsSynthesizing = !1, this.privIsSynthesisEnded = !1, this.privBytesReceived = 0, this.privInTurn = !1, this.privTextOffset = 0, this.privNextSearchTextIndex = 0, this.privSentenceOffset = 0, this.privNextSearchSentenceIndex = 0, this.privRequestId = (0, A.createNoDashGuid)(), this.privTurnDeferral = new A.Deferred(), this.privTurnDeferral.resolve();
|
|
@@ -15603,7 +15603,7 @@ var Un = {}, a2;
|
|
|
15603
15603
|
function J1() {
|
|
15604
15604
|
if (a2) return Un;
|
|
15605
15605
|
a2 = 1, Object.defineProperty(Un, "__esModule", { value: !0 }), Un.SynthesisAdapterBase = void 0;
|
|
15606
|
-
const A = /* @__PURE__ */
|
|
15606
|
+
const A = /* @__PURE__ */ C(), e = /* @__PURE__ */ O(), t = /* @__PURE__ */ P(), a = /* @__PURE__ */ oa();
|
|
15607
15607
|
let n = class {
|
|
15608
15608
|
constructor(i, r, p, o) {
|
|
15609
15609
|
if (this.speakOverride = void 0, this.receiveMessageOverride = void 0, this.connectImplOverride = void 0, this.configConnectionOverride = void 0, this.privConnectionConfigurationPromise = void 0, !i)
|
|
@@ -17899,7 +17899,7 @@ function $V({
|
|
|
17899
17899
|
audioSourceOff: L,
|
|
17900
17900
|
audioSourceReady: y,
|
|
17901
17901
|
canceled: g,
|
|
17902
|
-
firstAudibleChunk:
|
|
17902
|
+
firstAudibleChunk: x,
|
|
17903
17903
|
recognized: Z,
|
|
17904
17904
|
recognizing: F,
|
|
17905
17905
|
stop: J
|
|
@@ -17917,7 +17917,7 @@ function $V({
|
|
|
17917
17917
|
U ? (m = new Le("error", { error: "aborted" }), d = "abort") : (p(), d = "stop"), U && r.stopContinuousRecognitionAsync && await Hn(r.stopContinuousRecognitionAsync, r)();
|
|
17918
17918
|
else if (y)
|
|
17919
17919
|
this.dispatchEvent(new AA("audiostart")), v = !0;
|
|
17920
|
-
else if (
|
|
17920
|
+
else if (x)
|
|
17921
17921
|
this.dispatchEvent(new AA("soundstart")), c = !0;
|
|
17922
17922
|
else if (L) {
|
|
17923
17923
|
u && this.dispatchEvent(new AA("speechend")), c && this.dispatchEvent(new AA("soundend")), v && this.dispatchEvent(new AA("audioend")), v = c = u = !1;
|
|
@@ -20077,7 +20077,7 @@ const td = (A) => {
|
|
|
20077
20077
|
responseType: L,
|
|
20078
20078
|
headers: y,
|
|
20079
20079
|
withCredentials: g = "same-origin",
|
|
20080
|
-
fetchOptions:
|
|
20080
|
+
fetchOptions: x
|
|
20081
20081
|
} = td(q), Z = e || fetch;
|
|
20082
20082
|
L = L ? (L + "").toLowerCase() : "text";
|
|
20083
20083
|
let F = Em([m, T && T.toAbortSignal()], S), J = null;
|
|
@@ -20102,7 +20102,7 @@ const td = (A) => {
|
|
|
20102
20102
|
}
|
|
20103
20103
|
N.isString(g) || (g = g ? "include" : "omit");
|
|
20104
20104
|
const B = s && "credentials" in t.prototype, _ = {
|
|
20105
|
-
...
|
|
20105
|
+
...x,
|
|
20106
20106
|
signal: F,
|
|
20107
20107
|
method: f.toUpperCase(),
|
|
20108
20108
|
headers: y.normalize().toJSON(),
|
|
@@ -20111,7 +20111,7 @@ const td = (A) => {
|
|
|
20111
20111
|
credentials: B ? g : void 0
|
|
20112
20112
|
};
|
|
20113
20113
|
J = s && new t(V, _);
|
|
20114
|
-
let E = await (s ? Z(J,
|
|
20114
|
+
let E = await (s ? Z(J, x) : Z(V, _));
|
|
20115
20115
|
const z = l && (L === "stream" || L === "response");
|
|
20116
20116
|
if (l && (b || z && H)) {
|
|
20117
20117
|
const W = {};
|
|
@@ -20751,7 +20751,7 @@ function lT({
|
|
|
20751
20751
|
U(""), L.current = "", V(), m(!0);
|
|
20752
20752
|
}, [V]), g = aA(() => {
|
|
20753
20753
|
T || (m(!1), f && d(), V());
|
|
20754
|
-
}, [f, d, T, V]),
|
|
20754
|
+
}, [f, d, T, V]), x = aA(() => {
|
|
20755
20755
|
L.current = b, V(), q(a);
|
|
20756
20756
|
}, [q, a, b, V]), Z = aA(() => {
|
|
20757
20757
|
console.log("Abort Listening"), d();
|
|
@@ -20873,7 +20873,7 @@ function lT({
|
|
|
20873
20873
|
onClose: g,
|
|
20874
20874
|
isListening: f,
|
|
20875
20875
|
transcript: b,
|
|
20876
|
-
onStartListening:
|
|
20876
|
+
onStartListening: x,
|
|
20877
20877
|
onStopListening: Z,
|
|
20878
20878
|
onResetTranscript: V,
|
|
20879
20879
|
onGenerate: F,
|
|
@@ -21124,7 +21124,7 @@ function fT() {
|
|
|
21124
21124
|
l,
|
|
21125
21125
|
"GeneratorFunction"
|
|
21126
21126
|
);
|
|
21127
|
-
function
|
|
21127
|
+
function x(z) {
|
|
21128
21128
|
["next", "throw", "return"].forEach(function(h) {
|
|
21129
21129
|
c(z, h, function(W) {
|
|
21130
21130
|
return this._invoke(h, W);
|
|
@@ -21187,7 +21187,7 @@ function fT() {
|
|
|
21187
21187
|
}
|
|
21188
21188
|
s(this, "_invoke", { value: X });
|
|
21189
21189
|
}
|
|
21190
|
-
|
|
21190
|
+
x(Z.prototype), c(Z.prototype, o, function() {
|
|
21191
21191
|
return this;
|
|
21192
21192
|
}), t.AsyncIterator = Z, t.async = function(z, h, W, K, X) {
|
|
21193
21193
|
X === void 0 && (X = Promise);
|
|
@@ -21256,7 +21256,7 @@ function fT() {
|
|
|
21256
21256
|
return G;
|
|
21257
21257
|
return h.delegate = null, m;
|
|
21258
21258
|
}
|
|
21259
|
-
|
|
21259
|
+
x(g), c(g, l, "Generator"), c(g, p, function() {
|
|
21260
21260
|
return this;
|
|
21261
21261
|
}), c(g, "toString", function() {
|
|
21262
21262
|
return "[object Generator]";
|
|
@@ -21425,33 +21425,13 @@ function Gb({
|
|
|
21425
21425
|
onGenerate: p,
|
|
21426
21426
|
onGenerateComplete: o,
|
|
21427
21427
|
onGenerateError: l,
|
|
21428
|
-
apiKey: c = ""
|
|
21428
|
+
apiKey: c = "YCpjZ6ez98Qp7AMR7Eh1rtdwG1TZgyDO"
|
|
21429
21429
|
}) {
|
|
21430
|
-
const [u, d] = cA(a), [q, V] = cA(t), [f, v] = cA(null), [m, T] = cA(null), [S, b] = cA(!1), {
|
|
21431
|
-
transcript: U,
|
|
21432
|
-
interimTranscript: L,
|
|
21433
|
-
finalTranscript: y,
|
|
21434
|
-
listening: g,
|
|
21435
|
-
resetTranscript: C,
|
|
21436
|
-
browserSupportsSpeechRecognition: Z,
|
|
21437
|
-
isMicrophoneAvailable: F
|
|
21438
|
-
} = pq(), J = aA((h) => {
|
|
21430
|
+
const [u, d] = cA(a), [q, V] = cA(t), [f, v] = cA(null), [m, T] = cA(null), [S, b] = cA(!1), U = aA((h) => {
|
|
21439
21431
|
d(h);
|
|
21440
|
-
}, []),
|
|
21432
|
+
}, []), L = aA(() => {
|
|
21441
21433
|
d((h) => !h);
|
|
21442
|
-
}, []),
|
|
21443
|
-
async (h) => {
|
|
21444
|
-
const W = h?.language || e?.language || "th-TH", K = h?.continuous ?? e?.continuous ?? !0, X = h?.interimResults ?? e?.interimResults ?? !0;
|
|
21445
|
-
await FA.startListening({
|
|
21446
|
-
language: W,
|
|
21447
|
-
continuous: K,
|
|
21448
|
-
interimResults: X
|
|
21449
|
-
});
|
|
21450
|
-
},
|
|
21451
|
-
[e]
|
|
21452
|
-
), B = aA(() => {
|
|
21453
|
-
}, []), _ = aA(() => {
|
|
21454
|
-
}, []), E = aA(async () => {
|
|
21434
|
+
}, []), y = aA(async () => {
|
|
21455
21435
|
try {
|
|
21456
21436
|
V(!0), T(null), b(!1);
|
|
21457
21437
|
const h = await ss.getAzureToken(c);
|
|
@@ -21474,42 +21454,63 @@ function Gb({
|
|
|
21474
21454
|
}
|
|
21475
21455
|
}, [c]);
|
|
21476
21456
|
wn(() => {
|
|
21477
|
-
t &&
|
|
21478
|
-
}, [t,
|
|
21479
|
-
const
|
|
21457
|
+
t && y();
|
|
21458
|
+
}, [t, y]);
|
|
21459
|
+
const {
|
|
21460
|
+
transcript: g,
|
|
21461
|
+
interimTranscript: x,
|
|
21462
|
+
finalTranscript: Z,
|
|
21463
|
+
listening: F,
|
|
21464
|
+
resetTranscript: J,
|
|
21465
|
+
browserSupportsSpeechRecognition: H,
|
|
21466
|
+
isMicrophoneAvailable: R
|
|
21467
|
+
} = pq(), B = aA(
|
|
21468
|
+
async (h) => {
|
|
21469
|
+
const W = h?.language || e?.language || "th-TH", K = h?.continuous ?? e?.continuous ?? !0, X = h?.interimResults ?? e?.interimResults ?? !0;
|
|
21470
|
+
await FA.startListening({
|
|
21471
|
+
language: W,
|
|
21472
|
+
continuous: K,
|
|
21473
|
+
interimResults: X
|
|
21474
|
+
});
|
|
21475
|
+
},
|
|
21476
|
+
[e]
|
|
21477
|
+
), _ = aA(() => {
|
|
21478
|
+
}, []), E = aA(() => {
|
|
21479
|
+
console.log("Abort Listening"), console.log("isAzureReady", S), console.log("Abort Listening Success");
|
|
21480
|
+
}, [S]), z = kd(
|
|
21480
21481
|
() => ({
|
|
21481
|
-
transcript:
|
|
21482
|
-
interimTranscript:
|
|
21483
|
-
finalTranscript:
|
|
21484
|
-
isListening:
|
|
21485
|
-
browserSupportsSpeechRecognition:
|
|
21486
|
-
isMicrophoneAvailable:
|
|
21487
|
-
startListening:
|
|
21488
|
-
stopListening:
|
|
21489
|
-
abortListening:
|
|
21490
|
-
resetTranscript:
|
|
21482
|
+
transcript: g,
|
|
21483
|
+
interimTranscript: x,
|
|
21484
|
+
finalTranscript: Z,
|
|
21485
|
+
isListening: F,
|
|
21486
|
+
browserSupportsSpeechRecognition: H,
|
|
21487
|
+
isMicrophoneAvailable: R,
|
|
21488
|
+
startListening: B,
|
|
21489
|
+
stopListening: _,
|
|
21490
|
+
abortListening: E,
|
|
21491
|
+
resetTranscript: J,
|
|
21491
21492
|
isWidgetEnabled: u,
|
|
21492
|
-
setWidgetEnabled:
|
|
21493
|
-
toggleWidget:
|
|
21493
|
+
setWidgetEnabled: U,
|
|
21494
|
+
toggleWidget: L,
|
|
21494
21495
|
azureToken: f,
|
|
21495
21496
|
isAzureReady: S,
|
|
21496
21497
|
azureError: m,
|
|
21497
21498
|
apiKey: c
|
|
21498
21499
|
}),
|
|
21499
21500
|
[
|
|
21500
|
-
U,
|
|
21501
|
-
L,
|
|
21502
|
-
y,
|
|
21503
21501
|
g,
|
|
21502
|
+
x,
|
|
21504
21503
|
Z,
|
|
21505
21504
|
F,
|
|
21505
|
+
H,
|
|
21506
21506
|
R,
|
|
21507
21507
|
B,
|
|
21508
21508
|
_,
|
|
21509
|
-
|
|
21510
|
-
u,
|
|
21509
|
+
E,
|
|
21511
21510
|
J,
|
|
21512
|
-
|
|
21511
|
+
u,
|
|
21512
|
+
U,
|
|
21513
|
+
L,
|
|
21513
21514
|
f,
|
|
21514
21515
|
S,
|
|
21515
21516
|
m,
|
|
@@ -21532,14 +21533,14 @@ function Gb({
|
|
|
21532
21533
|
onGenerate: p,
|
|
21533
21534
|
onGenerateComplete: o,
|
|
21534
21535
|
onGenerateError: l,
|
|
21535
|
-
abortListening:
|
|
21536
|
-
startListening:
|
|
21537
|
-
stopListening:
|
|
21538
|
-
resetTranscript:
|
|
21539
|
-
transcript:
|
|
21540
|
-
isListening:
|
|
21541
|
-
browserSupportsSpeechRecognition:
|
|
21542
|
-
isMicrophoneAvailable:
|
|
21536
|
+
abortListening: E,
|
|
21537
|
+
startListening: B,
|
|
21538
|
+
stopListening: _,
|
|
21539
|
+
resetTranscript: J,
|
|
21540
|
+
transcript: g,
|
|
21541
|
+
isListening: F,
|
|
21542
|
+
browserSupportsSpeechRecognition: H,
|
|
21543
|
+
isMicrophoneAvailable: R
|
|
21543
21544
|
}
|
|
21544
21545
|
)
|
|
21545
21546
|
] });
|