1// Copyright 2018 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// https://w3c.github.io/speech-api/#enumdef-speechsynthesiserrorcode
6enum SpeechSynthesisErrorCode {
7    "canceled",
8    "interrupted",
9    "audio-busy",
10    "audio-hardware",
11    "network",
12    "synthesis-unavailable",
13    "synthesis-failed",
14    "language-unavailable",
15    "voice-unavailable",
16    "text-too-long",
17    "invalid-argument",
18    "not-allowed",
19};
20
21// https://w3c.github.io/speech-api/#speechsynthesiserrorevent
22[
23    Exposed=Window,
24    RuntimeEnabled=ScriptedSpeechSynthesis
25] interface SpeechSynthesisErrorEvent : SpeechSynthesisEvent {
26    constructor(DOMString type, SpeechSynthesisErrorEventInit eventInitDict);
27    readonly attribute SpeechSynthesisErrorCode error;
28};
29