1 // Copyright (c) 2014 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.
5 cr.define('hotword.constants', function() {
9 * Hotword data shared module extension's ID.
12 var SHARED_MODULE_ID = 'lccekmodgklaepjeofjdjpbminllajkg';
15 * Path to shared module data.
18 var SHARED_MODULE_ROOT = '_modules/' + SHARED_MODULE_ID;
21 * Time to wait for expected messages, in milliseconds.
31 * The URL of the files used by the plugin.
35 RECOGNIZER_CONFIG: 'hotword.data',
39 * Errors emitted by the NaClManager.
43 NACL_CRASH: 'nacl_crash',
48 * Event types supported by NaClManager.
58 * Messages for communicating with the NaCl recognizer plugin. These must match
59 * constants in <google3>/hotword_plugin.c
64 SAMPLE_RATE_PREFIX: 'h',
67 REQUEST_MODEL: 'model',
68 MODEL_LOADED: 'model_loaded',
69 READY_FOR_AUDIO: 'audio',
71 HOTWORD_DETECTED: 'hotword',
72 MS_CONFIGURED: 'ms_configured'
76 * Source of a hotwording session request.
84 * The browser UI language.
87 var UI_LANGUAGE = (chrome.i18n && chrome.i18n.getUILanguage) ?
88 chrome.i18n.getUILanguage() : '';
91 SHARED_MODULE_ID: SHARED_MODULE_ID,
92 SHARED_MODULE_ROOT: SHARED_MODULE_ROOT,
97 NaClPlugin: NaClPlugin,
98 SessionSource: SessionSource,
99 UI_LANGUAGE: UI_LANGUAGE