speechstate 2.17.0 → 2.18.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/speechstate.d.ts +2214 -1
- package/dist/speechstate.d.ts.map +1 -1
- package/dist/speechstate.js +4 -0
- package/package.json +1 -1
package/dist/speechstate.d.ts
CHANGED
|
@@ -22329,7 +22329,2220 @@ declare const speechstate: import("xstate").StateMachine<SSContext, SpeechStateE
|
|
|
22329
22329
|
}, SpeechStateEvent, undefined, never, never, never, "NEW_TOKEN_INTERVAL", never>];
|
|
22330
22330
|
};
|
|
22331
22331
|
readonly UPDATE_ASR_PARAMETERS: {
|
|
22332
|
-
readonly actions: readonly [
|
|
22332
|
+
readonly actions: readonly [import("xstate").ActionFunction<SSContext, {
|
|
22333
|
+
type: "UPDATE_ASR_PARAMETERS";
|
|
22334
|
+
value: RecogniseParameters;
|
|
22335
|
+
}, SpeechStateEvent, undefined, import("xstate").Values<{
|
|
22336
|
+
audioContext: {
|
|
22337
|
+
src: "audioContext";
|
|
22338
|
+
logic: import("xstate").PromiseActorLogic<AudioContext, void, import("xstate").EventObject>;
|
|
22339
|
+
id: string;
|
|
22340
|
+
};
|
|
22341
|
+
tts: {
|
|
22342
|
+
src: "tts";
|
|
22343
|
+
logic: import("xstate").StateMachine<import("./types").TTSContext, import("./types").TTSEvent, {
|
|
22344
|
+
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<any, {
|
|
22345
|
+
cacheURL: string;
|
|
22346
|
+
utterance: string;
|
|
22347
|
+
voice: string;
|
|
22348
|
+
locale: string;
|
|
22349
|
+
}, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<any, {
|
|
22350
|
+
audioContext: AudioContext;
|
|
22351
|
+
cacheURL: string;
|
|
22352
|
+
utterance: string;
|
|
22353
|
+
voice: string;
|
|
22354
|
+
locale: string;
|
|
22355
|
+
}, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<any, {
|
|
22356
|
+
audioContext: AudioContext;
|
|
22357
|
+
audioURL: string;
|
|
22358
|
+
}, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").CallbackActorLogic<import("xstate").EventObject, {
|
|
22359
|
+
audioContext: AudioContext;
|
|
22360
|
+
audioBuffer: AudioBuffer;
|
|
22361
|
+
}, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").CallbackActorLogic<import("xstate").EventObject, import("./types").Agenda, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").CallbackActorLogic<null, import("./types").TTSPonyfillInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").CallbackActorLogic<null, {
|
|
22362
|
+
utterance: string;
|
|
22363
|
+
voice: string;
|
|
22364
|
+
ttsLexicon: string;
|
|
22365
|
+
locale: string;
|
|
22366
|
+
wsaUtt: {
|
|
22367
|
+
prototype: SpeechSynthesisUtterance;
|
|
22368
|
+
new (text?: string): SpeechSynthesisUtterance;
|
|
22369
|
+
};
|
|
22370
|
+
wsaTTS: SpeechSynthesis;
|
|
22371
|
+
visemes?: boolean;
|
|
22372
|
+
}, import("xstate").EventObject>>;
|
|
22373
|
+
}, import("xstate").Values<{
|
|
22374
|
+
checkCache: {
|
|
22375
|
+
src: "checkCache";
|
|
22376
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
22377
|
+
cacheURL: string;
|
|
22378
|
+
utterance: string;
|
|
22379
|
+
voice: string;
|
|
22380
|
+
locale: string;
|
|
22381
|
+
}, import("xstate").EventObject>;
|
|
22382
|
+
id: string;
|
|
22383
|
+
};
|
|
22384
|
+
getAudioFromCache: {
|
|
22385
|
+
src: "getAudioFromCache";
|
|
22386
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
22387
|
+
audioContext: AudioContext;
|
|
22388
|
+
cacheURL: string;
|
|
22389
|
+
utterance: string;
|
|
22390
|
+
voice: string;
|
|
22391
|
+
locale: string;
|
|
22392
|
+
}, import("xstate").EventObject>;
|
|
22393
|
+
id: string;
|
|
22394
|
+
};
|
|
22395
|
+
getAudio: {
|
|
22396
|
+
src: "getAudio";
|
|
22397
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
22398
|
+
audioContext: AudioContext;
|
|
22399
|
+
audioURL: string;
|
|
22400
|
+
}, import("xstate").EventObject>;
|
|
22401
|
+
id: string;
|
|
22402
|
+
};
|
|
22403
|
+
playAudio: {
|
|
22404
|
+
src: "playAudio";
|
|
22405
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, {
|
|
22406
|
+
audioContext: AudioContext;
|
|
22407
|
+
audioBuffer: AudioBuffer;
|
|
22408
|
+
}, import("xstate").EventObject>;
|
|
22409
|
+
id: string;
|
|
22410
|
+
};
|
|
22411
|
+
createEventsFromStream: {
|
|
22412
|
+
src: "createEventsFromStream";
|
|
22413
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("./types").Agenda, import("xstate").EventObject>;
|
|
22414
|
+
id: string;
|
|
22415
|
+
};
|
|
22416
|
+
ponyfill: {
|
|
22417
|
+
src: "ponyfill";
|
|
22418
|
+
logic: import("xstate").CallbackActorLogic<null, import("./types").TTSPonyfillInput, import("xstate").EventObject>;
|
|
22419
|
+
id: string;
|
|
22420
|
+
};
|
|
22421
|
+
start: {
|
|
22422
|
+
src: "start";
|
|
22423
|
+
logic: import("xstate").CallbackActorLogic<null, {
|
|
22424
|
+
utterance: string;
|
|
22425
|
+
voice: string;
|
|
22426
|
+
ttsLexicon: string;
|
|
22427
|
+
locale: string;
|
|
22428
|
+
wsaUtt: {
|
|
22429
|
+
prototype: SpeechSynthesisUtterance;
|
|
22430
|
+
new (text?: string): SpeechSynthesisUtterance;
|
|
22431
|
+
};
|
|
22432
|
+
wsaTTS: SpeechSynthesis;
|
|
22433
|
+
visemes?: boolean;
|
|
22434
|
+
}, import("xstate").EventObject>;
|
|
22435
|
+
id: string;
|
|
22436
|
+
};
|
|
22437
|
+
}>, import("xstate").Values<{
|
|
22438
|
+
ttsStop: {
|
|
22439
|
+
type: "ttsStop";
|
|
22440
|
+
params: unknown;
|
|
22441
|
+
};
|
|
22442
|
+
addFiller: {
|
|
22443
|
+
type: "addFiller";
|
|
22444
|
+
params: {};
|
|
22445
|
+
};
|
|
22446
|
+
assignCurrentVoice: {
|
|
22447
|
+
type: "assignCurrentVoice";
|
|
22448
|
+
params: {};
|
|
22449
|
+
};
|
|
22450
|
+
assignCurrentLocale: {
|
|
22451
|
+
type: "assignCurrentLocale";
|
|
22452
|
+
params: {};
|
|
22453
|
+
};
|
|
22454
|
+
sendParentCurrentPersona: {
|
|
22455
|
+
type: "sendParentCurrentPersona";
|
|
22456
|
+
params: {};
|
|
22457
|
+
};
|
|
22458
|
+
}>, import("xstate").Values<{
|
|
22459
|
+
bufferContainsUtterancePartReadyToBeSpoken: {
|
|
22460
|
+
type: "bufferContainsUtterancePartReadyToBeSpoken";
|
|
22461
|
+
params: unknown;
|
|
22462
|
+
};
|
|
22463
|
+
bufferIsNonEmpty: {
|
|
22464
|
+
type: "bufferIsNonEmpty";
|
|
22465
|
+
params: unknown;
|
|
22466
|
+
};
|
|
22467
|
+
}>, "FILLER_DELAY" | "STREAMING_TIMEOUT", {
|
|
22468
|
+
Operation: "NotReady" | {
|
|
22469
|
+
Ready: "Idle" | {
|
|
22470
|
+
BufferedSpeaker: {
|
|
22471
|
+
Buffer: "BufferIdle" | "Buffering" | "BufferingDone";
|
|
22472
|
+
Speaker: "SpeakingIdle" | "PrepareSpeech" | "SpeakingDone" | {
|
|
22473
|
+
Speak: "Init" | "CheckCache" | "Go" | "Paused" | {
|
|
22474
|
+
UseCache: "GetAudio" | "PlayAudio" | "PausedAudio";
|
|
22475
|
+
};
|
|
22476
|
+
};
|
|
22477
|
+
};
|
|
22478
|
+
} | {
|
|
22479
|
+
Playing: "PlayAudio" | "FetchAudio" | "AudioPaused";
|
|
22480
|
+
} | {
|
|
22481
|
+
Speaking: "Go" | "Paused";
|
|
22482
|
+
};
|
|
22483
|
+
};
|
|
22484
|
+
MaybeHandleNewTokens: "Choice" | "Ponyfill" | "NoPonyfill";
|
|
22485
|
+
}, string, import("./types").TTSInit, {}, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
22486
|
+
readonly id: "tts";
|
|
22487
|
+
readonly context: ({ input }: {
|
|
22488
|
+
spawn: {
|
|
22489
|
+
<TSrc extends "checkCache" | "getAudioFromCache" | "getAudio" | "playAudio" | "createEventsFromStream" | "ponyfill" | "start">(logic: TSrc, ...[options]: ({
|
|
22490
|
+
src: "checkCache";
|
|
22491
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
22492
|
+
cacheURL: string;
|
|
22493
|
+
utterance: string;
|
|
22494
|
+
voice: string;
|
|
22495
|
+
locale: string;
|
|
22496
|
+
}, import("xstate").EventObject>;
|
|
22497
|
+
id: string;
|
|
22498
|
+
} extends infer T ? T extends {
|
|
22499
|
+
src: "checkCache";
|
|
22500
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
22501
|
+
cacheURL: string;
|
|
22502
|
+
utterance: string;
|
|
22503
|
+
voice: string;
|
|
22504
|
+
locale: string;
|
|
22505
|
+
}, import("xstate").EventObject>;
|
|
22506
|
+
id: string;
|
|
22507
|
+
} ? T extends {
|
|
22508
|
+
src: TSrc;
|
|
22509
|
+
} ? import("xstate").ConditionalRequired<[options?: {
|
|
22510
|
+
id?: T["id"];
|
|
22511
|
+
systemId?: string;
|
|
22512
|
+
input?: import("xstate").InputFrom<T["logic"]>;
|
|
22513
|
+
syncSnapshot?: boolean;
|
|
22514
|
+
} & { [K in import("xstate").RequiredActorOptions<T>]: unknown; }], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T>>> : never : never : never) | ({
|
|
22515
|
+
src: "getAudioFromCache";
|
|
22516
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
22517
|
+
audioContext: AudioContext;
|
|
22518
|
+
cacheURL: string;
|
|
22519
|
+
utterance: string;
|
|
22520
|
+
voice: string;
|
|
22521
|
+
locale: string;
|
|
22522
|
+
}, import("xstate").EventObject>;
|
|
22523
|
+
id: string;
|
|
22524
|
+
} extends infer T_1 ? T_1 extends {
|
|
22525
|
+
src: "getAudioFromCache";
|
|
22526
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
22527
|
+
audioContext: AudioContext;
|
|
22528
|
+
cacheURL: string;
|
|
22529
|
+
utterance: string;
|
|
22530
|
+
voice: string;
|
|
22531
|
+
locale: string;
|
|
22532
|
+
}, import("xstate").EventObject>;
|
|
22533
|
+
id: string;
|
|
22534
|
+
} ? T_1 extends {
|
|
22535
|
+
src: TSrc;
|
|
22536
|
+
} ? import("xstate").ConditionalRequired<[options?: {
|
|
22537
|
+
id?: T_1["id"];
|
|
22538
|
+
systemId?: string;
|
|
22539
|
+
input?: import("xstate").InputFrom<T_1["logic"]>;
|
|
22540
|
+
syncSnapshot?: boolean;
|
|
22541
|
+
} & { [K_1 in import("xstate").RequiredActorOptions<T_1>]: unknown; }], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T_1>>> : never : never : never) | ({
|
|
22542
|
+
src: "getAudio";
|
|
22543
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
22544
|
+
audioContext: AudioContext;
|
|
22545
|
+
audioURL: string;
|
|
22546
|
+
}, import("xstate").EventObject>;
|
|
22547
|
+
id: string;
|
|
22548
|
+
} extends infer T_2 ? T_2 extends {
|
|
22549
|
+
src: "getAudio";
|
|
22550
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
22551
|
+
audioContext: AudioContext;
|
|
22552
|
+
audioURL: string;
|
|
22553
|
+
}, import("xstate").EventObject>;
|
|
22554
|
+
id: string;
|
|
22555
|
+
} ? T_2 extends {
|
|
22556
|
+
src: TSrc;
|
|
22557
|
+
} ? import("xstate").ConditionalRequired<[options?: {
|
|
22558
|
+
id?: T_2["id"];
|
|
22559
|
+
systemId?: string;
|
|
22560
|
+
input?: import("xstate").InputFrom<T_2["logic"]>;
|
|
22561
|
+
syncSnapshot?: boolean;
|
|
22562
|
+
} & { [K_2 in import("xstate").RequiredActorOptions<T_2>]: unknown; }], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T_2>>> : never : never : never) | ({
|
|
22563
|
+
src: "playAudio";
|
|
22564
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, {
|
|
22565
|
+
audioContext: AudioContext;
|
|
22566
|
+
audioBuffer: AudioBuffer;
|
|
22567
|
+
}, import("xstate").EventObject>;
|
|
22568
|
+
id: string;
|
|
22569
|
+
} extends infer T_3 ? T_3 extends {
|
|
22570
|
+
src: "playAudio";
|
|
22571
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, {
|
|
22572
|
+
audioContext: AudioContext;
|
|
22573
|
+
audioBuffer: AudioBuffer;
|
|
22574
|
+
}, import("xstate").EventObject>;
|
|
22575
|
+
id: string;
|
|
22576
|
+
} ? T_3 extends {
|
|
22577
|
+
src: TSrc;
|
|
22578
|
+
} ? import("xstate").ConditionalRequired<[options?: {
|
|
22579
|
+
id?: T_3["id"];
|
|
22580
|
+
systemId?: string;
|
|
22581
|
+
input?: import("xstate").InputFrom<T_3["logic"]>;
|
|
22582
|
+
syncSnapshot?: boolean;
|
|
22583
|
+
} & { [K_3 in import("xstate").RequiredActorOptions<T_3>]: unknown; }], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T_3>>> : never : never : never) | ({
|
|
22584
|
+
src: "createEventsFromStream";
|
|
22585
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("./types").Agenda, import("xstate").EventObject>;
|
|
22586
|
+
id: string;
|
|
22587
|
+
} extends infer T_4 ? T_4 extends {
|
|
22588
|
+
src: "createEventsFromStream";
|
|
22589
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("./types").Agenda, import("xstate").EventObject>;
|
|
22590
|
+
id: string;
|
|
22591
|
+
} ? T_4 extends {
|
|
22592
|
+
src: TSrc;
|
|
22593
|
+
} ? import("xstate").ConditionalRequired<[options?: {
|
|
22594
|
+
id?: T_4["id"];
|
|
22595
|
+
systemId?: string;
|
|
22596
|
+
input?: import("xstate").InputFrom<T_4["logic"]>;
|
|
22597
|
+
syncSnapshot?: boolean;
|
|
22598
|
+
} & { [K_4 in import("xstate").RequiredActorOptions<T_4>]: unknown; }], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T_4>>> : never : never : never) | ({
|
|
22599
|
+
src: "ponyfill";
|
|
22600
|
+
logic: import("xstate").CallbackActorLogic<null, import("./types").TTSPonyfillInput, import("xstate").EventObject>;
|
|
22601
|
+
id: string;
|
|
22602
|
+
} extends infer T_5 ? T_5 extends {
|
|
22603
|
+
src: "ponyfill";
|
|
22604
|
+
logic: import("xstate").CallbackActorLogic<null, import("./types").TTSPonyfillInput, import("xstate").EventObject>;
|
|
22605
|
+
id: string;
|
|
22606
|
+
} ? T_5 extends {
|
|
22607
|
+
src: TSrc;
|
|
22608
|
+
} ? import("xstate").ConditionalRequired<[options?: {
|
|
22609
|
+
id?: T_5["id"];
|
|
22610
|
+
systemId?: string;
|
|
22611
|
+
input?: import("xstate").InputFrom<T_5["logic"]>;
|
|
22612
|
+
syncSnapshot?: boolean;
|
|
22613
|
+
} & { [K_5 in import("xstate").RequiredActorOptions<T_5>]: unknown; }], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T_5>>> : never : never : never) | ({
|
|
22614
|
+
src: "start";
|
|
22615
|
+
logic: import("xstate").CallbackActorLogic<null, {
|
|
22616
|
+
utterance: string;
|
|
22617
|
+
voice: string;
|
|
22618
|
+
ttsLexicon: string;
|
|
22619
|
+
locale: string;
|
|
22620
|
+
wsaUtt: {
|
|
22621
|
+
prototype: SpeechSynthesisUtterance;
|
|
22622
|
+
new (text?: string): SpeechSynthesisUtterance;
|
|
22623
|
+
};
|
|
22624
|
+
wsaTTS: SpeechSynthesis;
|
|
22625
|
+
visemes?: boolean;
|
|
22626
|
+
}, import("xstate").EventObject>;
|
|
22627
|
+
id: string;
|
|
22628
|
+
} extends infer T_6 ? T_6 extends {
|
|
22629
|
+
src: "start";
|
|
22630
|
+
logic: import("xstate").CallbackActorLogic<null, {
|
|
22631
|
+
utterance: string;
|
|
22632
|
+
voice: string;
|
|
22633
|
+
ttsLexicon: string;
|
|
22634
|
+
locale: string;
|
|
22635
|
+
wsaUtt: {
|
|
22636
|
+
prototype: SpeechSynthesisUtterance;
|
|
22637
|
+
new (text?: string): SpeechSynthesisUtterance;
|
|
22638
|
+
};
|
|
22639
|
+
wsaTTS: SpeechSynthesis;
|
|
22640
|
+
visemes?: boolean;
|
|
22641
|
+
}, import("xstate").EventObject>;
|
|
22642
|
+
id: string;
|
|
22643
|
+
} ? T_6 extends {
|
|
22644
|
+
src: TSrc;
|
|
22645
|
+
} ? import("xstate").ConditionalRequired<[options?: {
|
|
22646
|
+
id?: T_6["id"];
|
|
22647
|
+
systemId?: string;
|
|
22648
|
+
input?: import("xstate").InputFrom<T_6["logic"]>;
|
|
22649
|
+
syncSnapshot?: boolean;
|
|
22650
|
+
} & { [K_6 in import("xstate").RequiredActorOptions<T_6>]: unknown; }], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T_6>>> : never : never : never)): import("xstate").ActorRefFromLogic<import("xstate").GetConcreteByKey<import("xstate").Values<{
|
|
22651
|
+
checkCache: {
|
|
22652
|
+
src: "checkCache";
|
|
22653
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
22654
|
+
cacheURL: string;
|
|
22655
|
+
utterance: string;
|
|
22656
|
+
voice: string;
|
|
22657
|
+
locale: string;
|
|
22658
|
+
}, import("xstate").EventObject>;
|
|
22659
|
+
id: string;
|
|
22660
|
+
};
|
|
22661
|
+
getAudioFromCache: {
|
|
22662
|
+
src: "getAudioFromCache";
|
|
22663
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
22664
|
+
audioContext: AudioContext;
|
|
22665
|
+
cacheURL: string;
|
|
22666
|
+
utterance: string;
|
|
22667
|
+
voice: string;
|
|
22668
|
+
locale: string;
|
|
22669
|
+
}, import("xstate").EventObject>;
|
|
22670
|
+
id: string;
|
|
22671
|
+
};
|
|
22672
|
+
getAudio: {
|
|
22673
|
+
src: "getAudio";
|
|
22674
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
22675
|
+
audioContext: AudioContext;
|
|
22676
|
+
audioURL: string;
|
|
22677
|
+
}, import("xstate").EventObject>;
|
|
22678
|
+
id: string;
|
|
22679
|
+
};
|
|
22680
|
+
playAudio: {
|
|
22681
|
+
src: "playAudio";
|
|
22682
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, {
|
|
22683
|
+
audioContext: AudioContext;
|
|
22684
|
+
audioBuffer: AudioBuffer;
|
|
22685
|
+
}, import("xstate").EventObject>;
|
|
22686
|
+
id: string;
|
|
22687
|
+
};
|
|
22688
|
+
createEventsFromStream: {
|
|
22689
|
+
src: "createEventsFromStream";
|
|
22690
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("./types").Agenda, import("xstate").EventObject>;
|
|
22691
|
+
id: string;
|
|
22692
|
+
};
|
|
22693
|
+
ponyfill: {
|
|
22694
|
+
src: "ponyfill";
|
|
22695
|
+
logic: import("xstate").CallbackActorLogic<null, import("./types").TTSPonyfillInput, import("xstate").EventObject>;
|
|
22696
|
+
id: string;
|
|
22697
|
+
};
|
|
22698
|
+
start: {
|
|
22699
|
+
src: "start";
|
|
22700
|
+
logic: import("xstate").CallbackActorLogic<null, {
|
|
22701
|
+
utterance: string;
|
|
22702
|
+
voice: string;
|
|
22703
|
+
ttsLexicon: string;
|
|
22704
|
+
locale: string;
|
|
22705
|
+
wsaUtt: {
|
|
22706
|
+
prototype: SpeechSynthesisUtterance;
|
|
22707
|
+
new (text?: string): SpeechSynthesisUtterance;
|
|
22708
|
+
};
|
|
22709
|
+
wsaTTS: SpeechSynthesis;
|
|
22710
|
+
visemes?: boolean;
|
|
22711
|
+
}, import("xstate").EventObject>;
|
|
22712
|
+
id: string;
|
|
22713
|
+
};
|
|
22714
|
+
}>, "src", TSrc>["logic"]>;
|
|
22715
|
+
<TLogic extends import("xstate").AnyActorLogic>(src: TLogic, ...[options]: import("xstate").ConditionalRequired<[options?: {
|
|
22716
|
+
id?: never;
|
|
22717
|
+
systemId?: string;
|
|
22718
|
+
input?: import("xstate").InputFrom<TLogic>;
|
|
22719
|
+
syncSnapshot?: boolean;
|
|
22720
|
+
} & { [K in import("xstate").RequiredLogicInput<TLogic>]: unknown; }], import("xstate").IsNotNever<import("xstate").RequiredLogicInput<TLogic>>>): import("xstate").ActorRefFromLogic<TLogic>;
|
|
22721
|
+
};
|
|
22722
|
+
input: import("./types").TTSInit;
|
|
22723
|
+
self: import("xstate").ActorRef<import("xstate").MachineSnapshot<import("./types").TTSContext, import("./types").TTSEvent, Record<string, import("xstate").AnyActorRef>, import("xstate").StateValue, string, unknown, any, any>, import("./types").TTSEvent, import("xstate").AnyEventObject>;
|
|
22724
|
+
}) => {
|
|
22725
|
+
azureAuthorizationToken: string;
|
|
22726
|
+
ttsDefaultVoice: string;
|
|
22727
|
+
ttsDefaultFillerDelay: number;
|
|
22728
|
+
ttsDefaultFiller: string;
|
|
22729
|
+
ttsLexicon: string;
|
|
22730
|
+
audioContext: AudioContext;
|
|
22731
|
+
azureRegion: string;
|
|
22732
|
+
locale: string;
|
|
22733
|
+
buffer: string;
|
|
22734
|
+
};
|
|
22735
|
+
readonly on: {
|
|
22736
|
+
readonly ERROR: {
|
|
22737
|
+
readonly actions: import("xstate").ActionFunction<import("./types").TTSContext, {
|
|
22738
|
+
type: "ERROR";
|
|
22739
|
+
}, import("./types").TTSEvent, undefined, never, never, never, "FILLER_DELAY" | "STREAMING_TIMEOUT", never>;
|
|
22740
|
+
};
|
|
22741
|
+
};
|
|
22742
|
+
readonly type: "parallel";
|
|
22743
|
+
readonly states: {
|
|
22744
|
+
readonly Operation: {
|
|
22745
|
+
readonly initial: "NotReady";
|
|
22746
|
+
readonly states: {
|
|
22747
|
+
readonly NotReady: {
|
|
22748
|
+
readonly on: {
|
|
22749
|
+
readonly READY: {
|
|
22750
|
+
readonly target: "Ready";
|
|
22751
|
+
readonly actions: import("xstate").ActionFunction<import("./types").TTSContext, {
|
|
22752
|
+
type: "READY";
|
|
22753
|
+
value: {
|
|
22754
|
+
wsaTTS: SpeechSynthesis;
|
|
22755
|
+
wsaUtt: {
|
|
22756
|
+
prototype: SpeechSynthesisUtterance;
|
|
22757
|
+
new (text?: string): SpeechSynthesisUtterance;
|
|
22758
|
+
};
|
|
22759
|
+
};
|
|
22760
|
+
}, import("./types").TTSEvent, undefined, never, never, never, "FILLER_DELAY" | "STREAMING_TIMEOUT", never>;
|
|
22761
|
+
};
|
|
22762
|
+
};
|
|
22763
|
+
};
|
|
22764
|
+
readonly Ready: {
|
|
22765
|
+
readonly initial: "Idle";
|
|
22766
|
+
readonly states: {
|
|
22767
|
+
readonly Idle: {
|
|
22768
|
+
readonly id: "Idle";
|
|
22769
|
+
readonly on: {
|
|
22770
|
+
readonly SPEAK: readonly [{
|
|
22771
|
+
readonly target: "BufferedSpeaker";
|
|
22772
|
+
readonly guard: ({ event }: import("xstate/dist/declarations/src/guards").GuardArgs<import("./types").TTSContext, {
|
|
22773
|
+
type: "SPEAK";
|
|
22774
|
+
value: import("./types").Agenda;
|
|
22775
|
+
}>) => boolean;
|
|
22776
|
+
readonly actions: import("xstate").ActionFunction<import("./types").TTSContext, {
|
|
22777
|
+
type: "SPEAK";
|
|
22778
|
+
value: import("./types").Agenda;
|
|
22779
|
+
}, import("./types").TTSEvent, undefined, import("xstate").Values<{
|
|
22780
|
+
checkCache: {
|
|
22781
|
+
src: "checkCache";
|
|
22782
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
22783
|
+
cacheURL: string;
|
|
22784
|
+
utterance: string;
|
|
22785
|
+
voice: string;
|
|
22786
|
+
locale: string;
|
|
22787
|
+
}, import("xstate").EventObject>;
|
|
22788
|
+
id: string;
|
|
22789
|
+
};
|
|
22790
|
+
getAudioFromCache: {
|
|
22791
|
+
src: "getAudioFromCache";
|
|
22792
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
22793
|
+
audioContext: AudioContext;
|
|
22794
|
+
cacheURL: string;
|
|
22795
|
+
utterance: string;
|
|
22796
|
+
voice: string;
|
|
22797
|
+
locale: string;
|
|
22798
|
+
}, import("xstate").EventObject>;
|
|
22799
|
+
id: string;
|
|
22800
|
+
};
|
|
22801
|
+
getAudio: {
|
|
22802
|
+
src: "getAudio";
|
|
22803
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
22804
|
+
audioContext: AudioContext;
|
|
22805
|
+
audioURL: string;
|
|
22806
|
+
}, import("xstate").EventObject>;
|
|
22807
|
+
id: string;
|
|
22808
|
+
};
|
|
22809
|
+
playAudio: {
|
|
22810
|
+
src: "playAudio";
|
|
22811
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, {
|
|
22812
|
+
audioContext: AudioContext;
|
|
22813
|
+
audioBuffer: AudioBuffer;
|
|
22814
|
+
}, import("xstate").EventObject>;
|
|
22815
|
+
id: string;
|
|
22816
|
+
};
|
|
22817
|
+
createEventsFromStream: {
|
|
22818
|
+
src: "createEventsFromStream";
|
|
22819
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("./types").Agenda, import("xstate").EventObject>;
|
|
22820
|
+
id: string;
|
|
22821
|
+
};
|
|
22822
|
+
ponyfill: {
|
|
22823
|
+
src: "ponyfill";
|
|
22824
|
+
logic: import("xstate").CallbackActorLogic<null, import("./types").TTSPonyfillInput, import("xstate").EventObject>;
|
|
22825
|
+
id: string;
|
|
22826
|
+
};
|
|
22827
|
+
start: {
|
|
22828
|
+
src: "start";
|
|
22829
|
+
logic: import("xstate").CallbackActorLogic<null, {
|
|
22830
|
+
utterance: string;
|
|
22831
|
+
voice: string;
|
|
22832
|
+
ttsLexicon: string;
|
|
22833
|
+
locale: string;
|
|
22834
|
+
wsaUtt: {
|
|
22835
|
+
prototype: SpeechSynthesisUtterance;
|
|
22836
|
+
new (text?: string): SpeechSynthesisUtterance;
|
|
22837
|
+
};
|
|
22838
|
+
wsaTTS: SpeechSynthesis;
|
|
22839
|
+
visemes?: boolean;
|
|
22840
|
+
}, import("xstate").EventObject>;
|
|
22841
|
+
id: string;
|
|
22842
|
+
};
|
|
22843
|
+
}>, never, never, never, never>;
|
|
22844
|
+
}, {
|
|
22845
|
+
readonly target: "Playing";
|
|
22846
|
+
readonly guard: ({ event }: import("xstate/dist/declarations/src/guards").GuardArgs<import("./types").TTSContext, {
|
|
22847
|
+
type: "SPEAK";
|
|
22848
|
+
value: import("./types").Agenda;
|
|
22849
|
+
}>) => boolean;
|
|
22850
|
+
readonly actions: import("xstate").ActionFunction<import("./types").TTSContext, {
|
|
22851
|
+
type: "SPEAK";
|
|
22852
|
+
value: import("./types").Agenda;
|
|
22853
|
+
}, import("./types").TTSEvent, undefined, import("xstate").Values<{
|
|
22854
|
+
checkCache: {
|
|
22855
|
+
src: "checkCache";
|
|
22856
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
22857
|
+
cacheURL: string;
|
|
22858
|
+
utterance: string;
|
|
22859
|
+
voice: string;
|
|
22860
|
+
locale: string;
|
|
22861
|
+
}, import("xstate").EventObject>;
|
|
22862
|
+
id: string;
|
|
22863
|
+
};
|
|
22864
|
+
getAudioFromCache: {
|
|
22865
|
+
src: "getAudioFromCache";
|
|
22866
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
22867
|
+
audioContext: AudioContext;
|
|
22868
|
+
cacheURL: string;
|
|
22869
|
+
utterance: string;
|
|
22870
|
+
voice: string;
|
|
22871
|
+
locale: string;
|
|
22872
|
+
}, import("xstate").EventObject>;
|
|
22873
|
+
id: string;
|
|
22874
|
+
};
|
|
22875
|
+
getAudio: {
|
|
22876
|
+
src: "getAudio";
|
|
22877
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
22878
|
+
audioContext: AudioContext;
|
|
22879
|
+
audioURL: string;
|
|
22880
|
+
}, import("xstate").EventObject>;
|
|
22881
|
+
id: string;
|
|
22882
|
+
};
|
|
22883
|
+
playAudio: {
|
|
22884
|
+
src: "playAudio";
|
|
22885
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, {
|
|
22886
|
+
audioContext: AudioContext;
|
|
22887
|
+
audioBuffer: AudioBuffer;
|
|
22888
|
+
}, import("xstate").EventObject>;
|
|
22889
|
+
id: string;
|
|
22890
|
+
};
|
|
22891
|
+
createEventsFromStream: {
|
|
22892
|
+
src: "createEventsFromStream";
|
|
22893
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("./types").Agenda, import("xstate").EventObject>;
|
|
22894
|
+
id: string;
|
|
22895
|
+
};
|
|
22896
|
+
ponyfill: {
|
|
22897
|
+
src: "ponyfill";
|
|
22898
|
+
logic: import("xstate").CallbackActorLogic<null, import("./types").TTSPonyfillInput, import("xstate").EventObject>;
|
|
22899
|
+
id: string;
|
|
22900
|
+
};
|
|
22901
|
+
start: {
|
|
22902
|
+
src: "start";
|
|
22903
|
+
logic: import("xstate").CallbackActorLogic<null, {
|
|
22904
|
+
utterance: string;
|
|
22905
|
+
voice: string;
|
|
22906
|
+
ttsLexicon: string;
|
|
22907
|
+
locale: string;
|
|
22908
|
+
wsaUtt: {
|
|
22909
|
+
prototype: SpeechSynthesisUtterance;
|
|
22910
|
+
new (text?: string): SpeechSynthesisUtterance;
|
|
22911
|
+
};
|
|
22912
|
+
wsaTTS: SpeechSynthesis;
|
|
22913
|
+
visemes?: boolean;
|
|
22914
|
+
}, import("xstate").EventObject>;
|
|
22915
|
+
id: string;
|
|
22916
|
+
};
|
|
22917
|
+
}>, never, never, never, never>;
|
|
22918
|
+
}, {
|
|
22919
|
+
readonly target: "Speaking";
|
|
22920
|
+
readonly actions: readonly [import("xstate").ActionFunction<import("./types").TTSContext, {
|
|
22921
|
+
type: "SPEAK";
|
|
22922
|
+
value: import("./types").Agenda;
|
|
22923
|
+
}, import("./types").TTSEvent, undefined, import("xstate").Values<{
|
|
22924
|
+
checkCache: {
|
|
22925
|
+
src: "checkCache";
|
|
22926
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
22927
|
+
cacheURL: string;
|
|
22928
|
+
utterance: string;
|
|
22929
|
+
voice: string;
|
|
22930
|
+
locale: string;
|
|
22931
|
+
}, import("xstate").EventObject>;
|
|
22932
|
+
id: string;
|
|
22933
|
+
};
|
|
22934
|
+
getAudioFromCache: {
|
|
22935
|
+
src: "getAudioFromCache";
|
|
22936
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
22937
|
+
audioContext: AudioContext;
|
|
22938
|
+
cacheURL: string;
|
|
22939
|
+
utterance: string;
|
|
22940
|
+
voice: string;
|
|
22941
|
+
locale: string;
|
|
22942
|
+
}, import("xstate").EventObject>;
|
|
22943
|
+
id: string;
|
|
22944
|
+
};
|
|
22945
|
+
getAudio: {
|
|
22946
|
+
src: "getAudio";
|
|
22947
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
22948
|
+
audioContext: AudioContext;
|
|
22949
|
+
audioURL: string;
|
|
22950
|
+
}, import("xstate").EventObject>;
|
|
22951
|
+
id: string;
|
|
22952
|
+
};
|
|
22953
|
+
playAudio: {
|
|
22954
|
+
src: "playAudio";
|
|
22955
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, {
|
|
22956
|
+
audioContext: AudioContext;
|
|
22957
|
+
audioBuffer: AudioBuffer;
|
|
22958
|
+
}, import("xstate").EventObject>;
|
|
22959
|
+
id: string;
|
|
22960
|
+
};
|
|
22961
|
+
createEventsFromStream: {
|
|
22962
|
+
src: "createEventsFromStream";
|
|
22963
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("./types").Agenda, import("xstate").EventObject>;
|
|
22964
|
+
id: string;
|
|
22965
|
+
};
|
|
22966
|
+
ponyfill: {
|
|
22967
|
+
src: "ponyfill";
|
|
22968
|
+
logic: import("xstate").CallbackActorLogic<null, import("./types").TTSPonyfillInput, import("xstate").EventObject>;
|
|
22969
|
+
id: string;
|
|
22970
|
+
};
|
|
22971
|
+
start: {
|
|
22972
|
+
src: "start";
|
|
22973
|
+
logic: import("xstate").CallbackActorLogic<null, {
|
|
22974
|
+
utterance: string;
|
|
22975
|
+
voice: string;
|
|
22976
|
+
ttsLexicon: string;
|
|
22977
|
+
locale: string;
|
|
22978
|
+
wsaUtt: {
|
|
22979
|
+
prototype: SpeechSynthesisUtterance;
|
|
22980
|
+
new (text?: string): SpeechSynthesisUtterance;
|
|
22981
|
+
};
|
|
22982
|
+
wsaTTS: SpeechSynthesis;
|
|
22983
|
+
visemes?: boolean;
|
|
22984
|
+
}, import("xstate").EventObject>;
|
|
22985
|
+
id: string;
|
|
22986
|
+
};
|
|
22987
|
+
}>, never, never, never, never>, ({ event }: import("xstate").ActionArgs<import("./types").TTSContext, {
|
|
22988
|
+
type: "SPEAK";
|
|
22989
|
+
value: import("./types").Agenda;
|
|
22990
|
+
}, import("./types").TTSEvent>) => void, ({ event }: import("xstate").ActionArgs<import("./types").TTSContext, {
|
|
22991
|
+
type: "SPEAK";
|
|
22992
|
+
value: import("./types").Agenda;
|
|
22993
|
+
}, import("./types").TTSEvent>) => void];
|
|
22994
|
+
}];
|
|
22995
|
+
};
|
|
22996
|
+
};
|
|
22997
|
+
readonly BufferedSpeaker: {
|
|
22998
|
+
readonly type: "parallel";
|
|
22999
|
+
readonly invoke: {
|
|
23000
|
+
readonly id: "createEventsFromStream";
|
|
23001
|
+
readonly src: "createEventsFromStream";
|
|
23002
|
+
readonly input: ({ context }: {
|
|
23003
|
+
context: import("./types").TTSContext;
|
|
23004
|
+
event: import("./types").TTSEvent;
|
|
23005
|
+
self: import("xstate").ActorRef<import("xstate").MachineSnapshot<import("./types").TTSContext, import("./types").TTSEvent, Record<string, import("xstate").AnyActorRef>, import("xstate").StateValue, string, unknown, any, any>, import("./types").TTSEvent, import("xstate").AnyEventObject>;
|
|
23006
|
+
}) => import("./types").Agenda;
|
|
23007
|
+
};
|
|
23008
|
+
readonly on: {
|
|
23009
|
+
readonly STOP: {
|
|
23010
|
+
readonly target: "Idle";
|
|
23011
|
+
};
|
|
23012
|
+
};
|
|
23013
|
+
readonly states: {
|
|
23014
|
+
readonly Buffer: {
|
|
23015
|
+
readonly initial: "BufferIdle";
|
|
23016
|
+
readonly on: {
|
|
23017
|
+
readonly STREAMING_SET_VOICE: {
|
|
23018
|
+
readonly actions: "assignCurrentVoice";
|
|
23019
|
+
};
|
|
23020
|
+
readonly STREAMING_SET_LOCALE: {
|
|
23021
|
+
readonly actions: "assignCurrentLocale";
|
|
23022
|
+
};
|
|
23023
|
+
readonly STREAMING_SET_PERSONA: {
|
|
23024
|
+
readonly actions: "sendParentCurrentPersona";
|
|
23025
|
+
};
|
|
23026
|
+
};
|
|
23027
|
+
readonly states: {
|
|
23028
|
+
readonly BufferIdle: {
|
|
23029
|
+
readonly id: "BufferIdle";
|
|
23030
|
+
readonly on: {
|
|
23031
|
+
readonly STREAMING_CHUNK: {
|
|
23032
|
+
readonly target: "Buffering";
|
|
23033
|
+
};
|
|
23034
|
+
readonly STREAMING_DONE: "BufferingDone";
|
|
23035
|
+
};
|
|
23036
|
+
};
|
|
23037
|
+
readonly Buffering: {
|
|
23038
|
+
readonly id: "Buffering";
|
|
23039
|
+
readonly on: {
|
|
23040
|
+
readonly STREAMING_CHUNK: {
|
|
23041
|
+
readonly target: "Buffering";
|
|
23042
|
+
readonly reenter: true;
|
|
23043
|
+
};
|
|
23044
|
+
readonly STREAMING_DONE: "BufferingDone";
|
|
23045
|
+
};
|
|
23046
|
+
readonly after: {
|
|
23047
|
+
readonly STREAMING_TIMEOUT: {
|
|
23048
|
+
readonly target: "BufferingDone";
|
|
23049
|
+
readonly actions: () => void;
|
|
23050
|
+
};
|
|
23051
|
+
};
|
|
23052
|
+
readonly entry: readonly [import("xstate").ActionFunction<import("./types").TTSContext, import("./types").TTSEvent, import("./types").TTSEvent, undefined, import("xstate").Values<{
|
|
23053
|
+
checkCache: {
|
|
23054
|
+
src: "checkCache";
|
|
23055
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
23056
|
+
cacheURL: string;
|
|
23057
|
+
utterance: string;
|
|
23058
|
+
voice: string;
|
|
23059
|
+
locale: string;
|
|
23060
|
+
}, import("xstate").EventObject>;
|
|
23061
|
+
id: string;
|
|
23062
|
+
};
|
|
23063
|
+
getAudioFromCache: {
|
|
23064
|
+
src: "getAudioFromCache";
|
|
23065
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
23066
|
+
audioContext: AudioContext;
|
|
23067
|
+
cacheURL: string;
|
|
23068
|
+
utterance: string;
|
|
23069
|
+
voice: string;
|
|
23070
|
+
locale: string;
|
|
23071
|
+
}, import("xstate").EventObject>;
|
|
23072
|
+
id: string;
|
|
23073
|
+
};
|
|
23074
|
+
getAudio: {
|
|
23075
|
+
src: "getAudio";
|
|
23076
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
23077
|
+
audioContext: AudioContext;
|
|
23078
|
+
audioURL: string;
|
|
23079
|
+
}, import("xstate").EventObject>;
|
|
23080
|
+
id: string;
|
|
23081
|
+
};
|
|
23082
|
+
playAudio: {
|
|
23083
|
+
src: "playAudio";
|
|
23084
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, {
|
|
23085
|
+
audioContext: AudioContext;
|
|
23086
|
+
audioBuffer: AudioBuffer;
|
|
23087
|
+
}, import("xstate").EventObject>;
|
|
23088
|
+
id: string;
|
|
23089
|
+
};
|
|
23090
|
+
createEventsFromStream: {
|
|
23091
|
+
src: "createEventsFromStream";
|
|
23092
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("./types").Agenda, import("xstate").EventObject>;
|
|
23093
|
+
id: string;
|
|
23094
|
+
};
|
|
23095
|
+
ponyfill: {
|
|
23096
|
+
src: "ponyfill";
|
|
23097
|
+
logic: import("xstate").CallbackActorLogic<null, import("./types").TTSPonyfillInput, import("xstate").EventObject>;
|
|
23098
|
+
id: string;
|
|
23099
|
+
};
|
|
23100
|
+
start: {
|
|
23101
|
+
src: "start";
|
|
23102
|
+
logic: import("xstate").CallbackActorLogic<null, {
|
|
23103
|
+
utterance: string;
|
|
23104
|
+
voice: string;
|
|
23105
|
+
ttsLexicon: string;
|
|
23106
|
+
locale: string;
|
|
23107
|
+
wsaUtt: {
|
|
23108
|
+
prototype: SpeechSynthesisUtterance;
|
|
23109
|
+
new (text?: string): SpeechSynthesisUtterance;
|
|
23110
|
+
};
|
|
23111
|
+
wsaTTS: SpeechSynthesis;
|
|
23112
|
+
visemes?: boolean;
|
|
23113
|
+
}, import("xstate").EventObject>;
|
|
23114
|
+
id: string;
|
|
23115
|
+
};
|
|
23116
|
+
}>, never, never, never, never>];
|
|
23117
|
+
};
|
|
23118
|
+
readonly BufferingDone: {
|
|
23119
|
+
readonly id: "BufferingDone";
|
|
23120
|
+
readonly type: "final";
|
|
23121
|
+
};
|
|
23122
|
+
};
|
|
23123
|
+
};
|
|
23124
|
+
readonly Speaker: {
|
|
23125
|
+
readonly initial: "SpeakingIdle";
|
|
23126
|
+
readonly states: {
|
|
23127
|
+
readonly SpeakingIdle: {
|
|
23128
|
+
readonly id: "SpeakingIdle";
|
|
23129
|
+
readonly always: readonly [{
|
|
23130
|
+
readonly target: "Speak";
|
|
23131
|
+
readonly guard: import("xstate/dist/declarations/src/guards").GuardPredicate<import("./types").TTSContext, import("./types").TTSEvent, undefined, any>;
|
|
23132
|
+
readonly actions: readonly [import("xstate").ActionFunction<import("./types").TTSContext, import("./types").TTSEvent, import("./types").TTSEvent, undefined, import("xstate").Values<{
|
|
23133
|
+
checkCache: {
|
|
23134
|
+
src: "checkCache";
|
|
23135
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
23136
|
+
cacheURL: string;
|
|
23137
|
+
utterance: string;
|
|
23138
|
+
voice: string;
|
|
23139
|
+
locale: string;
|
|
23140
|
+
}, import("xstate").EventObject>;
|
|
23141
|
+
id: string;
|
|
23142
|
+
};
|
|
23143
|
+
getAudioFromCache: {
|
|
23144
|
+
src: "getAudioFromCache";
|
|
23145
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
23146
|
+
audioContext: AudioContext;
|
|
23147
|
+
cacheURL: string;
|
|
23148
|
+
utterance: string;
|
|
23149
|
+
voice: string;
|
|
23150
|
+
locale: string;
|
|
23151
|
+
}, import("xstate").EventObject>;
|
|
23152
|
+
id: string;
|
|
23153
|
+
};
|
|
23154
|
+
getAudio: {
|
|
23155
|
+
src: "getAudio";
|
|
23156
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
23157
|
+
audioContext: AudioContext;
|
|
23158
|
+
audioURL: string;
|
|
23159
|
+
}, import("xstate").EventObject>;
|
|
23160
|
+
id: string;
|
|
23161
|
+
};
|
|
23162
|
+
playAudio: {
|
|
23163
|
+
src: "playAudio";
|
|
23164
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, {
|
|
23165
|
+
audioContext: AudioContext;
|
|
23166
|
+
audioBuffer: AudioBuffer;
|
|
23167
|
+
}, import("xstate").EventObject>;
|
|
23168
|
+
id: string;
|
|
23169
|
+
};
|
|
23170
|
+
createEventsFromStream: {
|
|
23171
|
+
src: "createEventsFromStream";
|
|
23172
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("./types").Agenda, import("xstate").EventObject>;
|
|
23173
|
+
id: string;
|
|
23174
|
+
};
|
|
23175
|
+
ponyfill: {
|
|
23176
|
+
src: "ponyfill";
|
|
23177
|
+
logic: import("xstate").CallbackActorLogic<null, import("./types").TTSPonyfillInput, import("xstate").EventObject>;
|
|
23178
|
+
id: string;
|
|
23179
|
+
};
|
|
23180
|
+
start: {
|
|
23181
|
+
src: "start";
|
|
23182
|
+
logic: import("xstate").CallbackActorLogic<null, {
|
|
23183
|
+
utterance: string;
|
|
23184
|
+
voice: string;
|
|
23185
|
+
ttsLexicon: string;
|
|
23186
|
+
locale: string;
|
|
23187
|
+
wsaUtt: {
|
|
23188
|
+
prototype: SpeechSynthesisUtterance;
|
|
23189
|
+
new (text?: string): SpeechSynthesisUtterance;
|
|
23190
|
+
};
|
|
23191
|
+
wsaTTS: SpeechSynthesis;
|
|
23192
|
+
visemes?: boolean;
|
|
23193
|
+
}, import("xstate").EventObject>;
|
|
23194
|
+
id: string;
|
|
23195
|
+
};
|
|
23196
|
+
}>, never, never, never, never>, import("xstate").ActionFunction<import("./types").TTSContext, import("./types").TTSEvent, import("./types").TTSEvent, undefined, import("xstate").Values<{
|
|
23197
|
+
checkCache: {
|
|
23198
|
+
src: "checkCache";
|
|
23199
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
23200
|
+
cacheURL: string;
|
|
23201
|
+
utterance: string;
|
|
23202
|
+
voice: string;
|
|
23203
|
+
locale: string;
|
|
23204
|
+
}, import("xstate").EventObject>;
|
|
23205
|
+
id: string;
|
|
23206
|
+
};
|
|
23207
|
+
getAudioFromCache: {
|
|
23208
|
+
src: "getAudioFromCache";
|
|
23209
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
23210
|
+
audioContext: AudioContext;
|
|
23211
|
+
cacheURL: string;
|
|
23212
|
+
utterance: string;
|
|
23213
|
+
voice: string;
|
|
23214
|
+
locale: string;
|
|
23215
|
+
}, import("xstate").EventObject>;
|
|
23216
|
+
id: string;
|
|
23217
|
+
};
|
|
23218
|
+
getAudio: {
|
|
23219
|
+
src: "getAudio";
|
|
23220
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
23221
|
+
audioContext: AudioContext;
|
|
23222
|
+
audioURL: string;
|
|
23223
|
+
}, import("xstate").EventObject>;
|
|
23224
|
+
id: string;
|
|
23225
|
+
};
|
|
23226
|
+
playAudio: {
|
|
23227
|
+
src: "playAudio";
|
|
23228
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, {
|
|
23229
|
+
audioContext: AudioContext;
|
|
23230
|
+
audioBuffer: AudioBuffer;
|
|
23231
|
+
}, import("xstate").EventObject>;
|
|
23232
|
+
id: string;
|
|
23233
|
+
};
|
|
23234
|
+
createEventsFromStream: {
|
|
23235
|
+
src: "createEventsFromStream";
|
|
23236
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("./types").Agenda, import("xstate").EventObject>;
|
|
23237
|
+
id: string;
|
|
23238
|
+
};
|
|
23239
|
+
ponyfill: {
|
|
23240
|
+
src: "ponyfill";
|
|
23241
|
+
logic: import("xstate").CallbackActorLogic<null, import("./types").TTSPonyfillInput, import("xstate").EventObject>;
|
|
23242
|
+
id: string;
|
|
23243
|
+
};
|
|
23244
|
+
start: {
|
|
23245
|
+
src: "start";
|
|
23246
|
+
logic: import("xstate").CallbackActorLogic<null, {
|
|
23247
|
+
utterance: string;
|
|
23248
|
+
voice: string;
|
|
23249
|
+
ttsLexicon: string;
|
|
23250
|
+
locale: string;
|
|
23251
|
+
wsaUtt: {
|
|
23252
|
+
prototype: SpeechSynthesisUtterance;
|
|
23253
|
+
new (text?: string): SpeechSynthesisUtterance;
|
|
23254
|
+
};
|
|
23255
|
+
wsaTTS: SpeechSynthesis;
|
|
23256
|
+
visemes?: boolean;
|
|
23257
|
+
}, import("xstate").EventObject>;
|
|
23258
|
+
id: string;
|
|
23259
|
+
};
|
|
23260
|
+
}>, never, never, never, never>];
|
|
23261
|
+
}, {
|
|
23262
|
+
readonly target: "PrepareSpeech";
|
|
23263
|
+
readonly guard: "bufferContainsUtterancePartReadyToBeSpoken";
|
|
23264
|
+
}];
|
|
23265
|
+
readonly after: {
|
|
23266
|
+
readonly FILLER_DELAY: {
|
|
23267
|
+
readonly target: "SpeakingIdle";
|
|
23268
|
+
readonly reenter: true;
|
|
23269
|
+
readonly actions: "addFiller";
|
|
23270
|
+
readonly guard: ({ context }: import("xstate/dist/declarations/src/guards").GuardArgs<import("./types").TTSContext, import("./types").TTSEvent>) => boolean;
|
|
23271
|
+
};
|
|
23272
|
+
};
|
|
23273
|
+
};
|
|
23274
|
+
readonly PrepareSpeech: {
|
|
23275
|
+
readonly entry: readonly [import("xstate").ActionFunction<import("./types").TTSContext, import("./types").TTSEvent, import("./types").TTSEvent, undefined, import("xstate").Values<{
|
|
23276
|
+
checkCache: {
|
|
23277
|
+
src: "checkCache";
|
|
23278
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
23279
|
+
cacheURL: string;
|
|
23280
|
+
utterance: string;
|
|
23281
|
+
voice: string;
|
|
23282
|
+
locale: string;
|
|
23283
|
+
}, import("xstate").EventObject>;
|
|
23284
|
+
id: string;
|
|
23285
|
+
};
|
|
23286
|
+
getAudioFromCache: {
|
|
23287
|
+
src: "getAudioFromCache";
|
|
23288
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
23289
|
+
audioContext: AudioContext;
|
|
23290
|
+
cacheURL: string;
|
|
23291
|
+
utterance: string;
|
|
23292
|
+
voice: string;
|
|
23293
|
+
locale: string;
|
|
23294
|
+
}, import("xstate").EventObject>;
|
|
23295
|
+
id: string;
|
|
23296
|
+
};
|
|
23297
|
+
getAudio: {
|
|
23298
|
+
src: "getAudio";
|
|
23299
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
23300
|
+
audioContext: AudioContext;
|
|
23301
|
+
audioURL: string;
|
|
23302
|
+
}, import("xstate").EventObject>;
|
|
23303
|
+
id: string;
|
|
23304
|
+
};
|
|
23305
|
+
playAudio: {
|
|
23306
|
+
src: "playAudio";
|
|
23307
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, {
|
|
23308
|
+
audioContext: AudioContext;
|
|
23309
|
+
audioBuffer: AudioBuffer;
|
|
23310
|
+
}, import("xstate").EventObject>;
|
|
23311
|
+
id: string;
|
|
23312
|
+
};
|
|
23313
|
+
createEventsFromStream: {
|
|
23314
|
+
src: "createEventsFromStream";
|
|
23315
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("./types").Agenda, import("xstate").EventObject>;
|
|
23316
|
+
id: string;
|
|
23317
|
+
};
|
|
23318
|
+
ponyfill: {
|
|
23319
|
+
src: "ponyfill";
|
|
23320
|
+
logic: import("xstate").CallbackActorLogic<null, import("./types").TTSPonyfillInput, import("xstate").EventObject>;
|
|
23321
|
+
id: string;
|
|
23322
|
+
};
|
|
23323
|
+
start: {
|
|
23324
|
+
src: "start";
|
|
23325
|
+
logic: import("xstate").CallbackActorLogic<null, {
|
|
23326
|
+
utterance: string;
|
|
23327
|
+
voice: string;
|
|
23328
|
+
ttsLexicon: string;
|
|
23329
|
+
locale: string;
|
|
23330
|
+
wsaUtt: {
|
|
23331
|
+
prototype: SpeechSynthesisUtterance;
|
|
23332
|
+
new (text?: string): SpeechSynthesisUtterance;
|
|
23333
|
+
};
|
|
23334
|
+
wsaTTS: SpeechSynthesis;
|
|
23335
|
+
visemes?: boolean;
|
|
23336
|
+
}, import("xstate").EventObject>;
|
|
23337
|
+
id: string;
|
|
23338
|
+
};
|
|
23339
|
+
}>, never, never, never, never>];
|
|
23340
|
+
readonly always: readonly [{
|
|
23341
|
+
readonly target: "Speak";
|
|
23342
|
+
}];
|
|
23343
|
+
};
|
|
23344
|
+
readonly Speak: {
|
|
23345
|
+
readonly initial: "Init";
|
|
23346
|
+
readonly states: {
|
|
23347
|
+
readonly Init: {
|
|
23348
|
+
readonly always: readonly [{
|
|
23349
|
+
readonly target: "CheckCache";
|
|
23350
|
+
readonly guard: ({ context }: import("xstate/dist/declarations/src/guards").GuardArgs<import("./types").TTSContext, import("./types").TTSEvent>) => boolean;
|
|
23351
|
+
}, {
|
|
23352
|
+
readonly target: "Go";
|
|
23353
|
+
}];
|
|
23354
|
+
};
|
|
23355
|
+
readonly CheckCache: {
|
|
23356
|
+
readonly invoke: {
|
|
23357
|
+
readonly src: "checkCache";
|
|
23358
|
+
readonly input: ({ context }: {
|
|
23359
|
+
context: import("./types").TTSContext;
|
|
23360
|
+
event: import("./types").TTSEvent;
|
|
23361
|
+
self: import("xstate").ActorRef<import("xstate").MachineSnapshot<import("./types").TTSContext, import("./types").TTSEvent, Record<string, import("xstate").AnyActorRef>, import("xstate").StateValue, string, unknown, any, any>, import("./types").TTSEvent, import("xstate").AnyEventObject>;
|
|
23362
|
+
}) => {
|
|
23363
|
+
cacheURL: string;
|
|
23364
|
+
utterance: string;
|
|
23365
|
+
voice: string;
|
|
23366
|
+
locale: string;
|
|
23367
|
+
};
|
|
23368
|
+
readonly onError: "Go";
|
|
23369
|
+
readonly onDone: readonly [{
|
|
23370
|
+
readonly target: "UseCache";
|
|
23371
|
+
readonly guard: ({ event }: import("xstate/dist/declarations/src/guards").GuardArgs<import("./types").TTSContext, import("xstate").DoneActorEvent<any, string>>) => any;
|
|
23372
|
+
readonly actions: ({ event }: import("xstate").ActionArgs<import("./types").TTSContext, import("xstate").DoneActorEvent<any, string>, import("./types").TTSEvent>) => void;
|
|
23373
|
+
}, {
|
|
23374
|
+
readonly target: "Go";
|
|
23375
|
+
readonly actions: ({ event }: import("xstate").ActionArgs<import("./types").TTSContext, import("xstate").DoneActorEvent<any, string>, import("./types").TTSEvent>) => void;
|
|
23376
|
+
}];
|
|
23377
|
+
};
|
|
23378
|
+
};
|
|
23379
|
+
readonly UseCache: {
|
|
23380
|
+
readonly initial: "GetAudio";
|
|
23381
|
+
readonly states: {
|
|
23382
|
+
readonly GetAudio: {
|
|
23383
|
+
readonly invoke: {
|
|
23384
|
+
readonly src: "getAudioFromCache";
|
|
23385
|
+
readonly input: ({ context }: {
|
|
23386
|
+
context: import("./types").TTSContext;
|
|
23387
|
+
event: import("./types").TTSEvent;
|
|
23388
|
+
self: import("xstate").ActorRef<import("xstate").MachineSnapshot<import("./types").TTSContext, import("./types").TTSEvent, Record<string, import("xstate").AnyActorRef>, import("xstate").StateValue, string, unknown, any, any>, import("./types").TTSEvent, import("xstate").AnyEventObject>;
|
|
23389
|
+
}) => {
|
|
23390
|
+
audioContext: AudioContext;
|
|
23391
|
+
cacheURL: string;
|
|
23392
|
+
utterance: string;
|
|
23393
|
+
voice: string;
|
|
23394
|
+
locale: string;
|
|
23395
|
+
};
|
|
23396
|
+
readonly onDone: {
|
|
23397
|
+
readonly target: "PlayAudio";
|
|
23398
|
+
readonly actions: import("xstate").ActionFunction<import("./types").TTSContext, import("xstate").DoneActorEvent<any, string>, import("./types").TTSEvent, undefined, import("xstate").Values<{
|
|
23399
|
+
checkCache: {
|
|
23400
|
+
src: "checkCache";
|
|
23401
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
23402
|
+
cacheURL: string;
|
|
23403
|
+
utterance: string;
|
|
23404
|
+
voice: string;
|
|
23405
|
+
locale: string;
|
|
23406
|
+
}, import("xstate").EventObject>;
|
|
23407
|
+
id: string;
|
|
23408
|
+
};
|
|
23409
|
+
getAudioFromCache: {
|
|
23410
|
+
src: "getAudioFromCache";
|
|
23411
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
23412
|
+
audioContext: AudioContext;
|
|
23413
|
+
cacheURL: string;
|
|
23414
|
+
utterance: string;
|
|
23415
|
+
voice: string;
|
|
23416
|
+
locale: string;
|
|
23417
|
+
}, import("xstate").EventObject>;
|
|
23418
|
+
id: string;
|
|
23419
|
+
};
|
|
23420
|
+
getAudio: {
|
|
23421
|
+
src: "getAudio";
|
|
23422
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
23423
|
+
audioContext: AudioContext;
|
|
23424
|
+
audioURL: string;
|
|
23425
|
+
}, import("xstate").EventObject>;
|
|
23426
|
+
id: string;
|
|
23427
|
+
};
|
|
23428
|
+
playAudio: {
|
|
23429
|
+
src: "playAudio";
|
|
23430
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, {
|
|
23431
|
+
audioContext: AudioContext;
|
|
23432
|
+
audioBuffer: AudioBuffer;
|
|
23433
|
+
}, import("xstate").EventObject>;
|
|
23434
|
+
id: string;
|
|
23435
|
+
};
|
|
23436
|
+
createEventsFromStream: {
|
|
23437
|
+
src: "createEventsFromStream";
|
|
23438
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("./types").Agenda, import("xstate").EventObject>;
|
|
23439
|
+
id: string;
|
|
23440
|
+
};
|
|
23441
|
+
ponyfill: {
|
|
23442
|
+
src: "ponyfill";
|
|
23443
|
+
logic: import("xstate").CallbackActorLogic<null, import("./types").TTSPonyfillInput, import("xstate").EventObject>;
|
|
23444
|
+
id: string;
|
|
23445
|
+
};
|
|
23446
|
+
start: {
|
|
23447
|
+
src: "start";
|
|
23448
|
+
logic: import("xstate").CallbackActorLogic<null, {
|
|
23449
|
+
utterance: string;
|
|
23450
|
+
voice: string;
|
|
23451
|
+
ttsLexicon: string;
|
|
23452
|
+
locale: string;
|
|
23453
|
+
wsaUtt: {
|
|
23454
|
+
prototype: SpeechSynthesisUtterance;
|
|
23455
|
+
new (text?: string): SpeechSynthesisUtterance;
|
|
23456
|
+
};
|
|
23457
|
+
wsaTTS: SpeechSynthesis;
|
|
23458
|
+
visemes?: boolean;
|
|
23459
|
+
}, import("xstate").EventObject>;
|
|
23460
|
+
id: string;
|
|
23461
|
+
};
|
|
23462
|
+
}>, never, never, never, never>;
|
|
23463
|
+
};
|
|
23464
|
+
readonly onError: "#TtsStreamGo";
|
|
23465
|
+
};
|
|
23466
|
+
};
|
|
23467
|
+
readonly PlayAudio: {
|
|
23468
|
+
readonly entry: ({ context }: import("xstate").ActionArgs<import("./types").TTSContext, import("./types").TTSEvent, import("./types").TTSEvent>) => void;
|
|
23469
|
+
readonly invoke: {
|
|
23470
|
+
readonly src: "playAudio";
|
|
23471
|
+
readonly input: ({ context }: {
|
|
23472
|
+
context: import("./types").TTSContext;
|
|
23473
|
+
event: import("./types").TTSEvent;
|
|
23474
|
+
self: import("xstate").ActorRef<import("xstate").MachineSnapshot<import("./types").TTSContext, import("./types").TTSEvent, Record<string, import("xstate").AnyActorRef>, import("xstate").StateValue, string, unknown, any, any>, import("./types").TTSEvent, import("xstate").AnyEventObject>;
|
|
23475
|
+
}) => {
|
|
23476
|
+
audioBuffer: AudioBuffer;
|
|
23477
|
+
audioContext: AudioContext;
|
|
23478
|
+
};
|
|
23479
|
+
};
|
|
23480
|
+
readonly on: {
|
|
23481
|
+
readonly CONTROL: "PausedAudio";
|
|
23482
|
+
readonly SPEAK_COMPLETE: readonly [{
|
|
23483
|
+
readonly target: "#SpeakingDone";
|
|
23484
|
+
readonly guard: import("xstate/dist/declarations/src/guards").GuardPredicate<import("./types").TTSContext, {
|
|
23485
|
+
type: "SPEAK_COMPLETE";
|
|
23486
|
+
}, unknown, any>;
|
|
23487
|
+
}, {
|
|
23488
|
+
readonly target: "#SpeakingIdle";
|
|
23489
|
+
}];
|
|
23490
|
+
readonly TTS_STARTED: {
|
|
23491
|
+
readonly actions: readonly [import("xstate").ActionFunction<import("./types").TTSContext, {
|
|
23492
|
+
type: "TTS_STARTED";
|
|
23493
|
+
value?: AudioBufferSourceNode;
|
|
23494
|
+
}, import("./types").TTSEvent, undefined, never, never, never, "FILLER_DELAY" | "STREAMING_TIMEOUT", never>, import("xstate").ActionFunction<import("./types").TTSContext, {
|
|
23495
|
+
type: "TTS_STARTED";
|
|
23496
|
+
value?: AudioBufferSourceNode;
|
|
23497
|
+
}, import("./types").TTSEvent, undefined, import("xstate").Values<{
|
|
23498
|
+
checkCache: {
|
|
23499
|
+
src: "checkCache";
|
|
23500
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
23501
|
+
cacheURL: string;
|
|
23502
|
+
utterance: string;
|
|
23503
|
+
voice: string;
|
|
23504
|
+
locale: string;
|
|
23505
|
+
}, import("xstate").EventObject>;
|
|
23506
|
+
id: string;
|
|
23507
|
+
};
|
|
23508
|
+
getAudioFromCache: {
|
|
23509
|
+
src: "getAudioFromCache";
|
|
23510
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
23511
|
+
audioContext: AudioContext;
|
|
23512
|
+
cacheURL: string;
|
|
23513
|
+
utterance: string;
|
|
23514
|
+
voice: string;
|
|
23515
|
+
locale: string;
|
|
23516
|
+
}, import("xstate").EventObject>;
|
|
23517
|
+
id: string;
|
|
23518
|
+
};
|
|
23519
|
+
getAudio: {
|
|
23520
|
+
src: "getAudio";
|
|
23521
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
23522
|
+
audioContext: AudioContext;
|
|
23523
|
+
audioURL: string;
|
|
23524
|
+
}, import("xstate").EventObject>;
|
|
23525
|
+
id: string;
|
|
23526
|
+
};
|
|
23527
|
+
playAudio: {
|
|
23528
|
+
src: "playAudio";
|
|
23529
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, {
|
|
23530
|
+
audioContext: AudioContext;
|
|
23531
|
+
audioBuffer: AudioBuffer;
|
|
23532
|
+
}, import("xstate").EventObject>;
|
|
23533
|
+
id: string;
|
|
23534
|
+
};
|
|
23535
|
+
createEventsFromStream: {
|
|
23536
|
+
src: "createEventsFromStream";
|
|
23537
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("./types").Agenda, import("xstate").EventObject>;
|
|
23538
|
+
id: string;
|
|
23539
|
+
};
|
|
23540
|
+
ponyfill: {
|
|
23541
|
+
src: "ponyfill";
|
|
23542
|
+
logic: import("xstate").CallbackActorLogic<null, import("./types").TTSPonyfillInput, import("xstate").EventObject>;
|
|
23543
|
+
id: string;
|
|
23544
|
+
};
|
|
23545
|
+
start: {
|
|
23546
|
+
src: "start";
|
|
23547
|
+
logic: import("xstate").CallbackActorLogic<null, {
|
|
23548
|
+
utterance: string;
|
|
23549
|
+
voice: string;
|
|
23550
|
+
ttsLexicon: string;
|
|
23551
|
+
locale: string;
|
|
23552
|
+
wsaUtt: {
|
|
23553
|
+
prototype: SpeechSynthesisUtterance;
|
|
23554
|
+
new (text?: string): SpeechSynthesisUtterance;
|
|
23555
|
+
};
|
|
23556
|
+
wsaTTS: SpeechSynthesis;
|
|
23557
|
+
visemes?: boolean;
|
|
23558
|
+
}, import("xstate").EventObject>;
|
|
23559
|
+
id: string;
|
|
23560
|
+
};
|
|
23561
|
+
}>, never, never, never, never>];
|
|
23562
|
+
};
|
|
23563
|
+
};
|
|
23564
|
+
readonly exit: "ttsStop";
|
|
23565
|
+
};
|
|
23566
|
+
readonly PausedAudio: {
|
|
23567
|
+
readonly on: {
|
|
23568
|
+
readonly CONTROL: "PlayAudio";
|
|
23569
|
+
};
|
|
23570
|
+
};
|
|
23571
|
+
};
|
|
23572
|
+
};
|
|
23573
|
+
readonly Go: {
|
|
23574
|
+
readonly id: "TtsStreamGo";
|
|
23575
|
+
readonly entry: readonly [({ context }: import("xstate").ActionArgs<import("./types").TTSContext, import("./types").TTSEvent, import("./types").TTSEvent>) => void, ({ context }: import("xstate").ActionArgs<import("./types").TTSContext, import("./types").TTSEvent, import("./types").TTSEvent>) => void];
|
|
23576
|
+
readonly invoke: {
|
|
23577
|
+
readonly src: "start";
|
|
23578
|
+
readonly input: ({ context }: {
|
|
23579
|
+
context: import("./types").TTSContext;
|
|
23580
|
+
event: import("./types").TTSEvent;
|
|
23581
|
+
self: import("xstate").ActorRef<import("xstate").MachineSnapshot<import("./types").TTSContext, import("./types").TTSEvent, Record<string, import("xstate").AnyActorRef>, import("xstate").StateValue, string, unknown, any, any>, import("./types").TTSEvent, import("xstate").AnyEventObject>;
|
|
23582
|
+
}) => {
|
|
23583
|
+
wsaTTS: SpeechSynthesis;
|
|
23584
|
+
wsaUtt: {
|
|
23585
|
+
new (text?: string): SpeechSynthesisUtterance;
|
|
23586
|
+
prototype: SpeechSynthesisUtterance;
|
|
23587
|
+
};
|
|
23588
|
+
ttsLexicon: string;
|
|
23589
|
+
visemes: boolean;
|
|
23590
|
+
voice: string;
|
|
23591
|
+
locale: string;
|
|
23592
|
+
utterance: string;
|
|
23593
|
+
};
|
|
23594
|
+
};
|
|
23595
|
+
readonly on: {
|
|
23596
|
+
readonly CONTROL: "Paused";
|
|
23597
|
+
readonly SPEAK_COMPLETE: readonly [{
|
|
23598
|
+
readonly target: "#SpeakingDone";
|
|
23599
|
+
readonly guard: import("xstate/dist/declarations/src/guards").GuardPredicate<import("./types").TTSContext, {
|
|
23600
|
+
type: "SPEAK_COMPLETE";
|
|
23601
|
+
}, unknown, any>;
|
|
23602
|
+
}, {
|
|
23603
|
+
readonly target: "#SpeakingIdle";
|
|
23604
|
+
}];
|
|
23605
|
+
readonly TTS_STARTED: {
|
|
23606
|
+
readonly actions: import("xstate").ActionFunction<import("./types").TTSContext, {
|
|
23607
|
+
type: "TTS_STARTED";
|
|
23608
|
+
value?: AudioBufferSourceNode;
|
|
23609
|
+
}, import("./types").TTSEvent, undefined, never, never, never, "FILLER_DELAY" | "STREAMING_TIMEOUT", never>;
|
|
23610
|
+
};
|
|
23611
|
+
};
|
|
23612
|
+
readonly exit: "ttsStop";
|
|
23613
|
+
};
|
|
23614
|
+
readonly Paused: {
|
|
23615
|
+
readonly on: {
|
|
23616
|
+
readonly CONTROL: "Go";
|
|
23617
|
+
};
|
|
23618
|
+
};
|
|
23619
|
+
};
|
|
23620
|
+
};
|
|
23621
|
+
readonly SpeakingDone: {
|
|
23622
|
+
readonly id: "SpeakingDone";
|
|
23623
|
+
readonly type: "final";
|
|
23624
|
+
};
|
|
23625
|
+
};
|
|
23626
|
+
};
|
|
23627
|
+
};
|
|
23628
|
+
readonly onDone: {
|
|
23629
|
+
readonly target: "Idle";
|
|
23630
|
+
readonly actions: import("xstate").ActionFunction<import("./types").TTSContext, import("xstate").DoneStateEvent<unknown>, import("./types").TTSEvent, undefined, never, never, never, "FILLER_DELAY" | "STREAMING_TIMEOUT", never>;
|
|
23631
|
+
};
|
|
23632
|
+
};
|
|
23633
|
+
readonly Playing: {
|
|
23634
|
+
readonly on: {
|
|
23635
|
+
readonly SPEAK_COMPLETE: {
|
|
23636
|
+
readonly target: "Idle";
|
|
23637
|
+
readonly actions: import("xstate").ActionFunction<import("./types").TTSContext, {
|
|
23638
|
+
type: "SPEAK_COMPLETE";
|
|
23639
|
+
}, import("./types").TTSEvent, undefined, never, never, never, "FILLER_DELAY" | "STREAMING_TIMEOUT", never>;
|
|
23640
|
+
};
|
|
23641
|
+
readonly TTS_STARTED: {
|
|
23642
|
+
readonly actions: readonly [import("xstate").ActionFunction<import("./types").TTSContext, {
|
|
23643
|
+
type: "TTS_STARTED";
|
|
23644
|
+
value?: AudioBufferSourceNode;
|
|
23645
|
+
}, import("./types").TTSEvent, undefined, never, never, never, "FILLER_DELAY" | "STREAMING_TIMEOUT", never>, import("xstate").ActionFunction<import("./types").TTSContext, {
|
|
23646
|
+
type: "TTS_STARTED";
|
|
23647
|
+
value?: AudioBufferSourceNode;
|
|
23648
|
+
}, import("./types").TTSEvent, undefined, import("xstate").Values<{
|
|
23649
|
+
checkCache: {
|
|
23650
|
+
src: "checkCache";
|
|
23651
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
23652
|
+
cacheURL: string;
|
|
23653
|
+
utterance: string;
|
|
23654
|
+
voice: string;
|
|
23655
|
+
locale: string;
|
|
23656
|
+
}, import("xstate").EventObject>;
|
|
23657
|
+
id: string;
|
|
23658
|
+
};
|
|
23659
|
+
getAudioFromCache: {
|
|
23660
|
+
src: "getAudioFromCache";
|
|
23661
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
23662
|
+
audioContext: AudioContext;
|
|
23663
|
+
cacheURL: string;
|
|
23664
|
+
utterance: string;
|
|
23665
|
+
voice: string;
|
|
23666
|
+
locale: string;
|
|
23667
|
+
}, import("xstate").EventObject>;
|
|
23668
|
+
id: string;
|
|
23669
|
+
};
|
|
23670
|
+
getAudio: {
|
|
23671
|
+
src: "getAudio";
|
|
23672
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
23673
|
+
audioContext: AudioContext;
|
|
23674
|
+
audioURL: string;
|
|
23675
|
+
}, import("xstate").EventObject>;
|
|
23676
|
+
id: string;
|
|
23677
|
+
};
|
|
23678
|
+
playAudio: {
|
|
23679
|
+
src: "playAudio";
|
|
23680
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, {
|
|
23681
|
+
audioContext: AudioContext;
|
|
23682
|
+
audioBuffer: AudioBuffer;
|
|
23683
|
+
}, import("xstate").EventObject>;
|
|
23684
|
+
id: string;
|
|
23685
|
+
};
|
|
23686
|
+
createEventsFromStream: {
|
|
23687
|
+
src: "createEventsFromStream";
|
|
23688
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("./types").Agenda, import("xstate").EventObject>;
|
|
23689
|
+
id: string;
|
|
23690
|
+
};
|
|
23691
|
+
ponyfill: {
|
|
23692
|
+
src: "ponyfill";
|
|
23693
|
+
logic: import("xstate").CallbackActorLogic<null, import("./types").TTSPonyfillInput, import("xstate").EventObject>;
|
|
23694
|
+
id: string;
|
|
23695
|
+
};
|
|
23696
|
+
start: {
|
|
23697
|
+
src: "start";
|
|
23698
|
+
logic: import("xstate").CallbackActorLogic<null, {
|
|
23699
|
+
utterance: string;
|
|
23700
|
+
voice: string;
|
|
23701
|
+
ttsLexicon: string;
|
|
23702
|
+
locale: string;
|
|
23703
|
+
wsaUtt: {
|
|
23704
|
+
prototype: SpeechSynthesisUtterance;
|
|
23705
|
+
new (text?: string): SpeechSynthesisUtterance;
|
|
23706
|
+
};
|
|
23707
|
+
wsaTTS: SpeechSynthesis;
|
|
23708
|
+
visemes?: boolean;
|
|
23709
|
+
}, import("xstate").EventObject>;
|
|
23710
|
+
id: string;
|
|
23711
|
+
};
|
|
23712
|
+
}>, never, never, never, never>];
|
|
23713
|
+
};
|
|
23714
|
+
readonly STOP: {
|
|
23715
|
+
readonly target: "Idle";
|
|
23716
|
+
};
|
|
23717
|
+
};
|
|
23718
|
+
readonly initial: "FetchAudio";
|
|
23719
|
+
readonly states: {
|
|
23720
|
+
readonly FetchAudio: {
|
|
23721
|
+
readonly invoke: {
|
|
23722
|
+
readonly src: "getAudio";
|
|
23723
|
+
readonly input: ({ context }: {
|
|
23724
|
+
context: import("./types").TTSContext;
|
|
23725
|
+
event: import("./types").TTSEvent;
|
|
23726
|
+
self: import("xstate").ActorRef<import("xstate").MachineSnapshot<import("./types").TTSContext, import("./types").TTSEvent, Record<string, import("xstate").AnyActorRef>, import("xstate").StateValue, string, unknown, any, any>, import("./types").TTSEvent, import("xstate").AnyEventObject>;
|
|
23727
|
+
}) => {
|
|
23728
|
+
audioContext: AudioContext;
|
|
23729
|
+
audioURL: string;
|
|
23730
|
+
};
|
|
23731
|
+
readonly onDone: {
|
|
23732
|
+
readonly target: "PlayAudio";
|
|
23733
|
+
readonly actions: import("xstate").ActionFunction<import("./types").TTSContext, import("xstate").DoneActorEvent<any, string>, import("./types").TTSEvent, undefined, import("xstate").Values<{
|
|
23734
|
+
checkCache: {
|
|
23735
|
+
src: "checkCache";
|
|
23736
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
23737
|
+
cacheURL: string;
|
|
23738
|
+
utterance: string;
|
|
23739
|
+
voice: string;
|
|
23740
|
+
locale: string;
|
|
23741
|
+
}, import("xstate").EventObject>;
|
|
23742
|
+
id: string;
|
|
23743
|
+
};
|
|
23744
|
+
getAudioFromCache: {
|
|
23745
|
+
src: "getAudioFromCache";
|
|
23746
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
23747
|
+
audioContext: AudioContext;
|
|
23748
|
+
cacheURL: string;
|
|
23749
|
+
utterance: string;
|
|
23750
|
+
voice: string;
|
|
23751
|
+
locale: string;
|
|
23752
|
+
}, import("xstate").EventObject>;
|
|
23753
|
+
id: string;
|
|
23754
|
+
};
|
|
23755
|
+
getAudio: {
|
|
23756
|
+
src: "getAudio";
|
|
23757
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
23758
|
+
audioContext: AudioContext;
|
|
23759
|
+
audioURL: string;
|
|
23760
|
+
}, import("xstate").EventObject>;
|
|
23761
|
+
id: string;
|
|
23762
|
+
};
|
|
23763
|
+
playAudio: {
|
|
23764
|
+
src: "playAudio";
|
|
23765
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, {
|
|
23766
|
+
audioContext: AudioContext;
|
|
23767
|
+
audioBuffer: AudioBuffer;
|
|
23768
|
+
}, import("xstate").EventObject>;
|
|
23769
|
+
id: string;
|
|
23770
|
+
};
|
|
23771
|
+
createEventsFromStream: {
|
|
23772
|
+
src: "createEventsFromStream";
|
|
23773
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("./types").Agenda, import("xstate").EventObject>;
|
|
23774
|
+
id: string;
|
|
23775
|
+
};
|
|
23776
|
+
ponyfill: {
|
|
23777
|
+
src: "ponyfill";
|
|
23778
|
+
logic: import("xstate").CallbackActorLogic<null, import("./types").TTSPonyfillInput, import("xstate").EventObject>;
|
|
23779
|
+
id: string;
|
|
23780
|
+
};
|
|
23781
|
+
start: {
|
|
23782
|
+
src: "start";
|
|
23783
|
+
logic: import("xstate").CallbackActorLogic<null, {
|
|
23784
|
+
utterance: string;
|
|
23785
|
+
voice: string;
|
|
23786
|
+
ttsLexicon: string;
|
|
23787
|
+
locale: string;
|
|
23788
|
+
wsaUtt: {
|
|
23789
|
+
prototype: SpeechSynthesisUtterance;
|
|
23790
|
+
new (text?: string): SpeechSynthesisUtterance;
|
|
23791
|
+
};
|
|
23792
|
+
wsaTTS: SpeechSynthesis;
|
|
23793
|
+
visemes?: boolean;
|
|
23794
|
+
}, import("xstate").EventObject>;
|
|
23795
|
+
id: string;
|
|
23796
|
+
};
|
|
23797
|
+
}>, never, never, never, never>;
|
|
23798
|
+
};
|
|
23799
|
+
readonly onError: {
|
|
23800
|
+
readonly target: "#Speaking";
|
|
23801
|
+
};
|
|
23802
|
+
};
|
|
23803
|
+
};
|
|
23804
|
+
readonly PlayAudio: {
|
|
23805
|
+
readonly entry: readonly [({ context }: import("xstate").ActionArgs<import("./types").TTSContext, import("./types").TTSEvent, import("./types").TTSEvent>) => void, ({ context }: import("xstate").ActionArgs<import("./types").TTSContext, import("./types").TTSEvent, import("./types").TTSEvent>) => void];
|
|
23806
|
+
readonly invoke: {
|
|
23807
|
+
readonly src: "playAudio";
|
|
23808
|
+
readonly input: ({ context }: {
|
|
23809
|
+
context: import("./types").TTSContext;
|
|
23810
|
+
event: import("./types").TTSEvent;
|
|
23811
|
+
self: import("xstate").ActorRef<import("xstate").MachineSnapshot<import("./types").TTSContext, import("./types").TTSEvent, Record<string, import("xstate").AnyActorRef>, import("xstate").StateValue, string, unknown, any, any>, import("./types").TTSEvent, import("xstate").AnyEventObject>;
|
|
23812
|
+
}) => {
|
|
23813
|
+
audioContext: AudioContext;
|
|
23814
|
+
audioBuffer: AudioBuffer;
|
|
23815
|
+
};
|
|
23816
|
+
};
|
|
23817
|
+
readonly on: {
|
|
23818
|
+
readonly CONTROL: "AudioPaused";
|
|
23819
|
+
};
|
|
23820
|
+
readonly exit: "ttsStop";
|
|
23821
|
+
};
|
|
23822
|
+
readonly AudioPaused: {
|
|
23823
|
+
readonly on: {
|
|
23824
|
+
readonly CONTROL: "PlayAudio";
|
|
23825
|
+
};
|
|
23826
|
+
};
|
|
23827
|
+
};
|
|
23828
|
+
};
|
|
23829
|
+
readonly Speaking: {
|
|
23830
|
+
readonly id: "Speaking";
|
|
23831
|
+
readonly initial: "Go";
|
|
23832
|
+
readonly on: {
|
|
23833
|
+
readonly STOP: {
|
|
23834
|
+
readonly target: "Idle";
|
|
23835
|
+
};
|
|
23836
|
+
readonly TTS_STARTED: {
|
|
23837
|
+
readonly actions: import("xstate").ActionFunction<import("./types").TTSContext, {
|
|
23838
|
+
type: "TTS_STARTED";
|
|
23839
|
+
value?: AudioBufferSourceNode;
|
|
23840
|
+
}, import("./types").TTSEvent, undefined, never, never, never, "FILLER_DELAY" | "STREAMING_TIMEOUT", never>;
|
|
23841
|
+
};
|
|
23842
|
+
readonly VISEME: {
|
|
23843
|
+
readonly actions: import("xstate").ActionFunction<import("xstate").MachineContext, {
|
|
23844
|
+
type: "VISEME";
|
|
23845
|
+
value: any;
|
|
23846
|
+
}, import("xstate").AnyEventObject, {}, never, never, never, never, never>;
|
|
23847
|
+
};
|
|
23848
|
+
readonly SPEAK_COMPLETE: {
|
|
23849
|
+
readonly target: "Idle";
|
|
23850
|
+
};
|
|
23851
|
+
};
|
|
23852
|
+
readonly exit: import("xstate").ActionFunction<import("./types").TTSContext, import("./types").TTSEvent, import("./types").TTSEvent, undefined, never, never, never, "FILLER_DELAY" | "STREAMING_TIMEOUT", never>;
|
|
23853
|
+
readonly states: {
|
|
23854
|
+
readonly Go: {
|
|
23855
|
+
readonly invoke: {
|
|
23856
|
+
readonly src: "start";
|
|
23857
|
+
readonly input: ({ context }: {
|
|
23858
|
+
context: import("./types").TTSContext;
|
|
23859
|
+
event: import("./types").TTSEvent;
|
|
23860
|
+
self: import("xstate").ActorRef<import("xstate").MachineSnapshot<import("./types").TTSContext, import("./types").TTSEvent, Record<string, import("xstate").AnyActorRef>, import("xstate").StateValue, string, unknown, any, any>, import("./types").TTSEvent, import("xstate").AnyEventObject>;
|
|
23861
|
+
}) => {
|
|
23862
|
+
wsaTTS: SpeechSynthesis;
|
|
23863
|
+
wsaUtt: {
|
|
23864
|
+
new (text?: string): SpeechSynthesisUtterance;
|
|
23865
|
+
prototype: SpeechSynthesisUtterance;
|
|
23866
|
+
};
|
|
23867
|
+
ttsLexicon: string;
|
|
23868
|
+
voice: string;
|
|
23869
|
+
visemes: boolean;
|
|
23870
|
+
locale: string;
|
|
23871
|
+
utterance: string;
|
|
23872
|
+
};
|
|
23873
|
+
};
|
|
23874
|
+
readonly on: {
|
|
23875
|
+
readonly CONTROL: "Paused";
|
|
23876
|
+
};
|
|
23877
|
+
readonly exit: "ttsStop";
|
|
23878
|
+
};
|
|
23879
|
+
readonly Paused: {
|
|
23880
|
+
readonly on: {
|
|
23881
|
+
readonly SPEAK_COMPLETE: {};
|
|
23882
|
+
readonly CONTROL: "Go";
|
|
23883
|
+
};
|
|
23884
|
+
};
|
|
23885
|
+
};
|
|
23886
|
+
};
|
|
23887
|
+
};
|
|
23888
|
+
};
|
|
23889
|
+
};
|
|
23890
|
+
};
|
|
23891
|
+
readonly MaybeHandleNewTokens: {
|
|
23892
|
+
readonly initial: "Choice";
|
|
23893
|
+
readonly states: {
|
|
23894
|
+
readonly Choice: {
|
|
23895
|
+
readonly always: readonly [{
|
|
23896
|
+
readonly guard: ({ context }: import("xstate/dist/declarations/src/guards").GuardArgs<import("./types").TTSContext, import("./types").TTSEvent>) => boolean;
|
|
23897
|
+
readonly target: "Ponyfill";
|
|
23898
|
+
}, {
|
|
23899
|
+
readonly target: "NoPonyfill";
|
|
23900
|
+
}];
|
|
23901
|
+
};
|
|
23902
|
+
readonly NoPonyfill: {
|
|
23903
|
+
readonly entry: readonly [import("xstate").ActionFunction<import("./types").TTSContext, import("./types").TTSEvent, import("./types").TTSEvent, undefined, never, never, never, "FILLER_DELAY" | "STREAMING_TIMEOUT", never>, import("xstate").ActionFunction<import("./types").TTSContext, import("./types").TTSEvent, import("./types").TTSEvent, undefined, import("xstate").Values<{
|
|
23904
|
+
checkCache: {
|
|
23905
|
+
src: "checkCache";
|
|
23906
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
23907
|
+
cacheURL: string;
|
|
23908
|
+
utterance: string;
|
|
23909
|
+
voice: string;
|
|
23910
|
+
locale: string;
|
|
23911
|
+
}, import("xstate").EventObject>;
|
|
23912
|
+
id: string;
|
|
23913
|
+
};
|
|
23914
|
+
getAudioFromCache: {
|
|
23915
|
+
src: "getAudioFromCache";
|
|
23916
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
23917
|
+
audioContext: AudioContext;
|
|
23918
|
+
cacheURL: string;
|
|
23919
|
+
utterance: string;
|
|
23920
|
+
voice: string;
|
|
23921
|
+
locale: string;
|
|
23922
|
+
}, import("xstate").EventObject>;
|
|
23923
|
+
id: string;
|
|
23924
|
+
};
|
|
23925
|
+
getAudio: {
|
|
23926
|
+
src: "getAudio";
|
|
23927
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
23928
|
+
audioContext: AudioContext;
|
|
23929
|
+
audioURL: string;
|
|
23930
|
+
}, import("xstate").EventObject>;
|
|
23931
|
+
id: string;
|
|
23932
|
+
};
|
|
23933
|
+
playAudio: {
|
|
23934
|
+
src: "playAudio";
|
|
23935
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, {
|
|
23936
|
+
audioContext: AudioContext;
|
|
23937
|
+
audioBuffer: AudioBuffer;
|
|
23938
|
+
}, import("xstate").EventObject>;
|
|
23939
|
+
id: string;
|
|
23940
|
+
};
|
|
23941
|
+
createEventsFromStream: {
|
|
23942
|
+
src: "createEventsFromStream";
|
|
23943
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("./types").Agenda, import("xstate").EventObject>;
|
|
23944
|
+
id: string;
|
|
23945
|
+
};
|
|
23946
|
+
ponyfill: {
|
|
23947
|
+
src: "ponyfill";
|
|
23948
|
+
logic: import("xstate").CallbackActorLogic<null, import("./types").TTSPonyfillInput, import("xstate").EventObject>;
|
|
23949
|
+
id: string;
|
|
23950
|
+
};
|
|
23951
|
+
start: {
|
|
23952
|
+
src: "start";
|
|
23953
|
+
logic: import("xstate").CallbackActorLogic<null, {
|
|
23954
|
+
utterance: string;
|
|
23955
|
+
voice: string;
|
|
23956
|
+
ttsLexicon: string;
|
|
23957
|
+
locale: string;
|
|
23958
|
+
wsaUtt: {
|
|
23959
|
+
prototype: SpeechSynthesisUtterance;
|
|
23960
|
+
new (text?: string): SpeechSynthesisUtterance;
|
|
23961
|
+
};
|
|
23962
|
+
wsaTTS: SpeechSynthesis;
|
|
23963
|
+
visemes?: boolean;
|
|
23964
|
+
}, import("xstate").EventObject>;
|
|
23965
|
+
id: string;
|
|
23966
|
+
};
|
|
23967
|
+
}>, never, never, never, never>];
|
|
23968
|
+
};
|
|
23969
|
+
readonly Ponyfill: {
|
|
23970
|
+
readonly invoke: {
|
|
23971
|
+
readonly id: "ponyTTS";
|
|
23972
|
+
readonly src: "ponyfill";
|
|
23973
|
+
readonly input: ({ context }: {
|
|
23974
|
+
context: import("./types").TTSContext;
|
|
23975
|
+
event: import("./types").TTSEvent;
|
|
23976
|
+
self: import("xstate").ActorRef<import("xstate").MachineSnapshot<import("./types").TTSContext, import("./types").TTSEvent, Record<string, import("xstate").AnyActorRef>, import("xstate").StateValue, string, unknown, any, any>, import("./types").TTSEvent, import("xstate").AnyEventObject>;
|
|
23977
|
+
}) => {
|
|
23978
|
+
azureAuthorizationToken: string;
|
|
23979
|
+
azureRegion: string;
|
|
23980
|
+
audioContext: AudioContext;
|
|
23981
|
+
};
|
|
23982
|
+
};
|
|
23983
|
+
readonly on: {
|
|
23984
|
+
readonly READY: {
|
|
23985
|
+
readonly actions: import("xstate").ActionFunction<import("./types").TTSContext, {
|
|
23986
|
+
type: "READY";
|
|
23987
|
+
value: {
|
|
23988
|
+
wsaTTS: SpeechSynthesis;
|
|
23989
|
+
wsaUtt: {
|
|
23990
|
+
prototype: SpeechSynthesisUtterance;
|
|
23991
|
+
new (text?: string): SpeechSynthesisUtterance;
|
|
23992
|
+
};
|
|
23993
|
+
};
|
|
23994
|
+
}, import("./types").TTSEvent, undefined, import("xstate").Values<{
|
|
23995
|
+
checkCache: {
|
|
23996
|
+
src: "checkCache";
|
|
23997
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
23998
|
+
cacheURL: string;
|
|
23999
|
+
utterance: string;
|
|
24000
|
+
voice: string;
|
|
24001
|
+
locale: string;
|
|
24002
|
+
}, import("xstate").EventObject>;
|
|
24003
|
+
id: string;
|
|
24004
|
+
};
|
|
24005
|
+
getAudioFromCache: {
|
|
24006
|
+
src: "getAudioFromCache";
|
|
24007
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
24008
|
+
audioContext: AudioContext;
|
|
24009
|
+
cacheURL: string;
|
|
24010
|
+
utterance: string;
|
|
24011
|
+
voice: string;
|
|
24012
|
+
locale: string;
|
|
24013
|
+
}, import("xstate").EventObject>;
|
|
24014
|
+
id: string;
|
|
24015
|
+
};
|
|
24016
|
+
getAudio: {
|
|
24017
|
+
src: "getAudio";
|
|
24018
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
24019
|
+
audioContext: AudioContext;
|
|
24020
|
+
audioURL: string;
|
|
24021
|
+
}, import("xstate").EventObject>;
|
|
24022
|
+
id: string;
|
|
24023
|
+
};
|
|
24024
|
+
playAudio: {
|
|
24025
|
+
src: "playAudio";
|
|
24026
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, {
|
|
24027
|
+
audioContext: AudioContext;
|
|
24028
|
+
audioBuffer: AudioBuffer;
|
|
24029
|
+
}, import("xstate").EventObject>;
|
|
24030
|
+
id: string;
|
|
24031
|
+
};
|
|
24032
|
+
createEventsFromStream: {
|
|
24033
|
+
src: "createEventsFromStream";
|
|
24034
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("./types").Agenda, import("xstate").EventObject>;
|
|
24035
|
+
id: string;
|
|
24036
|
+
};
|
|
24037
|
+
ponyfill: {
|
|
24038
|
+
src: "ponyfill";
|
|
24039
|
+
logic: import("xstate").CallbackActorLogic<null, import("./types").TTSPonyfillInput, import("xstate").EventObject>;
|
|
24040
|
+
id: string;
|
|
24041
|
+
};
|
|
24042
|
+
start: {
|
|
24043
|
+
src: "start";
|
|
24044
|
+
logic: import("xstate").CallbackActorLogic<null, {
|
|
24045
|
+
utterance: string;
|
|
24046
|
+
voice: string;
|
|
24047
|
+
ttsLexicon: string;
|
|
24048
|
+
locale: string;
|
|
24049
|
+
wsaUtt: {
|
|
24050
|
+
prototype: SpeechSynthesisUtterance;
|
|
24051
|
+
new (text?: string): SpeechSynthesisUtterance;
|
|
24052
|
+
};
|
|
24053
|
+
wsaTTS: SpeechSynthesis;
|
|
24054
|
+
visemes?: boolean;
|
|
24055
|
+
}, import("xstate").EventObject>;
|
|
24056
|
+
id: string;
|
|
24057
|
+
};
|
|
24058
|
+
}>, never, never, never, never>;
|
|
24059
|
+
};
|
|
24060
|
+
readonly NEW_TOKEN: {
|
|
24061
|
+
readonly target: "Ponyfill";
|
|
24062
|
+
readonly actions: import("xstate").ActionFunction<import("./types").TTSContext, {
|
|
24063
|
+
type: "NEW_TOKEN";
|
|
24064
|
+
value: string;
|
|
24065
|
+
}, import("./types").TTSEvent, undefined, import("xstate").Values<{
|
|
24066
|
+
checkCache: {
|
|
24067
|
+
src: "checkCache";
|
|
24068
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
24069
|
+
cacheURL: string;
|
|
24070
|
+
utterance: string;
|
|
24071
|
+
voice: string;
|
|
24072
|
+
locale: string;
|
|
24073
|
+
}, import("xstate").EventObject>;
|
|
24074
|
+
id: string;
|
|
24075
|
+
};
|
|
24076
|
+
getAudioFromCache: {
|
|
24077
|
+
src: "getAudioFromCache";
|
|
24078
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
24079
|
+
audioContext: AudioContext;
|
|
24080
|
+
cacheURL: string;
|
|
24081
|
+
utterance: string;
|
|
24082
|
+
voice: string;
|
|
24083
|
+
locale: string;
|
|
24084
|
+
}, import("xstate").EventObject>;
|
|
24085
|
+
id: string;
|
|
24086
|
+
};
|
|
24087
|
+
getAudio: {
|
|
24088
|
+
src: "getAudio";
|
|
24089
|
+
logic: import("xstate").PromiseActorLogic<any, {
|
|
24090
|
+
audioContext: AudioContext;
|
|
24091
|
+
audioURL: string;
|
|
24092
|
+
}, import("xstate").EventObject>;
|
|
24093
|
+
id: string;
|
|
24094
|
+
};
|
|
24095
|
+
playAudio: {
|
|
24096
|
+
src: "playAudio";
|
|
24097
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, {
|
|
24098
|
+
audioContext: AudioContext;
|
|
24099
|
+
audioBuffer: AudioBuffer;
|
|
24100
|
+
}, import("xstate").EventObject>;
|
|
24101
|
+
id: string;
|
|
24102
|
+
};
|
|
24103
|
+
createEventsFromStream: {
|
|
24104
|
+
src: "createEventsFromStream";
|
|
24105
|
+
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("./types").Agenda, import("xstate").EventObject>;
|
|
24106
|
+
id: string;
|
|
24107
|
+
};
|
|
24108
|
+
ponyfill: {
|
|
24109
|
+
src: "ponyfill";
|
|
24110
|
+
logic: import("xstate").CallbackActorLogic<null, import("./types").TTSPonyfillInput, import("xstate").EventObject>;
|
|
24111
|
+
id: string;
|
|
24112
|
+
};
|
|
24113
|
+
start: {
|
|
24114
|
+
src: "start";
|
|
24115
|
+
logic: import("xstate").CallbackActorLogic<null, {
|
|
24116
|
+
utterance: string;
|
|
24117
|
+
voice: string;
|
|
24118
|
+
ttsLexicon: string;
|
|
24119
|
+
locale: string;
|
|
24120
|
+
wsaUtt: {
|
|
24121
|
+
prototype: SpeechSynthesisUtterance;
|
|
24122
|
+
new (text?: string): SpeechSynthesisUtterance;
|
|
24123
|
+
};
|
|
24124
|
+
wsaTTS: SpeechSynthesis;
|
|
24125
|
+
visemes?: boolean;
|
|
24126
|
+
}, import("xstate").EventObject>;
|
|
24127
|
+
id: string;
|
|
24128
|
+
};
|
|
24129
|
+
}>, never, never, never, never>;
|
|
24130
|
+
readonly reenter: true;
|
|
24131
|
+
};
|
|
24132
|
+
};
|
|
24133
|
+
};
|
|
24134
|
+
};
|
|
24135
|
+
};
|
|
24136
|
+
};
|
|
24137
|
+
}>;
|
|
24138
|
+
id: string;
|
|
24139
|
+
};
|
|
24140
|
+
asr: {
|
|
24141
|
+
src: "asr";
|
|
24142
|
+
logic: import("xstate").StateMachine<import("./types").ASRContext, import("./types").ASREvent, {
|
|
24143
|
+
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").CallbackActorLogic<null, import("./types").ASRPonyfillInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<any, import("./types").AzureLanguageCredentials & {
|
|
24144
|
+
query: string;
|
|
24145
|
+
locale: string;
|
|
24146
|
+
}, import("xstate").EventObject>>;
|
|
24147
|
+
}, import("xstate").Values<{
|
|
24148
|
+
maybe_ponyfill: {
|
|
24149
|
+
src: "maybe_ponyfill";
|
|
24150
|
+
logic: import("xstate").CallbackActorLogic<null, import("./types").ASRPonyfillInput, import("xstate").EventObject>;
|
|
24151
|
+
id: string;
|
|
24152
|
+
};
|
|
24153
|
+
nluPromise: {
|
|
24154
|
+
src: "nluPromise";
|
|
24155
|
+
logic: import("xstate").PromiseActorLogic<any, import("./types").AzureLanguageCredentials & {
|
|
24156
|
+
query: string;
|
|
24157
|
+
locale: string;
|
|
24158
|
+
}, import("xstate").EventObject>;
|
|
24159
|
+
id: string;
|
|
24160
|
+
};
|
|
24161
|
+
}>, import("xstate").Values<{
|
|
24162
|
+
raise_noinput_after_timeout: {
|
|
24163
|
+
type: "raise_noinput_after_timeout";
|
|
24164
|
+
params: {};
|
|
24165
|
+
};
|
|
24166
|
+
cancel_noinput_timeout: {
|
|
24167
|
+
type: "cancel_noinput_timeout";
|
|
24168
|
+
params: {};
|
|
24169
|
+
};
|
|
24170
|
+
}>, {
|
|
24171
|
+
type: "nlu_is_activated";
|
|
24172
|
+
params: unknown;
|
|
24173
|
+
}, "noinputTimeout", "Ready" | "Fail" | {
|
|
24174
|
+
Recognising: "WaitForRecogniser" | "InProgress" | "InterimResult" | "WaitToStop" | "Stopped" | "NLURequest" | {
|
|
24175
|
+
NoInput: "Wait" | "ApplyNoInputTimeout";
|
|
24176
|
+
} | {
|
|
24177
|
+
Pausing: "Paused" | "WaitToPause" | "Continue";
|
|
24178
|
+
};
|
|
24179
|
+
}, string, import("./types").ASRInit, {}, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
24180
|
+
readonly id: "asr";
|
|
24181
|
+
readonly context: ({ input }: {
|
|
24182
|
+
spawn: {
|
|
24183
|
+
<TSrc extends "maybe_ponyfill" | "nluPromise">(logic: TSrc, ...[options]: ({
|
|
24184
|
+
src: "maybe_ponyfill";
|
|
24185
|
+
logic: import("xstate").CallbackActorLogic<null, import("./types").ASRPonyfillInput, import("xstate").EventObject>;
|
|
24186
|
+
id: string;
|
|
24187
|
+
} extends infer T ? T extends {
|
|
24188
|
+
src: "maybe_ponyfill";
|
|
24189
|
+
logic: import("xstate").CallbackActorLogic<null, import("./types").ASRPonyfillInput, import("xstate").EventObject>;
|
|
24190
|
+
id: string;
|
|
24191
|
+
} ? T extends {
|
|
24192
|
+
src: TSrc;
|
|
24193
|
+
} ? import("xstate").ConditionalRequired<[options?: {
|
|
24194
|
+
id?: T["id"];
|
|
24195
|
+
systemId?: string;
|
|
24196
|
+
input?: import("xstate").InputFrom<T["logic"]>;
|
|
24197
|
+
syncSnapshot?: boolean;
|
|
24198
|
+
} & { [K in import("xstate").RequiredActorOptions<T>]: unknown; }], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T>>> : never : never : never) | ({
|
|
24199
|
+
src: "nluPromise";
|
|
24200
|
+
logic: import("xstate").PromiseActorLogic<any, import("./types").AzureLanguageCredentials & {
|
|
24201
|
+
query: string;
|
|
24202
|
+
locale: string;
|
|
24203
|
+
}, import("xstate").EventObject>;
|
|
24204
|
+
id: string;
|
|
24205
|
+
} extends infer T_1 ? T_1 extends {
|
|
24206
|
+
src: "nluPromise";
|
|
24207
|
+
logic: import("xstate").PromiseActorLogic<any, import("./types").AzureLanguageCredentials & {
|
|
24208
|
+
query: string;
|
|
24209
|
+
locale: string;
|
|
24210
|
+
}, import("xstate").EventObject>;
|
|
24211
|
+
id: string;
|
|
24212
|
+
} ? T_1 extends {
|
|
24213
|
+
src: TSrc;
|
|
24214
|
+
} ? import("xstate").ConditionalRequired<[options?: {
|
|
24215
|
+
id?: T_1["id"];
|
|
24216
|
+
systemId?: string;
|
|
24217
|
+
input?: import("xstate").InputFrom<T_1["logic"]>;
|
|
24218
|
+
syncSnapshot?: boolean;
|
|
24219
|
+
} & { [K_1 in import("xstate").RequiredActorOptions<T_1>]: unknown; }], import("xstate").IsNotNever<import("xstate").RequiredActorOptions<T_1>>> : never : never : never)): import("xstate").ActorRefFromLogic<import("xstate").GetConcreteByKey<import("xstate").Values<{
|
|
24220
|
+
maybe_ponyfill: {
|
|
24221
|
+
src: "maybe_ponyfill";
|
|
24222
|
+
logic: import("xstate").CallbackActorLogic<null, import("./types").ASRPonyfillInput, import("xstate").EventObject>;
|
|
24223
|
+
id: string;
|
|
24224
|
+
};
|
|
24225
|
+
nluPromise: {
|
|
24226
|
+
src: "nluPromise";
|
|
24227
|
+
logic: import("xstate").PromiseActorLogic<any, import("./types").AzureLanguageCredentials & {
|
|
24228
|
+
query: string;
|
|
24229
|
+
locale: string;
|
|
24230
|
+
}, import("xstate").EventObject>;
|
|
24231
|
+
id: string;
|
|
24232
|
+
};
|
|
24233
|
+
}>, "src", TSrc>["logic"]>;
|
|
24234
|
+
<TLogic extends import("xstate").AnyActorLogic>(src: TLogic, ...[options]: import("xstate").ConditionalRequired<[options?: {
|
|
24235
|
+
id?: never;
|
|
24236
|
+
systemId?: string;
|
|
24237
|
+
input?: import("xstate").InputFrom<TLogic>;
|
|
24238
|
+
syncSnapshot?: boolean;
|
|
24239
|
+
} & { [K in import("xstate").RequiredLogicInput<TLogic>]: unknown; }], import("xstate").IsNotNever<import("xstate").RequiredLogicInput<TLogic>>>): import("xstate").ActorRefFromLogic<TLogic>;
|
|
24240
|
+
};
|
|
24241
|
+
input: import("./types").ASRInit;
|
|
24242
|
+
self: import("xstate").ActorRef<import("xstate").MachineSnapshot<import("./types").ASRContext, import("./types").ASREvent, Record<string, import("xstate").AnyActorRef>, import("xstate").StateValue, string, unknown, any, any>, import("./types").ASREvent, import("xstate").AnyEventObject>;
|
|
24243
|
+
}) => {
|
|
24244
|
+
azureAuthorizationToken: string;
|
|
24245
|
+
asrDefaultCompleteTimeout: number;
|
|
24246
|
+
asrDefaultNoInputTimeout: number;
|
|
24247
|
+
locale: string;
|
|
24248
|
+
audioContext: AudioContext;
|
|
24249
|
+
azureRegion: string;
|
|
24250
|
+
azureLanguageCredentials: import("./types").AzureLanguageCredentials;
|
|
24251
|
+
speechRecognitionEndpointId: string;
|
|
24252
|
+
};
|
|
24253
|
+
readonly initial: "Ready";
|
|
24254
|
+
readonly on: {
|
|
24255
|
+
readonly NEW_TOKEN: {
|
|
24256
|
+
readonly actions: import("xstate").ActionFunction<import("./types").ASRContext, {
|
|
24257
|
+
type: "NEW_TOKEN";
|
|
24258
|
+
value: string;
|
|
24259
|
+
}, import("./types").ASREvent, undefined, import("xstate").Values<{
|
|
24260
|
+
maybe_ponyfill: {
|
|
24261
|
+
src: "maybe_ponyfill";
|
|
24262
|
+
logic: import("xstate").CallbackActorLogic<null, import("./types").ASRPonyfillInput, import("xstate").EventObject>;
|
|
24263
|
+
id: string;
|
|
24264
|
+
};
|
|
24265
|
+
nluPromise: {
|
|
24266
|
+
src: "nluPromise";
|
|
24267
|
+
logic: import("xstate").PromiseActorLogic<any, import("./types").AzureLanguageCredentials & {
|
|
24268
|
+
query: string;
|
|
24269
|
+
locale: string;
|
|
24270
|
+
}, import("xstate").EventObject>;
|
|
24271
|
+
id: string;
|
|
24272
|
+
};
|
|
24273
|
+
}>, never, never, never, never>;
|
|
24274
|
+
};
|
|
24275
|
+
readonly UPDATE_ASR_PARAMETERS: {
|
|
24276
|
+
readonly actions: readonly [({ event }: {
|
|
24277
|
+
event: any;
|
|
24278
|
+
}) => void, import("xstate").ActionFunction<import("xstate").MachineContext, import("xstate").AnyEventObject, import("xstate").EventObject, {}, import("xstate").ProvidedActor, never, never, never, never>];
|
|
24279
|
+
};
|
|
24280
|
+
};
|
|
24281
|
+
readonly states: {
|
|
24282
|
+
readonly Fail: {};
|
|
24283
|
+
readonly Ready: {
|
|
24284
|
+
readonly entry: import("xstate").ActionFunction<import("./types").ASRContext, import("./types").ASREvent, import("./types").ASREvent, undefined, never, never, never, "noinputTimeout", never>;
|
|
24285
|
+
readonly on: {
|
|
24286
|
+
readonly START: {
|
|
24287
|
+
readonly target: "Recognising";
|
|
24288
|
+
readonly actions: import("xstate").ActionFunction<import("./types").ASRContext, {
|
|
24289
|
+
type: "START";
|
|
24290
|
+
value?: RecogniseParameters;
|
|
24291
|
+
}, import("./types").ASREvent, undefined, import("xstate").Values<{
|
|
24292
|
+
maybe_ponyfill: {
|
|
24293
|
+
src: "maybe_ponyfill";
|
|
24294
|
+
logic: import("xstate").CallbackActorLogic<null, import("./types").ASRPonyfillInput, import("xstate").EventObject>;
|
|
24295
|
+
id: string;
|
|
24296
|
+
};
|
|
24297
|
+
nluPromise: {
|
|
24298
|
+
src: "nluPromise";
|
|
24299
|
+
logic: import("xstate").PromiseActorLogic<any, import("./types").AzureLanguageCredentials & {
|
|
24300
|
+
query: string;
|
|
24301
|
+
locale: string;
|
|
24302
|
+
}, import("xstate").EventObject>;
|
|
24303
|
+
id: string;
|
|
24304
|
+
};
|
|
24305
|
+
}>, never, never, never, never>;
|
|
24306
|
+
};
|
|
24307
|
+
};
|
|
24308
|
+
};
|
|
24309
|
+
readonly Recognising: {
|
|
24310
|
+
readonly onDone: "Ready";
|
|
24311
|
+
readonly invoke: {
|
|
24312
|
+
readonly id: "asr";
|
|
24313
|
+
readonly src: "maybe_ponyfill";
|
|
24314
|
+
readonly input: ({ context }: {
|
|
24315
|
+
context: import("./types").ASRContext;
|
|
24316
|
+
event: import("./types").ASREvent;
|
|
24317
|
+
self: import("xstate").ActorRef<import("xstate").MachineSnapshot<import("./types").ASRContext, import("./types").ASREvent, Record<string, import("xstate").AnyActorRef>, import("xstate").StateValue, string, unknown, any, any>, import("./types").ASREvent, import("xstate").AnyEventObject>;
|
|
24318
|
+
}) => {
|
|
24319
|
+
azureRegion: string;
|
|
24320
|
+
audioContext: AudioContext;
|
|
24321
|
+
azureAuthorizationToken: string;
|
|
24322
|
+
locale: string;
|
|
24323
|
+
speechRecognitionEndpointId: string;
|
|
24324
|
+
completeTimeout: number;
|
|
24325
|
+
hints: string[];
|
|
24326
|
+
};
|
|
24327
|
+
};
|
|
24328
|
+
readonly on: {
|
|
24329
|
+
readonly FINAL_RESULT: readonly [{
|
|
24330
|
+
readonly target: ".NLURequest";
|
|
24331
|
+
readonly guard: {
|
|
24332
|
+
readonly type: "nlu_is_activated";
|
|
24333
|
+
};
|
|
24334
|
+
}, {
|
|
24335
|
+
readonly target: ".WaitToStop";
|
|
24336
|
+
readonly actions: readonly [() => void, import("xstate").ActionFunction<import("./types").ASRContext, {
|
|
24337
|
+
type: "FINAL_RESULT";
|
|
24338
|
+
}, import("./types").ASREvent, undefined, never, never, never, "noinputTimeout", never>];
|
|
24339
|
+
}];
|
|
24340
|
+
readonly RESULT: {
|
|
24341
|
+
readonly actions: readonly [import("xstate").ActionFunction<import("./types").ASRContext, {
|
|
24342
|
+
type: "RESULT";
|
|
24343
|
+
value: import("./types").Hypothesis[];
|
|
24344
|
+
}, import("./types").ASREvent, undefined, import("xstate").Values<{
|
|
24345
|
+
maybe_ponyfill: {
|
|
24346
|
+
src: "maybe_ponyfill";
|
|
24347
|
+
logic: import("xstate").CallbackActorLogic<null, import("./types").ASRPonyfillInput, import("xstate").EventObject>;
|
|
24348
|
+
id: string;
|
|
24349
|
+
};
|
|
24350
|
+
nluPromise: {
|
|
24351
|
+
src: "nluPromise";
|
|
24352
|
+
logic: import("xstate").PromiseActorLogic<any, import("./types").AzureLanguageCredentials & {
|
|
24353
|
+
query: string;
|
|
24354
|
+
locale: string;
|
|
24355
|
+
}, import("xstate").EventObject>;
|
|
24356
|
+
id: string;
|
|
24357
|
+
};
|
|
24358
|
+
}>, never, never, never, never>, import("xstate").CancelAction<import("./types").ASRContext, {
|
|
24359
|
+
type: "RESULT";
|
|
24360
|
+
value: import("./types").Hypothesis[];
|
|
24361
|
+
}, undefined, import("./types").ASREvent>];
|
|
24362
|
+
readonly target: ".InterimResult";
|
|
24363
|
+
};
|
|
24364
|
+
readonly STOP: {
|
|
24365
|
+
readonly target: ".WaitToStop";
|
|
24366
|
+
};
|
|
24367
|
+
readonly CONTROL: {
|
|
24368
|
+
readonly target: ".Pausing";
|
|
24369
|
+
};
|
|
24370
|
+
readonly NOINPUT: {
|
|
24371
|
+
readonly actions: import("xstate").ActionFunction<import("./types").ASRContext, {
|
|
24372
|
+
type: "NOINPUT";
|
|
24373
|
+
}, import("./types").ASREvent, undefined, never, never, never, "noinputTimeout", never>;
|
|
24374
|
+
readonly target: ".WaitToStop";
|
|
24375
|
+
};
|
|
24376
|
+
};
|
|
24377
|
+
readonly initial: "WaitForRecogniser";
|
|
24378
|
+
readonly states: {
|
|
24379
|
+
readonly WaitForRecogniser: {
|
|
24380
|
+
readonly on: {
|
|
24381
|
+
readonly STARTED: {
|
|
24382
|
+
readonly target: "NoInput";
|
|
24383
|
+
readonly actions: readonly [() => void, import("xstate").ActionFunction<import("./types").ASRContext, {
|
|
24384
|
+
type: "STARTED";
|
|
24385
|
+
value: {
|
|
24386
|
+
wsaASRinstance: import("./types").MySpeechRecognition;
|
|
24387
|
+
};
|
|
24388
|
+
}, import("./types").ASREvent, undefined, never, never, never, "noinputTimeout", never>];
|
|
24389
|
+
};
|
|
24390
|
+
};
|
|
24391
|
+
};
|
|
24392
|
+
readonly NoInput: {
|
|
24393
|
+
readonly initial: "Wait";
|
|
24394
|
+
readonly on: {
|
|
24395
|
+
readonly STARTSPEECH: {
|
|
24396
|
+
readonly target: "InProgress";
|
|
24397
|
+
readonly actions: readonly [import("xstate").ActionFunction<import("./types").ASRContext, {
|
|
24398
|
+
type: "STARTSPEECH";
|
|
24399
|
+
}, import("./types").ASREvent, undefined, never, never, never, "noinputTimeout", never>, import("xstate").CancelAction<import("./types").ASRContext, {
|
|
24400
|
+
type: "STARTSPEECH";
|
|
24401
|
+
}, undefined, import("./types").ASREvent>];
|
|
24402
|
+
};
|
|
24403
|
+
};
|
|
24404
|
+
readonly exit: {
|
|
24405
|
+
readonly type: "cancel_noinput_timeout";
|
|
24406
|
+
};
|
|
24407
|
+
readonly states: {
|
|
24408
|
+
readonly Wait: {
|
|
24409
|
+
readonly on: {
|
|
24410
|
+
readonly START_NOINPUT_TIMEOUT: "ApplyNoInputTimeout";
|
|
24411
|
+
};
|
|
24412
|
+
};
|
|
24413
|
+
readonly ApplyNoInputTimeout: {
|
|
24414
|
+
readonly entry: readonly [({ context }: import("xstate").ActionArgs<import("./types").ASRContext, import("./types").ASREvent, import("./types").ASREvent>) => void, {
|
|
24415
|
+
readonly type: "raise_noinput_after_timeout";
|
|
24416
|
+
}];
|
|
24417
|
+
};
|
|
24418
|
+
};
|
|
24419
|
+
};
|
|
24420
|
+
readonly InProgress: {
|
|
24421
|
+
readonly entry: () => void;
|
|
24422
|
+
};
|
|
24423
|
+
readonly InterimResult: {
|
|
24424
|
+
readonly entry: readonly [({ context }: import("xstate").ActionArgs<import("./types").ASRContext, import("./types").ASREvent, import("./types").ASREvent>) => void, import("xstate").ActionFunction<import("./types").ASRContext, import("./types").ASREvent, import("./types").ASREvent, undefined, never, never, never, "noinputTimeout", never>];
|
|
24425
|
+
};
|
|
24426
|
+
readonly WaitToStop: {
|
|
24427
|
+
readonly entry: import("xstate").ActionFunction<import("./types").ASRContext, import("./types").ASREvent, import("./types").ASREvent, undefined, never, never, never, "noinputTimeout", never>;
|
|
24428
|
+
readonly on: {
|
|
24429
|
+
readonly LISTEN_COMPLETE: {
|
|
24430
|
+
readonly actions: import("xstate").ActionFunction<import("./types").ASRContext, {
|
|
24431
|
+
type: "LISTEN_COMPLETE";
|
|
24432
|
+
}, import("./types").ASREvent, undefined, never, never, never, "noinputTimeout", never>;
|
|
24433
|
+
readonly target: "Stopped";
|
|
24434
|
+
};
|
|
24435
|
+
};
|
|
24436
|
+
};
|
|
24437
|
+
readonly Pausing: {
|
|
24438
|
+
readonly onDone: "#asr.Recognising";
|
|
24439
|
+
readonly initial: "WaitToPause";
|
|
24440
|
+
readonly states: {
|
|
24441
|
+
readonly WaitToPause: {
|
|
24442
|
+
readonly entry: import("xstate").ActionFunction<import("./types").ASRContext, import("./types").ASREvent, import("./types").ASREvent, undefined, never, never, never, "noinputTimeout", never>;
|
|
24443
|
+
readonly on: {
|
|
24444
|
+
readonly LISTEN_COMPLETE: {
|
|
24445
|
+
readonly target: "Paused";
|
|
24446
|
+
};
|
|
24447
|
+
};
|
|
24448
|
+
};
|
|
24449
|
+
readonly Paused: {
|
|
24450
|
+
readonly entry: import("xstate").ActionFunction<import("./types").ASRContext, import("./types").ASREvent, import("./types").ASREvent, undefined, never, never, never, "noinputTimeout", never>;
|
|
24451
|
+
readonly on: {
|
|
24452
|
+
readonly CONTROL: {
|
|
24453
|
+
readonly target: "Continue";
|
|
24454
|
+
};
|
|
24455
|
+
};
|
|
24456
|
+
};
|
|
24457
|
+
readonly Continue: {
|
|
24458
|
+
readonly type: "final";
|
|
24459
|
+
};
|
|
24460
|
+
};
|
|
24461
|
+
};
|
|
24462
|
+
readonly NLURequest: {
|
|
24463
|
+
readonly invoke: {
|
|
24464
|
+
readonly src: "nluPromise";
|
|
24465
|
+
readonly input: ({ context }: {
|
|
24466
|
+
context: import("./types").ASRContext;
|
|
24467
|
+
event: import("./types").ASREvent;
|
|
24468
|
+
self: import("xstate").ActorRef<import("xstate").MachineSnapshot<import("./types").ASRContext, import("./types").ASREvent, Record<string, import("xstate").AnyActorRef>, import("xstate").StateValue, string, unknown, any, any>, import("./types").ASREvent, import("xstate").AnyEventObject>;
|
|
24469
|
+
}) => {
|
|
24470
|
+
endpoint: string;
|
|
24471
|
+
key: string;
|
|
24472
|
+
projectName: string;
|
|
24473
|
+
deploymentName: string;
|
|
24474
|
+
query: string;
|
|
24475
|
+
locale: string;
|
|
24476
|
+
};
|
|
24477
|
+
readonly onDone: readonly [{
|
|
24478
|
+
readonly actions: readonly [({ event }: import("xstate").ActionArgs<import("./types").ASRContext, import("xstate").DoneActorEvent<any, string>, import("./types").ASREvent>) => void, import("xstate").ActionFunction<import("./types").ASRContext, import("xstate").DoneActorEvent<any, string>, import("./types").ASREvent, undefined, never, never, never, "noinputTimeout", never>];
|
|
24479
|
+
readonly target: "WaitToStop";
|
|
24480
|
+
readonly guard: ({ event }: import("xstate/dist/declarations/src/guards").GuardArgs<import("./types").ASRContext, import("xstate").DoneActorEvent<any, string>>) => boolean;
|
|
24481
|
+
}, {
|
|
24482
|
+
readonly actions: readonly [({ event }: import("xstate").ActionArgs<import("./types").ASRContext, import("xstate").DoneActorEvent<any, string>, import("./types").ASREvent>) => void, import("xstate").ActionFunction<import("./types").ASRContext, import("xstate").DoneActorEvent<any, string>, import("./types").ASREvent, undefined, never, never, never, "noinputTimeout", never>];
|
|
24483
|
+
readonly target: "WaitToStop";
|
|
24484
|
+
}];
|
|
24485
|
+
readonly onError: {
|
|
24486
|
+
readonly actions: readonly [({ event }: import("xstate").ActionArgs<import("./types").ASRContext, import("xstate").ErrorActorEvent<unknown, string>, import("./types").ASREvent>) => void, import("xstate").ActionFunction<import("./types").ASRContext, import("xstate").ErrorActorEvent<unknown, string>, import("./types").ASREvent, undefined, never, never, never, "noinputTimeout", never>];
|
|
24487
|
+
readonly target: "WaitToStop";
|
|
24488
|
+
};
|
|
24489
|
+
};
|
|
24490
|
+
};
|
|
24491
|
+
readonly Stopped: {
|
|
24492
|
+
readonly type: "final";
|
|
24493
|
+
};
|
|
24494
|
+
};
|
|
24495
|
+
};
|
|
24496
|
+
};
|
|
24497
|
+
}>;
|
|
24498
|
+
id: string;
|
|
24499
|
+
};
|
|
24500
|
+
getToken: {
|
|
24501
|
+
src: "getToken";
|
|
24502
|
+
logic: import("xstate").PromiseActorLogic<string, {
|
|
24503
|
+
credentials: import("./types").AzureSpeechTokenProxyCredentials | import("./types").AzureSpeechCredentials | string;
|
|
24504
|
+
}, import("xstate").EventObject>;
|
|
24505
|
+
id: string;
|
|
24506
|
+
};
|
|
24507
|
+
visemes: {
|
|
24508
|
+
src: "visemes";
|
|
24509
|
+
logic: import("xstate").StateMachine<{
|
|
24510
|
+
queue: number[];
|
|
24511
|
+
}, {
|
|
24512
|
+
type: "VISEME";
|
|
24513
|
+
value: any;
|
|
24514
|
+
}, {}, never, never, never, never, "Init", string, {}, {}, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
24515
|
+
readonly context: {
|
|
24516
|
+
readonly queue: [];
|
|
24517
|
+
};
|
|
24518
|
+
readonly initial: "Init";
|
|
24519
|
+
readonly states: {
|
|
24520
|
+
readonly Init: {
|
|
24521
|
+
readonly on: {
|
|
24522
|
+
readonly VISEME: readonly [{
|
|
24523
|
+
readonly guard: ({ event }: import("xstate/dist/declarations/src/guards").GuardArgs<{
|
|
24524
|
+
queue: number[];
|
|
24525
|
+
}, {
|
|
24526
|
+
type: "VISEME";
|
|
24527
|
+
value: any;
|
|
24528
|
+
}>) => boolean;
|
|
24529
|
+
readonly actions: readonly [import("xstate").ActionFunction<{
|
|
24530
|
+
queue: number[];
|
|
24531
|
+
}, {
|
|
24532
|
+
type: "VISEME";
|
|
24533
|
+
value: any;
|
|
24534
|
+
}, {
|
|
24535
|
+
type: "VISEME";
|
|
24536
|
+
value: any;
|
|
24537
|
+
}, undefined, never, never, never, never, never>];
|
|
24538
|
+
}];
|
|
24539
|
+
};
|
|
24540
|
+
};
|
|
24541
|
+
};
|
|
24542
|
+
}>;
|
|
24543
|
+
id: string;
|
|
24544
|
+
};
|
|
24545
|
+
}>, never, never, never, never>, () => void, ({ context, event }: import("xstate").ActionArgs<SSContext, {
|
|
22333
24546
|
type: "UPDATE_ASR_PARAMETERS";
|
|
22334
24547
|
value: RecogniseParameters;
|
|
22335
24548
|
}, SpeechStateEvent>) => any];
|