OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 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 /** |
| 6 * @fileoverview This is the base class responsible managing TTS engines. |
| 7 */ |
| 8 |
| 9 goog.provide('cvox.AbstractTtsManager'); |
| 10 |
| 11 goog.require('cvox.AbstractTts'); |
| 12 |
| 13 /** |
| 14 * This is the base class responsible for spoken feedback. |
| 15 * |
| 16 * @constructor |
| 17 * @extends {cvox.AbstractTts} |
| 18 */ |
| 19 cvox.AbstractTtsManager = function() { |
| 20 //Inherit AbstractTts |
| 21 cvox.AbstractTts.call(this); |
| 22 }; |
| 23 goog.inherits(cvox.AbstractTtsManager, cvox.AbstractTts); |
| 24 |
| 25 /** |
| 26 * Switch to the next TTS engine and optionally announce its name. |
| 27 * |
| 28 * @param {boolean} announce If true, will announce the name of the |
| 29 * new TTS engine. |
| 30 */ |
| 31 cvox.AbstractTtsManager.prototype.nextTtsEngine = function(announce) { |
| 32 if (this.logEnabled()) { |
| 33 this.log('[' + this.getName() + '] nextTtsEngine(' + announce + ')'); |
| 34 } |
| 35 }; |
| 36 |
| 37 /** |
| 38 * Increases a TTS speech property. |
| 39 * @param {string} property_name The name of the property to increase. |
| 40 */ |
| 41 cvox.AbstractTtsManager.prototype.increaseProperty = function( |
| 42 property_name) { |
| 43 if (this.logEnabled()) { |
| 44 this.log('[' + this.getName() + '] increaseProperty(' + |
| 45 property_name + ')'); |
| 46 } |
| 47 }; |
| 48 |
| 49 /** |
| 50 * Decreases a TTS speech property. |
| 51 * @param {string} property_name The name of the property to decrease. |
| 52 */ |
| 53 cvox.AbstractTtsManager.prototype.decreaseProperty = function( |
| 54 property_name) { |
| 55 if (this.logEnabled()) { |
| 56 this.log('[' + this.getName() + '] decreaseProperty(' + |
| 57 property_name + ')'); |
| 58 } |
| 59 }; |
| 60 |
| 61 /** |
| 62 * TTS rate property. |
| 63 * @type {string} |
| 64 */ |
| 65 cvox.AbstractTtsManager.TTS_PROPERTY_RATE = 'Rate'; |
| 66 |
| 67 /** |
| 68 * TTS pitch property. |
| 69 * @type {string} |
| 70 */ |
| 71 cvox.AbstractTtsManager.TTS_PROPERTY_PITCH = 'Pitch'; |
| 72 |
| 73 /** |
| 74 * TTS volume property. |
| 75 * @type {string} |
| 76 */ |
| 77 cvox.AbstractTtsManager.TTS_PROPERTY_VOLUME = 'Volume'; |
OLD | NEW |