1 // Copyright (c) 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 #include "chromecast/browser/extensions/api/tts/tts_extension_api_constants.h"
6 
7 namespace tts_extension_api_constants {
8 
9 const char kCharIndexKey[] = "charIndex";
10 const char kLengthKey[] = "length";
11 const char kDesiredEventTypesKey[] = "desiredEventTypes";
12 const char kEnqueueKey[] = "enqueue";
13 const char kErrorMessageKey[] = "errorMessage";
14 const char kEventTypeKey[] = "type";
15 const char kEventTypesKey[] = "eventTypes";
16 const char kExtensionIdKey[] = "extensionId";
17 const char kGenderKey[] = "gender";
18 const char kIsFinalEventKey[] = "isFinalEvent";
19 const char kLangKey[] = "lang";
20 const char kOnEventKey[] = "onEvent";
21 const char kPitchKey[] = "pitch";
22 const char kRateKey[] = "rate";
23 const char kRemoteKey[] = "remote";
24 const char kRequiredEventTypesKey[] = "requiredEventTypes";
25 const char kSrcIdKey[] = "srcId";
26 const char kVoiceNameKey[] = "voiceName";
27 const char kVolumeKey[] = "volume";
28 
29 const char kEventTypeCancelled[] = "cancelled";
30 const char kEventTypeEnd[] = "end";
31 const char kEventTypeError[] = "error";
32 const char kEventTypeInterrupted[] = "interrupted";
33 const char kEventTypeMarker[] = "marker";
34 const char kEventTypePause[] = "pause";
35 const char kEventTypeResume[] = "resume";
36 const char kEventTypeSentence[] = "sentence";
37 const char kEventTypeStart[] = "start";
38 const char kEventTypeWord[] = "word";
39 
40 const char kErrorExtensionIdMismatch[] = "Extension id mismatch.";
41 const char kErrorInvalidLang[] = "Invalid lang.";
42 const char kErrorInvalidPitch[] = "Invalid pitch.";
43 const char kErrorInvalidRate[] = "Invalid rate.";
44 const char kErrorInvalidVolume[] = "Invalid volume.";
45 const char kErrorMissingPauseOrResume[] =
46     "A TTS engine extension should either listen for both onPause and onResume "
47     "events, or neither.";
48 const char kErrorUndeclaredEventType[] =
49     "Cannot send an event type that is not declared in the extension manifest.";
50 const char kErrorUtteranceTooLong[] = "Utterance length is too long.";
51 
52 }  // namespace tts_extension_api_constants.
53