speechstate 2.4.0 → 2.4.1-pr9-1.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.
- package/dist/asr.d.ts +425 -98
- package/dist/asr.d.ts.map +1 -1
- package/dist/getToken.d.ts +1 -1
- package/dist/getToken.d.ts.map +1 -1
- package/dist/speechstate.d.ts +8953 -1
- package/dist/speechstate.d.ts.map +1 -1
- package/dist/speechstate.js +71 -65
- package/dist/tts.d.ts +565 -106
- package/dist/tts.d.ts.map +1 -1
- package/dist/tts.js +19 -5
- package/dist/types.d.ts +121 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +14 -4
package/dist/asr.d.ts
CHANGED
|
@@ -1,95 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
import { RecogniseParameters, Hypothesis, AzureSpeechCredentials, AzureLanguageCredentials } from "./types";
|
|
3
|
-
interface MySpeechRecognition extends SpeechRecognition {
|
|
4
|
-
new (): any;
|
|
5
|
-
}
|
|
6
|
-
interface MySpeechGrammarList extends SpeechGrammarList {
|
|
7
|
-
new (): any;
|
|
8
|
-
}
|
|
9
|
-
type ASREvent = {
|
|
10
|
-
type: "READY";
|
|
11
|
-
value: {
|
|
12
|
-
wsaASR: MySpeechRecognition;
|
|
13
|
-
wsaGrammarList: MySpeechGrammarList;
|
|
14
|
-
};
|
|
15
|
-
} | {
|
|
16
|
-
type: "ERROR";
|
|
17
|
-
} | {
|
|
18
|
-
type: "NOINPUT";
|
|
19
|
-
} | {
|
|
20
|
-
type: "CONTROL";
|
|
21
|
-
} | {
|
|
22
|
-
type: "START";
|
|
23
|
-
value?: RecogniseParameters;
|
|
24
|
-
} | {
|
|
25
|
-
type: "STARTED";
|
|
26
|
-
value: {
|
|
27
|
-
wsaASRinstance: MySpeechRecognition;
|
|
28
|
-
};
|
|
29
|
-
} | {
|
|
30
|
-
type: "STARTSPEECH";
|
|
31
|
-
} | {
|
|
32
|
-
type: "RECOGNISED";
|
|
33
|
-
} | {
|
|
34
|
-
type: "RESULT";
|
|
35
|
-
value: Hypothesis[];
|
|
36
|
-
};
|
|
37
|
-
interface ASRContext extends ASRInit {
|
|
38
|
-
azureAuthorizationToken?: string;
|
|
39
|
-
wsaASR?: MySpeechRecognition;
|
|
40
|
-
wsaASRinstance?: MySpeechRecognition;
|
|
41
|
-
wsaGrammarList?: MySpeechGrammarList;
|
|
42
|
-
result?: Hypothesis[];
|
|
43
|
-
nluResult?: any;
|
|
44
|
-
params?: RecogniseParameters;
|
|
45
|
-
}
|
|
46
|
-
interface ASRInit {
|
|
47
|
-
asrDefaultCompleteTimeout: number;
|
|
48
|
-
asrDefaultNoInputTimeout: number;
|
|
49
|
-
locale: string;
|
|
50
|
-
audioContext: AudioContext;
|
|
51
|
-
azureCredentials: string | AzureSpeechCredentials;
|
|
52
|
-
azureRegion: string;
|
|
53
|
-
speechRecognitionEndpointId?: string;
|
|
54
|
-
azureLanguageCredentials?: AzureLanguageCredentials;
|
|
55
|
-
}
|
|
56
|
-
interface ASRPonyfillInput {
|
|
57
|
-
audioContext: AudioContext;
|
|
58
|
-
azureAuthorizationToken: string;
|
|
59
|
-
azureRegion: string;
|
|
60
|
-
speechRecognitionEndpointId?: string;
|
|
61
|
-
}
|
|
1
|
+
import { ASRContext, ASREvent, ASRInit, ASRPonyfillInput, Hypothesis, AzureLanguageCredentials } from "./types";
|
|
62
2
|
export declare const asrMachine: import("xstate").StateMachine<ASRContext, ASREvent, {
|
|
63
|
-
[x: string]: import("xstate").
|
|
64
|
-
[k: string]: unknown;
|
|
65
|
-
type: string;
|
|
66
|
-
}, import("xstate").EventObject> | import("xstate").ActorRef<import("xstate").CallbackSnapshot<ASRPonyfillInput>, null, import("xstate").EventObject> | import("xstate").ActorRef<import("xstate").CallbackSnapshot<any>, import("xstate").EventObject, import("xstate").EventObject> | import("xstate").ActorRef<import("xstate").PromiseSnapshot<any, AzureLanguageCredentials & {
|
|
3
|
+
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<string, any, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").CallbackActorLogic<null, ASRPonyfillInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").CallbackActorLogic<import("xstate").EventObject, any, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<any, AzureLanguageCredentials & {
|
|
67
4
|
query: string;
|
|
68
|
-
}
|
|
69
|
-
[k: string]: unknown;
|
|
70
|
-
type: string;
|
|
71
|
-
}, import("xstate").EventObject>;
|
|
5
|
+
}, import("xstate").EventObject>>;
|
|
72
6
|
}, import("xstate").Values<{
|
|
73
7
|
getToken: {
|
|
74
8
|
src: "getToken";
|
|
75
|
-
logic: import("xstate").PromiseActorLogic<string, any>;
|
|
9
|
+
logic: import("xstate").PromiseActorLogic<string, any, import("xstate").EventObject>;
|
|
76
10
|
id: string;
|
|
77
11
|
};
|
|
78
12
|
ponyfill: {
|
|
79
13
|
src: "ponyfill";
|
|
80
|
-
logic: import("xstate").CallbackActorLogic<null, ASRPonyfillInput>;
|
|
14
|
+
logic: import("xstate").CallbackActorLogic<null, ASRPonyfillInput, import("xstate").EventObject>;
|
|
81
15
|
id: string;
|
|
82
16
|
};
|
|
83
17
|
recStart: {
|
|
84
18
|
src: "recStart";
|
|
85
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, any>;
|
|
19
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, any, import("xstate").EventObject>;
|
|
86
20
|
id: string;
|
|
87
21
|
};
|
|
88
22
|
nluPromise: {
|
|
89
23
|
src: "nluPromise";
|
|
90
24
|
logic: import("xstate").PromiseActorLogic<any, AzureLanguageCredentials & {
|
|
91
25
|
query: string;
|
|
92
|
-
}>;
|
|
26
|
+
}, import("xstate").EventObject>;
|
|
93
27
|
id: string;
|
|
94
28
|
};
|
|
95
29
|
}>, {
|
|
@@ -97,32 +31,425 @@ export declare const asrMachine: import("xstate").StateMachine<ASRContext, ASREv
|
|
|
97
31
|
params: unknown;
|
|
98
32
|
}, never, never, "GetToken" | "Ready" | "Paused" | "Fail" | "Ponyfill" | {
|
|
99
33
|
Recognising?: "WaitForRecogniser" | "NoInput" | "InProgress" | "Match" | "NLURequest";
|
|
100
|
-
}, string, ASRInit, {}, import("xstate").EventObject, import("xstate").
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
34
|
+
}, string, ASRInit, {}, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
35
|
+
readonly id: "asr";
|
|
36
|
+
readonly context: ({ input }: {
|
|
37
|
+
spawn: {
|
|
38
|
+
<TSrc extends "getToken" | "ponyfill" | "recStart" | "nluPromise">(logic: TSrc, ...[options]: ({
|
|
39
|
+
src: "getToken";
|
|
40
|
+
logic: import("xstate").PromiseActorLogic<string, any, import("xstate").EventObject>;
|
|
41
|
+
id: string;
|
|
42
|
+
} extends infer T ? T extends {
|
|
43
|
+
src: "getToken";
|
|
44
|
+
logic: import("xstate").PromiseActorLogic<string, any, import("xstate").EventObject>;
|
|
45
|
+
id: string;
|
|
46
|
+
} ? T extends {
|
|
47
|
+
src: TSrc;
|
|
48
|
+
} ? import("xstate").ConditionalRequired<[options?: {
|
|
49
|
+
id?: T["id"];
|
|
50
|
+
systemId?: string;
|
|
51
|
+
input?: import("xstate").InputFrom<T["logic"]>;
|
|
52
|
+
syncSnapshot?: boolean;
|
|
53
|
+
} & { [K in import("xstate").RequiredActorOptions<T>]: unknown; }], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T>>> : never : never : never) | ({
|
|
54
|
+
src: "ponyfill";
|
|
55
|
+
logic: import("xstate").CallbackActorLogic<null, ASRPonyfillInput, import("xstate").EventObject>;
|
|
56
|
+
id: string;
|
|
57
|
+
} extends infer T_1 ? T_1 extends {
|
|
58
|
+
src: "ponyfill";
|
|
59
|
+
logic: import("xstate").CallbackActorLogic<null, ASRPonyfillInput, import("xstate").EventObject>;
|
|
60
|
+
id: string;
|
|
61
|
+
} ? T_1 extends {
|
|
62
|
+
src: TSrc;
|
|
63
|
+
} ? import("xstate").ConditionalRequired<[options?: {
|
|
64
|
+
id?: T_1["id"];
|
|
65
|
+
systemId?: string;
|
|
66
|
+
input?: import("xstate").InputFrom<T_1["logic"]>;
|
|
67
|
+
syncSnapshot?: boolean;
|
|
68
|
+
} & { [K_1 in import("xstate").RequiredActorOptions<T_1>]: unknown; }], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T_1>>> : never : never : never) | ({
|
|
69
|
+
src: "recStart";
|
|
70
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, any, import("xstate").EventObject>;
|
|
71
|
+
id: string;
|
|
72
|
+
} extends infer T_2 ? T_2 extends {
|
|
73
|
+
src: "recStart";
|
|
74
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, any, import("xstate").EventObject>;
|
|
75
|
+
id: string;
|
|
76
|
+
} ? T_2 extends {
|
|
77
|
+
src: TSrc;
|
|
78
|
+
} ? import("xstate").ConditionalRequired<[options?: {
|
|
79
|
+
id?: T_2["id"];
|
|
80
|
+
systemId?: string;
|
|
81
|
+
input?: import("xstate").InputFrom<T_2["logic"]>;
|
|
82
|
+
syncSnapshot?: boolean;
|
|
83
|
+
} & { [K_2 in import("xstate").RequiredActorOptions<T_2>]: unknown; }], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T_2>>> : never : never : never) | ({
|
|
84
|
+
src: "nluPromise";
|
|
85
|
+
logic: import("xstate").PromiseActorLogic<any, AzureLanguageCredentials & {
|
|
86
|
+
query: string;
|
|
87
|
+
}, import("xstate").EventObject>;
|
|
88
|
+
id: string;
|
|
89
|
+
} extends infer T_3 ? T_3 extends {
|
|
90
|
+
src: "nluPromise";
|
|
91
|
+
logic: import("xstate").PromiseActorLogic<any, AzureLanguageCredentials & {
|
|
92
|
+
query: string;
|
|
93
|
+
}, import("xstate").EventObject>;
|
|
94
|
+
id: string;
|
|
95
|
+
} ? T_3 extends {
|
|
96
|
+
src: TSrc;
|
|
97
|
+
} ? import("xstate").ConditionalRequired<[options?: {
|
|
98
|
+
id?: T_3["id"];
|
|
99
|
+
systemId?: string;
|
|
100
|
+
input?: import("xstate").InputFrom<T_3["logic"]>;
|
|
101
|
+
syncSnapshot?: boolean;
|
|
102
|
+
} & { [K_3 in import("xstate").RequiredActorOptions<T_3>]: unknown; }], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T_3>>> : never : never : never)): import("xstate").ActorRefFromLogic<import("xstate").GetConcreteByKey<import("xstate").Values<{
|
|
103
|
+
getToken: {
|
|
104
|
+
src: "getToken";
|
|
105
|
+
logic: import("xstate").PromiseActorLogic<string, any, import("xstate").EventObject>;
|
|
106
|
+
id: string;
|
|
107
|
+
};
|
|
108
|
+
ponyfill: {
|
|
109
|
+
src: "ponyfill";
|
|
110
|
+
logic: import("xstate").CallbackActorLogic<null, ASRPonyfillInput, import("xstate").EventObject>;
|
|
111
|
+
id: string;
|
|
112
|
+
};
|
|
113
|
+
recStart: {
|
|
114
|
+
src: "recStart";
|
|
115
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, any, import("xstate").EventObject>;
|
|
116
|
+
id: string;
|
|
117
|
+
};
|
|
118
|
+
nluPromise: {
|
|
119
|
+
src: "nluPromise";
|
|
120
|
+
logic: import("xstate").PromiseActorLogic<any, AzureLanguageCredentials & {
|
|
121
|
+
query: string;
|
|
122
|
+
}, import("xstate").EventObject>;
|
|
123
|
+
id: string;
|
|
124
|
+
};
|
|
125
|
+
}>, "src", TSrc>["logic"]>;
|
|
126
|
+
<TLogic extends import("xstate").AnyActorLogic>(src: TLogic, options?: {
|
|
127
|
+
id?: never;
|
|
128
|
+
systemId?: string;
|
|
129
|
+
input?: import("xstate").InputFrom<TLogic>;
|
|
130
|
+
syncSnapshot?: boolean;
|
|
131
|
+
}): import("xstate").ActorRefFromLogic<TLogic>;
|
|
132
|
+
};
|
|
133
|
+
input: ASRInit;
|
|
134
|
+
self: import("xstate").ActorRef<import("xstate").MachineSnapshot<ASRContext, ASREvent, Record<string, import("xstate").AnyActorRef>, import("xstate").StateValue, string, unknown, any, any>, ASREvent, import("xstate").AnyEventObject>;
|
|
135
|
+
}) => {
|
|
136
|
+
asrDefaultCompleteTimeout: number;
|
|
137
|
+
asrDefaultNoInputTimeout: number;
|
|
138
|
+
locale: string;
|
|
139
|
+
audioContext: AudioContext;
|
|
140
|
+
azureCredentials: string | import("./types").AzureSpeechCredentials;
|
|
141
|
+
azureRegion: string;
|
|
142
|
+
azureLanguageCredentials: AzureLanguageCredentials;
|
|
143
|
+
speechRecognitionEndpointId: string;
|
|
105
144
|
};
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
145
|
+
readonly initial: "GetToken";
|
|
146
|
+
readonly on: {
|
|
147
|
+
readonly READY: {
|
|
148
|
+
readonly target: ".Ready";
|
|
149
|
+
readonly actions: readonly [import("xstate").ActionFunction<ASRContext, {
|
|
150
|
+
type: "READY";
|
|
151
|
+
value: {
|
|
152
|
+
wsaASR: import("./types").MySpeechRecognition;
|
|
153
|
+
wsaGrammarList: import("./types").MySpeechGrammarList;
|
|
154
|
+
};
|
|
155
|
+
}, ASREvent, undefined, import("xstate").Values<{
|
|
156
|
+
getToken: {
|
|
157
|
+
src: "getToken";
|
|
158
|
+
logic: import("xstate").PromiseActorLogic<string, any, import("xstate").EventObject>;
|
|
159
|
+
id: string;
|
|
160
|
+
};
|
|
161
|
+
ponyfill: {
|
|
162
|
+
src: "ponyfill";
|
|
163
|
+
logic: import("xstate").CallbackActorLogic<null, ASRPonyfillInput, import("xstate").EventObject>;
|
|
164
|
+
id: string;
|
|
165
|
+
};
|
|
166
|
+
recStart: {
|
|
167
|
+
src: "recStart";
|
|
168
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, any, import("xstate").EventObject>;
|
|
169
|
+
id: string;
|
|
170
|
+
};
|
|
171
|
+
nluPromise: {
|
|
172
|
+
src: "nluPromise";
|
|
173
|
+
logic: import("xstate").PromiseActorLogic<any, AzureLanguageCredentials & {
|
|
174
|
+
query: string;
|
|
175
|
+
}, import("xstate").EventObject>;
|
|
176
|
+
id: string;
|
|
177
|
+
};
|
|
178
|
+
}>, never, never, never, never>, import("xstate").ActionFunction<ASRContext, {
|
|
179
|
+
type: "READY";
|
|
180
|
+
value: {
|
|
181
|
+
wsaASR: import("./types").MySpeechRecognition;
|
|
182
|
+
wsaGrammarList: import("./types").MySpeechGrammarList;
|
|
183
|
+
};
|
|
184
|
+
}, ASREvent, undefined, never, never, never, never, never>];
|
|
185
|
+
};
|
|
115
186
|
};
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
187
|
+
readonly states: {
|
|
188
|
+
readonly Fail: {};
|
|
189
|
+
readonly Ready: {
|
|
190
|
+
readonly on: {
|
|
191
|
+
readonly START: {
|
|
192
|
+
readonly target: "Recognising";
|
|
193
|
+
readonly actions: import("xstate").ActionFunction<ASRContext, {
|
|
194
|
+
type: "START";
|
|
195
|
+
value?: import("./types").RecogniseParameters;
|
|
196
|
+
}, ASREvent, undefined, import("xstate").Values<{
|
|
197
|
+
getToken: {
|
|
198
|
+
src: "getToken";
|
|
199
|
+
logic: import("xstate").PromiseActorLogic<string, any, import("xstate").EventObject>;
|
|
200
|
+
id: string;
|
|
201
|
+
};
|
|
202
|
+
ponyfill: {
|
|
203
|
+
src: "ponyfill";
|
|
204
|
+
logic: import("xstate").CallbackActorLogic<null, ASRPonyfillInput, import("xstate").EventObject>;
|
|
205
|
+
id: string;
|
|
206
|
+
};
|
|
207
|
+
recStart: {
|
|
208
|
+
src: "recStart";
|
|
209
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, any, import("xstate").EventObject>;
|
|
210
|
+
id: string;
|
|
211
|
+
};
|
|
212
|
+
nluPromise: {
|
|
213
|
+
src: "nluPromise";
|
|
214
|
+
logic: import("xstate").PromiseActorLogic<any, AzureLanguageCredentials & {
|
|
215
|
+
query: string;
|
|
216
|
+
}, import("xstate").EventObject>;
|
|
217
|
+
id: string;
|
|
218
|
+
};
|
|
219
|
+
}>, never, never, never, never>;
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
readonly Recognising: {
|
|
224
|
+
readonly initial: "WaitForRecogniser";
|
|
225
|
+
readonly invoke: {
|
|
226
|
+
readonly id: "recStart";
|
|
227
|
+
readonly input: ({ context }: {
|
|
228
|
+
context: any;
|
|
229
|
+
}) => {
|
|
230
|
+
wsaASR: any;
|
|
231
|
+
wsaGrammarList: any;
|
|
232
|
+
locale: any;
|
|
233
|
+
phrases: any;
|
|
234
|
+
};
|
|
235
|
+
readonly src: "recStart";
|
|
236
|
+
};
|
|
237
|
+
readonly exit: "recStop";
|
|
238
|
+
readonly on: {
|
|
239
|
+
readonly RESULT: {
|
|
240
|
+
readonly actions: readonly [import("xstate").ActionFunction<ASRContext, {
|
|
241
|
+
type: "RESULT";
|
|
242
|
+
value: Hypothesis[];
|
|
243
|
+
}, ASREvent, undefined, import("xstate").Values<{
|
|
244
|
+
getToken: {
|
|
245
|
+
src: "getToken";
|
|
246
|
+
logic: import("xstate").PromiseActorLogic<string, any, import("xstate").EventObject>;
|
|
247
|
+
id: string;
|
|
248
|
+
};
|
|
249
|
+
ponyfill: {
|
|
250
|
+
src: "ponyfill";
|
|
251
|
+
logic: import("xstate").CallbackActorLogic<null, ASRPonyfillInput, import("xstate").EventObject>;
|
|
252
|
+
id: string;
|
|
253
|
+
};
|
|
254
|
+
recStart: {
|
|
255
|
+
src: "recStart";
|
|
256
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, any, import("xstate").EventObject>;
|
|
257
|
+
id: string;
|
|
258
|
+
};
|
|
259
|
+
nluPromise: {
|
|
260
|
+
src: "nluPromise";
|
|
261
|
+
logic: import("xstate").PromiseActorLogic<any, AzureLanguageCredentials & {
|
|
262
|
+
query: string;
|
|
263
|
+
}, import("xstate").EventObject>;
|
|
264
|
+
id: string;
|
|
265
|
+
};
|
|
266
|
+
}>, never, never, never, never>, import("xstate").CancelAction<ASRContext, {
|
|
267
|
+
type: "RESULT";
|
|
268
|
+
value: Hypothesis[];
|
|
269
|
+
}, undefined, ASREvent>];
|
|
270
|
+
readonly target: ".Match";
|
|
271
|
+
};
|
|
272
|
+
readonly RECOGNISED: readonly [{
|
|
273
|
+
readonly target: ".NLURequest";
|
|
274
|
+
readonly guard: ({ context }: import("xstate/dist/declarations/src/guards").GuardArgs<ASRContext, {
|
|
275
|
+
type: "RECOGNISED";
|
|
276
|
+
}>) => boolean;
|
|
277
|
+
}, {
|
|
278
|
+
readonly target: "Ready";
|
|
279
|
+
readonly actions: readonly [import("xstate").ActionFunction<ASRContext, {
|
|
280
|
+
type: "RECOGNISED";
|
|
281
|
+
}, ASREvent, undefined, never, never, never, never, never>];
|
|
282
|
+
}];
|
|
283
|
+
readonly CONTROL: {
|
|
284
|
+
readonly target: "Paused";
|
|
285
|
+
};
|
|
286
|
+
readonly STOP: {
|
|
287
|
+
readonly target: "Ready";
|
|
288
|
+
};
|
|
289
|
+
readonly NOINPUT: {
|
|
290
|
+
readonly actions: import("xstate").ActionFunction<ASRContext, {
|
|
291
|
+
type: "NOINPUT";
|
|
292
|
+
}, ASREvent, undefined, never, never, never, never, never>;
|
|
293
|
+
readonly target: "Ready";
|
|
294
|
+
};
|
|
295
|
+
};
|
|
296
|
+
readonly states: {
|
|
297
|
+
readonly WaitForRecogniser: {
|
|
298
|
+
readonly on: {
|
|
299
|
+
readonly STARTED: {
|
|
300
|
+
readonly target: "NoInput";
|
|
301
|
+
readonly actions: readonly [import("xstate").ActionFunction<ASRContext, {
|
|
302
|
+
type: "STARTED";
|
|
303
|
+
value: {
|
|
304
|
+
wsaASRinstance: import("./types").MySpeechRecognition;
|
|
305
|
+
};
|
|
306
|
+
}, ASREvent, undefined, import("xstate").Values<{
|
|
307
|
+
getToken: {
|
|
308
|
+
src: "getToken";
|
|
309
|
+
logic: import("xstate").PromiseActorLogic<string, any, import("xstate").EventObject>;
|
|
310
|
+
id: string;
|
|
311
|
+
};
|
|
312
|
+
ponyfill: {
|
|
313
|
+
src: "ponyfill";
|
|
314
|
+
logic: import("xstate").CallbackActorLogic<null, ASRPonyfillInput, import("xstate").EventObject>;
|
|
315
|
+
id: string;
|
|
316
|
+
};
|
|
317
|
+
recStart: {
|
|
318
|
+
src: "recStart";
|
|
319
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, any, import("xstate").EventObject>;
|
|
320
|
+
id: string;
|
|
321
|
+
};
|
|
322
|
+
nluPromise: {
|
|
323
|
+
src: "nluPromise";
|
|
324
|
+
logic: import("xstate").PromiseActorLogic<any, AzureLanguageCredentials & {
|
|
325
|
+
query: string;
|
|
326
|
+
}, import("xstate").EventObject>;
|
|
327
|
+
id: string;
|
|
328
|
+
};
|
|
329
|
+
}>, never, never, never, never>, import("xstate").ActionFunction<ASRContext, {
|
|
330
|
+
type: "STARTED";
|
|
331
|
+
value: {
|
|
332
|
+
wsaASRinstance: import("./types").MySpeechRecognition;
|
|
333
|
+
};
|
|
334
|
+
}, ASREvent, undefined, never, never, never, never, never>];
|
|
335
|
+
};
|
|
336
|
+
};
|
|
337
|
+
};
|
|
338
|
+
readonly NoInput: {
|
|
339
|
+
readonly entry: readonly [import("xstate").ActionFunction<ASRContext, ASREvent, ASREvent, undefined, never, never, never, never, never>];
|
|
340
|
+
readonly on: {
|
|
341
|
+
readonly STARTSPEECH: {
|
|
342
|
+
readonly target: "InProgress";
|
|
343
|
+
readonly actions: import("xstate").CancelAction<ASRContext, {
|
|
344
|
+
type: "STARTSPEECH";
|
|
345
|
+
}, undefined, ASREvent>;
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
readonly exit: readonly [import("xstate").CancelAction<ASRContext, ASREvent, undefined, ASREvent>];
|
|
349
|
+
};
|
|
350
|
+
readonly InProgress: {
|
|
351
|
+
readonly entry: () => void;
|
|
352
|
+
};
|
|
353
|
+
readonly Match: {
|
|
354
|
+
readonly entry: readonly [({ context }: import("xstate").ActionArgs<ASRContext, ASREvent, ASREvent>) => void, import("xstate").ActionFunction<ASRContext, ASREvent, ASREvent, undefined, never, never, never, never, never>];
|
|
355
|
+
};
|
|
356
|
+
readonly NLURequest: {
|
|
357
|
+
readonly invoke: {
|
|
358
|
+
readonly src: "nluPromise";
|
|
359
|
+
readonly input: ({ context }: {
|
|
360
|
+
context: ASRContext;
|
|
361
|
+
event: ASREvent;
|
|
362
|
+
self: import("xstate").ActorRef<import("xstate").MachineSnapshot<ASRContext, ASREvent, Record<string, import("xstate").AnyActorRef>, import("xstate").StateValue, string, unknown, any, any>, ASREvent, import("xstate").AnyEventObject>;
|
|
363
|
+
}) => {
|
|
364
|
+
endpoint: string;
|
|
365
|
+
key: string;
|
|
366
|
+
projectName: string;
|
|
367
|
+
deploymentName: string;
|
|
368
|
+
query: string;
|
|
369
|
+
};
|
|
370
|
+
readonly onDone: readonly [{
|
|
371
|
+
readonly actions: readonly [({ event }: import("xstate").ActionArgs<ASRContext, import("xstate").DoneActorEvent<any, string>, ASREvent>) => void, import("xstate").ActionFunction<ASRContext, import("xstate").DoneActorEvent<any, string>, ASREvent, undefined, never, never, never, never, never>];
|
|
372
|
+
readonly target: "#asr.Ready";
|
|
373
|
+
readonly guard: ({ event }: import("xstate/dist/declarations/src/guards").GuardArgs<ASRContext, import("xstate").DoneActorEvent<any, string>>) => boolean;
|
|
374
|
+
}, {
|
|
375
|
+
readonly actions: readonly [({ event }: import("xstate").ActionArgs<ASRContext, import("xstate").DoneActorEvent<any, string>, ASREvent>) => void, import("xstate").ActionFunction<ASRContext, import("xstate").DoneActorEvent<any, string>, ASREvent, undefined, never, never, never, never, never>];
|
|
376
|
+
readonly target: "#asr.Ready";
|
|
377
|
+
}];
|
|
378
|
+
readonly onError: {
|
|
379
|
+
readonly actions: readonly [({ event }: import("xstate").ActionArgs<ASRContext, import("xstate").ErrorActorEvent<unknown, string>, ASREvent>) => void, import("xstate").ActionFunction<ASRContext, import("xstate").ErrorActorEvent<unknown, string>, ASREvent, undefined, never, never, never, never, never>];
|
|
380
|
+
readonly target: "#asr.Ready";
|
|
381
|
+
};
|
|
382
|
+
};
|
|
383
|
+
};
|
|
384
|
+
};
|
|
385
|
+
};
|
|
386
|
+
readonly Paused: {
|
|
387
|
+
readonly entry: import("xstate").ActionFunction<ASRContext, ASREvent, ASREvent, undefined, never, never, never, never, never>;
|
|
388
|
+
readonly on: {
|
|
389
|
+
readonly CONTROL: {
|
|
390
|
+
readonly target: "Recognising";
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
};
|
|
394
|
+
readonly GetToken: {
|
|
395
|
+
readonly invoke: {
|
|
396
|
+
readonly id: "getAuthorizationToken";
|
|
397
|
+
readonly input: ({ context }: {
|
|
398
|
+
context: any;
|
|
399
|
+
}) => {
|
|
400
|
+
credentials: any;
|
|
401
|
+
};
|
|
402
|
+
readonly src: "getToken";
|
|
403
|
+
readonly onDone: {
|
|
404
|
+
readonly target: "Ponyfill";
|
|
405
|
+
readonly actions: readonly [import("xstate").ActionFunction<ASRContext, import("xstate").DoneActorEvent<string, string>, ASREvent, undefined, import("xstate").Values<{
|
|
406
|
+
getToken: {
|
|
407
|
+
src: "getToken";
|
|
408
|
+
logic: import("xstate").PromiseActorLogic<string, any, import("xstate").EventObject>;
|
|
409
|
+
id: string;
|
|
410
|
+
};
|
|
411
|
+
ponyfill: {
|
|
412
|
+
src: "ponyfill";
|
|
413
|
+
logic: import("xstate").CallbackActorLogic<null, ASRPonyfillInput, import("xstate").EventObject>;
|
|
414
|
+
id: string;
|
|
415
|
+
};
|
|
416
|
+
recStart: {
|
|
417
|
+
src: "recStart";
|
|
418
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, any, import("xstate").EventObject>;
|
|
419
|
+
id: string;
|
|
420
|
+
};
|
|
421
|
+
nluPromise: {
|
|
422
|
+
src: "nluPromise";
|
|
423
|
+
logic: import("xstate").PromiseActorLogic<any, AzureLanguageCredentials & {
|
|
424
|
+
query: string;
|
|
425
|
+
}, import("xstate").EventObject>;
|
|
426
|
+
id: string;
|
|
427
|
+
};
|
|
428
|
+
}>, never, never, never, never>];
|
|
429
|
+
};
|
|
430
|
+
readonly onError: {
|
|
431
|
+
readonly actions: ({ event }: import("xstate").ActionArgs<ASRContext, import("xstate").ErrorActorEvent<unknown, string>, ASREvent>) => void;
|
|
432
|
+
readonly target: "Fail";
|
|
433
|
+
};
|
|
434
|
+
};
|
|
435
|
+
};
|
|
436
|
+
readonly Ponyfill: {
|
|
437
|
+
readonly invoke: {
|
|
438
|
+
readonly id: "ponyASR";
|
|
439
|
+
readonly src: "ponyfill";
|
|
440
|
+
readonly input: ({ context }: {
|
|
441
|
+
context: ASRContext;
|
|
442
|
+
event: ASREvent;
|
|
443
|
+
self: import("xstate").ActorRef<import("xstate").MachineSnapshot<ASRContext, ASREvent, Record<string, import("xstate").AnyActorRef>, import("xstate").StateValue, string, unknown, any, any>, ASREvent, import("xstate").AnyEventObject>;
|
|
444
|
+
}) => {
|
|
445
|
+
azureRegion: string;
|
|
446
|
+
audioContext: AudioContext;
|
|
447
|
+
azureAuthorizationToken: string;
|
|
448
|
+
locale: string;
|
|
449
|
+
speechRecognitionEndpointId: string;
|
|
450
|
+
};
|
|
451
|
+
};
|
|
452
|
+
};
|
|
122
453
|
};
|
|
123
|
-
}
|
|
124
|
-
type: "recStop";
|
|
125
|
-
params: unknown;
|
|
126
|
-
}, never, never, string, import("xstate").EventObject>>;
|
|
127
|
-
export {};
|
|
454
|
+
}>;
|
|
128
455
|
//# sourceMappingURL=asr.d.ts.map
|
package/dist/asr.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asr.d.ts","sourceRoot":"","sources":["../src/asr.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"asr.d.ts","sourceRoot":"","sources":["../src/asr.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,UAAU,EACV,QAAQ,EACR,OAAO,EACP,gBAAgB,EAChB,UAAU,EACV,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAMjB,eAAO,MAAM,UAAU;;eAgF8C,MAAM;;;;;;;;;;;;;;;;;;;;;mBAAN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAAN,MAAM;;;;;;2BAAN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAAN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAAN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAAN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAAN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+CAAN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAAN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+RzE,CAAC"}
|
package/dist/getToken.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const getToken: import("xstate").PromiseActorLogic<string, any>;
|
|
1
|
+
export declare const getToken: import("xstate").PromiseActorLogic<string, any, import("xstate").EventObject>;
|
|
2
2
|
//# sourceMappingURL=getToken.d.ts.map
|
package/dist/getToken.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getToken.d.ts","sourceRoot":"","sources":["../src/getToken.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"getToken.d.ts","sourceRoot":"","sources":["../src/getToken.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,+EAanB,CAAC"}
|