@@ -1684,6 +1684,18 @@ interface ShadowRootInit {
16841684 mode: ShadowRootMode;
16851685}
16861686
1687+ interface SpeechSynthesisErrorEventInit extends SpeechSynthesisEventInit {
1688+ error: SpeechSynthesisErrorCode;
1689+ }
1690+
1691+ interface SpeechSynthesisEventInit extends EventInit {
1692+ charIndex?: number;
1693+ charLength?: number;
1694+ elapsedTime?: number;
1695+ name?: string;
1696+ utterance: SpeechSynthesisUtterance;
1697+ }
1698+
16871699interface StaticRangeInit {
16881700 endContainer: Node;
16891701 endOffset: number;
@@ -4831,7 +4843,6 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad
48314843 createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent;
48324844 createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent;
48334845 createEvent(eventInterface: "ServiceWorkerMessageEvent"): ServiceWorkerMessageEvent;
4834- createEvent(eventInterface: "SpeechRecognitionError"): SpeechRecognitionError;
48354846 createEvent(eventInterface: "SpeechRecognitionEvent"): SpeechRecognitionEvent;
48364847 createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent;
48374848 createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent;
@@ -5081,7 +5092,6 @@ interface DocumentEvent {
50815092 createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent;
50825093 createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent;
50835094 createEvent(eventInterface: "ServiceWorkerMessageEvent"): ServiceWorkerMessageEvent;
5084- createEvent(eventInterface: "SpeechRecognitionError"): SpeechRecognitionError;
50855095 createEvent(eventInterface: "SpeechRecognitionEvent"): SpeechRecognitionEvent;
50865096 createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent;
50875097 createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent;
@@ -15250,7 +15260,7 @@ interface SpeechRecognitionEventMap {
1525015260 "audioend": Event;
1525115261 "audiostart": Event;
1525215262 "end": Event;
15253- "error": SpeechRecognitionError ;
15263+ "error": Event ;
1525415264 "nomatch": SpeechRecognitionEvent;
1525515265 "result": SpeechRecognitionEvent;
1525615266 "soundend": Event;
@@ -15269,15 +15279,14 @@ interface SpeechRecognition extends EventTarget {
1526915279 onaudioend: ((this: SpeechRecognition, ev: Event) => any) | null;
1527015280 onaudiostart: ((this: SpeechRecognition, ev: Event) => any) | null;
1527115281 onend: ((this: SpeechRecognition, ev: Event) => any) | null;
15272- onerror: ((this: SpeechRecognition, ev: SpeechRecognitionError ) => any) | null;
15282+ onerror: ((this: SpeechRecognition, ev: Event ) => any) | null;
1527315283 onnomatch: ((this: SpeechRecognition, ev: SpeechRecognitionEvent) => any) | null;
1527415284 onresult: ((this: SpeechRecognition, ev: SpeechRecognitionEvent) => any) | null;
1527515285 onsoundend: ((this: SpeechRecognition, ev: Event) => any) | null;
1527615286 onsoundstart: ((this: SpeechRecognition, ev: Event) => any) | null;
1527715287 onspeechend: ((this: SpeechRecognition, ev: Event) => any) | null;
1527815288 onspeechstart: ((this: SpeechRecognition, ev: Event) => any) | null;
1527915289 onstart: ((this: SpeechRecognition, ev: Event) => any) | null;
15280- serviceURI: string;
1528115290 abort(): void;
1528215291 start(): void;
1528315292 stop(): void;
@@ -15302,19 +15311,7 @@ declare var SpeechRecognitionAlternative: {
1530215311 new(): SpeechRecognitionAlternative;
1530315312};
1530415313
15305- interface SpeechRecognitionError extends Event {
15306- readonly error: SpeechRecognitionErrorCode;
15307- readonly message: string;
15308- }
15309-
15310- declare var SpeechRecognitionError: {
15311- prototype: SpeechRecognitionError;
15312- new(): SpeechRecognitionError;
15313- };
15314-
1531515314interface SpeechRecognitionEvent extends Event {
15316- readonly emma: Document | null;
15317- readonly interpretation: any;
1531815315 readonly resultIndex: number;
1531915316 readonly results: SpeechRecognitionResultList;
1532015317}
@@ -15379,20 +15376,21 @@ interface SpeechSynthesisErrorEvent extends SpeechSynthesisEvent {
1537915376
1538015377declare var SpeechSynthesisErrorEvent: {
1538115378 prototype: SpeechSynthesisErrorEvent;
15382- new(): SpeechSynthesisErrorEvent;
15379+ new(type: string, eventInitDict: SpeechSynthesisErrorEventInit ): SpeechSynthesisErrorEvent;
1538315380};
1538415381
1538515382/** This Web Speech API interface contains information about the current state of SpeechSynthesisUtterance objects that have been processed in the speech service. */
1538615383interface SpeechSynthesisEvent extends Event {
1538715384 readonly charIndex: number;
15385+ readonly charLength: number;
1538815386 readonly elapsedTime: number;
1538915387 readonly name: string;
1539015388 readonly utterance: SpeechSynthesisUtterance;
1539115389}
1539215390
1539315391declare var SpeechSynthesisEvent: {
1539415392 prototype: SpeechSynthesisEvent;
15395- new(): SpeechSynthesisEvent;
15393+ new(type: string, eventInitDict: SpeechSynthesisEventInit ): SpeechSynthesisEvent;
1539615394};
1539715395
1539815396interface SpeechSynthesisUtteranceEventMap {
@@ -15418,7 +15416,7 @@ interface SpeechSynthesisUtterance extends EventTarget {
1541815416 pitch: number;
1541915417 rate: number;
1542015418 text: string;
15421- voice: SpeechSynthesisVoice;
15419+ voice: SpeechSynthesisVoice | null ;
1542215420 volume: number;
1542315421 addEventListener<K extends keyof SpeechSynthesisUtteranceEventMap>(type: K, listener: (this: SpeechSynthesisUtterance, ev: SpeechSynthesisUtteranceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1542415422 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
@@ -15428,8 +15426,7 @@ interface SpeechSynthesisUtterance extends EventTarget {
1542815426
1542915427declare var SpeechSynthesisUtterance: {
1543015428 prototype: SpeechSynthesisUtterance;
15431- new(): SpeechSynthesisUtterance;
15432- new(text: string): SpeechSynthesisUtterance;
15429+ new(text?: string): SpeechSynthesisUtterance;
1543315430};
1543415431
1543515432/** This Web Speech API interface represents a voice that the system supports. Every SpeechSynthesisVoice has its own relative speech service including information about language, name and URI. */
@@ -20150,8 +20147,7 @@ type SelectionMode = "end" | "preserve" | "select" | "start";
2015020147type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant";
2015120148type ServiceWorkerUpdateViaCache = "all" | "imports" | "none";
2015220149type ShadowRootMode = "closed" | "open";
20153- type SpeechRecognitionErrorCode = "aborted" | "audio-capture" | "bad-grammar" | "language-not-supported" | "network" | "no-speech" | "not-allowed" | "service-not-allowed";
20154- type SpeechSynthesisErrorCode = "audio-busy" | "audio-hardware" | "canceled" | "interrupted" | "invalid-argument" | "language-unavailable" | "network" | "synthesis-failed" | "synthesis-unavailable" | "text-too-long" | "voice-unavailable";
20150+ type SpeechSynthesisErrorCode = "audio-busy" | "audio-hardware" | "canceled" | "interrupted" | "invalid-argument" | "language-unavailable" | "network" | "not-allowed" | "synthesis-failed" | "synthesis-unavailable" | "text-too-long" | "voice-unavailable";
2015520151type SupportedType = "application/xhtml+xml" | "application/xml" | "image/svg+xml" | "text/html" | "text/xml";
2015620152type TextTrackKind = "captions" | "chapters" | "descriptions" | "metadata" | "subtitles";
2015720153type TextTrackMode = "disabled" | "hidden" | "showing";
0 commit comments