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