@@ -1684,6 +1684,18 @@ interface ShadowRootInit {
1684
1684
mode: ShadowRootMode;
1685
1685
}
1686
1686
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
+
1687
1699
interface StaticRangeInit {
1688
1700
endContainer: Node;
1689
1701
endOffset: number;
@@ -4831,7 +4843,6 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad
4831
4843
createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent;
4832
4844
createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent;
4833
4845
createEvent(eventInterface: "ServiceWorkerMessageEvent"): ServiceWorkerMessageEvent;
4834
- createEvent(eventInterface: "SpeechRecognitionError"): SpeechRecognitionError;
4835
4846
createEvent(eventInterface: "SpeechRecognitionEvent"): SpeechRecognitionEvent;
4836
4847
createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent;
4837
4848
createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent;
@@ -5081,7 +5092,6 @@ interface DocumentEvent {
5081
5092
createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent;
5082
5093
createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent;
5083
5094
createEvent(eventInterface: "ServiceWorkerMessageEvent"): ServiceWorkerMessageEvent;
5084
- createEvent(eventInterface: "SpeechRecognitionError"): SpeechRecognitionError;
5085
5095
createEvent(eventInterface: "SpeechRecognitionEvent"): SpeechRecognitionEvent;
5086
5096
createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent;
5087
5097
createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent;
@@ -15250,7 +15260,7 @@ interface SpeechRecognitionEventMap {
15250
15260
"audioend": Event;
15251
15261
"audiostart": Event;
15252
15262
"end": Event;
15253
- "error": SpeechRecognitionError ;
15263
+ "error": Event ;
15254
15264
"nomatch": SpeechRecognitionEvent;
15255
15265
"result": SpeechRecognitionEvent;
15256
15266
"soundend": Event;
@@ -15269,15 +15279,14 @@ interface SpeechRecognition extends EventTarget {
15269
15279
onaudioend: ((this: SpeechRecognition, ev: Event) => any) | null;
15270
15280
onaudiostart: ((this: SpeechRecognition, ev: Event) => any) | null;
15271
15281
onend: ((this: SpeechRecognition, ev: Event) => any) | null;
15272
- onerror: ((this: SpeechRecognition, ev: SpeechRecognitionError ) => any) | null;
15282
+ onerror: ((this: SpeechRecognition, ev: Event ) => any) | null;
15273
15283
onnomatch: ((this: SpeechRecognition, ev: SpeechRecognitionEvent) => any) | null;
15274
15284
onresult: ((this: SpeechRecognition, ev: SpeechRecognitionEvent) => any) | null;
15275
15285
onsoundend: ((this: SpeechRecognition, ev: Event) => any) | null;
15276
15286
onsoundstart: ((this: SpeechRecognition, ev: Event) => any) | null;
15277
15287
onspeechend: ((this: SpeechRecognition, ev: Event) => any) | null;
15278
15288
onspeechstart: ((this: SpeechRecognition, ev: Event) => any) | null;
15279
15289
onstart: ((this: SpeechRecognition, ev: Event) => any) | null;
15280
- serviceURI: string;
15281
15290
abort(): void;
15282
15291
start(): void;
15283
15292
stop(): void;
@@ -15302,19 +15311,7 @@ declare var SpeechRecognitionAlternative: {
15302
15311
new(): SpeechRecognitionAlternative;
15303
15312
};
15304
15313
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
-
15315
15314
interface SpeechRecognitionEvent extends Event {
15316
- readonly emma: Document | null;
15317
- readonly interpretation: any;
15318
15315
readonly resultIndex: number;
15319
15316
readonly results: SpeechRecognitionResultList;
15320
15317
}
@@ -15379,20 +15376,21 @@ interface SpeechSynthesisErrorEvent extends SpeechSynthesisEvent {
15379
15376
15380
15377
declare var SpeechSynthesisErrorEvent: {
15381
15378
prototype: SpeechSynthesisErrorEvent;
15382
- new(): SpeechSynthesisErrorEvent;
15379
+ new(type: string, eventInitDict: SpeechSynthesisErrorEventInit ): SpeechSynthesisErrorEvent;
15383
15380
};
15384
15381
15385
15382
/** This Web Speech API interface contains information about the current state of SpeechSynthesisUtterance objects that have been processed in the speech service. */
15386
15383
interface SpeechSynthesisEvent extends Event {
15387
15384
readonly charIndex: number;
15385
+ readonly charLength: number;
15388
15386
readonly elapsedTime: number;
15389
15387
readonly name: string;
15390
15388
readonly utterance: SpeechSynthesisUtterance;
15391
15389
}
15392
15390
15393
15391
declare var SpeechSynthesisEvent: {
15394
15392
prototype: SpeechSynthesisEvent;
15395
- new(): SpeechSynthesisEvent;
15393
+ new(type: string, eventInitDict: SpeechSynthesisEventInit ): SpeechSynthesisEvent;
15396
15394
};
15397
15395
15398
15396
interface SpeechSynthesisUtteranceEventMap {
@@ -15418,7 +15416,7 @@ interface SpeechSynthesisUtterance extends EventTarget {
15418
15416
pitch: number;
15419
15417
rate: number;
15420
15418
text: string;
15421
- voice: SpeechSynthesisVoice;
15419
+ voice: SpeechSynthesisVoice | null ;
15422
15420
volume: number;
15423
15421
addEventListener<K extends keyof SpeechSynthesisUtteranceEventMap>(type: K, listener: (this: SpeechSynthesisUtterance, ev: SpeechSynthesisUtteranceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
15424
15422
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
@@ -15428,8 +15426,7 @@ interface SpeechSynthesisUtterance extends EventTarget {
15428
15426
15429
15427
declare var SpeechSynthesisUtterance: {
15430
15428
prototype: SpeechSynthesisUtterance;
15431
- new(): SpeechSynthesisUtterance;
15432
- new(text: string): SpeechSynthesisUtterance;
15429
+ new(text?: string): SpeechSynthesisUtterance;
15433
15430
};
15434
15431
15435
15432
/** 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";
20150
20147
type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant";
20151
20148
type ServiceWorkerUpdateViaCache = "all" | "imports" | "none";
20152
20149
type 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";
20155
20151
type SupportedType = "application/xhtml+xml" | "application/xml" | "image/svg+xml" | "text/html" | "text/xml";
20156
20152
type TextTrackKind = "captions" | "chapters" | "descriptions" | "metadata" | "subtitles";
20157
20153
type TextTrackMode = "disabled" | "hidden" | "showing";
0 commit comments