@@ -1430,14 +1430,6 @@ interface ServiceWorkerMessageEventInit extends EventInit {
14301430 source?: ServiceWorker | MessagePort | null;
14311431}
14321432
1433- interface SpeechSynthesisEventInit extends EventInit {
1434- charIndex?: number;
1435- charLength?: number;
1436- elapsedTime?: number;
1437- name?: string;
1438- utterance?: SpeechSynthesisUtterance | null;
1439- }
1440-
14411433interface StereoPannerOptions extends AudioNodeOptions {
14421434 pan?: number;
14431435}
@@ -4463,6 +4455,9 @@ interface DocumentEvent {
44634455 createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent;
44644456 createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent;
44654457 createEvent(eventInterface: "ServiceWorkerMessageEvent"): ServiceWorkerMessageEvent;
4458+ createEvent(eventInterface: "SpeechRecognitionError"): SpeechRecognitionError;
4459+ createEvent(eventInterface: "SpeechRecognitionEvent"): SpeechRecognitionEvent;
4460+ createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent;
44664461 createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent;
44674462 createEvent(eventInterface: "StorageEvent"): StorageEvent;
44684463 createEvent(eventInterface: "TextEvent"): TextEvent;
@@ -13669,6 +13664,130 @@ declare var SourceBufferList: {
1366913664 new(): SourceBufferList;
1367013665};
1367113666
13667+ interface SpeechGrammar {
13668+ src: string;
13669+ weight: number;
13670+ }
13671+
13672+ declare var SpeechGrammar: {
13673+ prototype: SpeechGrammar;
13674+ new(): SpeechGrammar;
13675+ };
13676+
13677+ interface SpeechGrammarList {
13678+ readonly length: number;
13679+ addFromString(string: string, weight?: number): void;
13680+ addFromURI(src: string, weight?: number): void;
13681+ item(index: number): SpeechGrammar;
13682+ [index: number]: SpeechGrammar;
13683+ }
13684+
13685+ declare var SpeechGrammarList: {
13686+ prototype: SpeechGrammarList;
13687+ new(): SpeechGrammarList;
13688+ };
13689+
13690+ interface SpeechRecognitionEventMap {
13691+ "audioend": Event;
13692+ "audiostart": Event;
13693+ "end": Event;
13694+ "error": SpeechRecognitionError;
13695+ "nomatch": SpeechRecognitionEvent;
13696+ "result": SpeechRecognitionEvent;
13697+ "soundend": Event;
13698+ "soundstart": Event;
13699+ "speechend": Event;
13700+ "speechstart": Event;
13701+ "start": Event;
13702+ }
13703+
13704+ interface SpeechRecognition extends EventTarget {
13705+ continuous: boolean;
13706+ grammars: SpeechGrammarList;
13707+ interimResults: boolean;
13708+ lang: string;
13709+ maxAlternatives: number;
13710+ onaudioend: ((this: SpeechRecognition, ev: Event) => any) | null;
13711+ onaudiostart: ((this: SpeechRecognition, ev: Event) => any) | null;
13712+ onend: ((this: SpeechRecognition, ev: Event) => any) | null;
13713+ onerror: ((this: SpeechRecognition, ev: SpeechRecognitionError) => any) | null;
13714+ onnomatch: ((this: SpeechRecognition, ev: SpeechRecognitionEvent) => any) | null;
13715+ onresult: ((this: SpeechRecognition, ev: SpeechRecognitionEvent) => any) | null;
13716+ onsoundend: ((this: SpeechRecognition, ev: Event) => any) | null;
13717+ onsoundstart: ((this: SpeechRecognition, ev: Event) => any) | null;
13718+ onspeechend: ((this: SpeechRecognition, ev: Event) => any) | null;
13719+ onspeechstart: ((this: SpeechRecognition, ev: Event) => any) | null;
13720+ onstart: ((this: SpeechRecognition, ev: Event) => any) | null;
13721+ serviceURI: string;
13722+ abort(): void;
13723+ start(): void;
13724+ stop(): void;
13725+ addEventListener<K extends keyof SpeechRecognitionEventMap>(type: K, listener: (this: SpeechRecognition, ev: SpeechRecognitionEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
13726+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
13727+ removeEventListener<K extends keyof SpeechRecognitionEventMap>(type: K, listener: (this: SpeechRecognition, ev: SpeechRecognitionEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
13728+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
13729+ }
13730+
13731+ declare var SpeechRecognition: {
13732+ prototype: SpeechRecognition;
13733+ new(): SpeechRecognition;
13734+ };
13735+
13736+ interface SpeechRecognitionAlternative {
13737+ readonly confidence: number;
13738+ readonly transcript: string;
13739+ }
13740+
13741+ declare var SpeechRecognitionAlternative: {
13742+ prototype: SpeechRecognitionAlternative;
13743+ new(): SpeechRecognitionAlternative;
13744+ };
13745+
13746+ interface SpeechRecognitionError extends Event {
13747+ readonly error: SpeechRecognitionErrorCode;
13748+ readonly message: string;
13749+ }
13750+
13751+ declare var SpeechRecognitionError: {
13752+ prototype: SpeechRecognitionError;
13753+ new(): SpeechRecognitionError;
13754+ };
13755+
13756+ interface SpeechRecognitionEvent extends Event {
13757+ readonly emma: Document | null;
13758+ readonly interpretation: any;
13759+ readonly resultIndex: number;
13760+ readonly results: SpeechRecognitionResultList;
13761+ }
13762+
13763+ declare var SpeechRecognitionEvent: {
13764+ prototype: SpeechRecognitionEvent;
13765+ new(): SpeechRecognitionEvent;
13766+ };
13767+
13768+ interface SpeechRecognitionResult {
13769+ readonly isFinal: boolean;
13770+ readonly length: number;
13771+ item(index: number): SpeechRecognitionAlternative;
13772+ [index: number]: SpeechRecognitionAlternative;
13773+ }
13774+
13775+ declare var SpeechRecognitionResult: {
13776+ prototype: SpeechRecognitionResult;
13777+ new(): SpeechRecognitionResult;
13778+ };
13779+
13780+ interface SpeechRecognitionResultList {
13781+ readonly length: number;
13782+ item(index: number): SpeechRecognitionResult;
13783+ [index: number]: SpeechRecognitionResult;
13784+ }
13785+
13786+ declare var SpeechRecognitionResultList: {
13787+ prototype: SpeechRecognitionResultList;
13788+ new(): SpeechRecognitionResultList;
13789+ };
13790+
1367213791interface SpeechSynthesisEventMap {
1367313792 "voiceschanged": Event;
1367413793}
@@ -13694,38 +13813,46 @@ declare var SpeechSynthesis: {
1369413813 new(): SpeechSynthesis;
1369513814};
1369613815
13816+ interface SpeechSynthesisErrorEvent extends SpeechSynthesisEvent {
13817+ readonly error: SpeechSynthesisErrorCode;
13818+ }
13819+
13820+ declare var SpeechSynthesisErrorEvent: {
13821+ prototype: SpeechSynthesisErrorEvent;
13822+ new(): SpeechSynthesisErrorEvent;
13823+ };
13824+
1369713825interface SpeechSynthesisEvent extends Event {
1369813826 readonly charIndex: number;
13699- readonly charLength: number;
1370013827 readonly elapsedTime: number;
1370113828 readonly name: string;
1370213829 readonly utterance: SpeechSynthesisUtterance;
1370313830}
1370413831
1370513832declare var SpeechSynthesisEvent: {
1370613833 prototype: SpeechSynthesisEvent;
13707- new(type: string, eventInitDict?: SpeechSynthesisEventInit ): SpeechSynthesisEvent;
13834+ new(): SpeechSynthesisEvent;
1370813835};
1370913836
1371013837interface SpeechSynthesisUtteranceEventMap {
13711- "boundary": Event ;
13712- "end": Event ;
13713- "error": Event ;
13714- "mark": Event ;
13715- "pause": Event ;
13716- "resume": Event ;
13717- "start": Event ;
13838+ "boundary": SpeechSynthesisEvent ;
13839+ "end": SpeechSynthesisEvent ;
13840+ "error": SpeechSynthesisErrorEvent ;
13841+ "mark": SpeechSynthesisEvent ;
13842+ "pause": SpeechSynthesisEvent ;
13843+ "resume": SpeechSynthesisEvent ;
13844+ "start": SpeechSynthesisEvent ;
1371813845}
1371913846
1372013847interface SpeechSynthesisUtterance extends EventTarget {
1372113848 lang: string;
13722- onboundary: ((this: SpeechSynthesisUtterance, ev: Event ) => any) | null;
13723- onend: ((this: SpeechSynthesisUtterance, ev: Event ) => any) | null;
13724- onerror: ((this: SpeechSynthesisUtterance, ev: Event ) => any) | null;
13725- onmark: ((this: SpeechSynthesisUtterance, ev: Event ) => any) | null;
13726- onpause: ((this: SpeechSynthesisUtterance, ev: Event ) => any) | null;
13727- onresume: ((this: SpeechSynthesisUtterance, ev: Event ) => any) | null;
13728- onstart: ((this: SpeechSynthesisUtterance, ev: Event ) => any) | null;
13849+ onboundary: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent ) => any) | null;
13850+ onend: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent ) => any) | null;
13851+ onerror: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisErrorEvent ) => any) | null;
13852+ onmark: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent ) => any) | null;
13853+ onpause: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent ) => any) | null;
13854+ onresume: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent ) => any) | null;
13855+ onstart: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent ) => any) | null;
1372913856 pitch: number;
1373013857 rate: number;
1373113858 text: string;
@@ -16968,6 +17095,8 @@ type ScrollSetting = "" | "up";
1696817095type SelectionMode = "select" | "start" | "end" | "preserve";
1696917096type ServiceWorkerState = "installing" | "installed" | "activating" | "activated" | "redundant";
1697017097type ServiceWorkerUpdateViaCache = "imports" | "all" | "none";
17098+ type SpeechRecognitionErrorCode = "no-speech" | "aborted" | "audio-capture" | "network" | "not-allowed" | "service-not-allowed" | "bad-grammar" | "language-not-supported";
17099+ type SpeechSynthesisErrorCode = "canceled" | "interrupted" | "audio-busy" | "audio-hardware" | "network" | "synthesis-unavailable" | "synthesis-failed" | "language-unavailable" | "voice-unavailable" | "text-too-long" | "invalid-argument";
1697117100type TextTrackKind = "subtitles" | "captions" | "descriptions" | "chapters" | "metadata";
1697217101type TextTrackMode = "disabled" | "hidden" | "showing";
1697317102type TouchType = "direct" | "stylus";
0 commit comments