OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @fileoverview A composite TTS sends allows ChromeVox to use | 6 * @fileoverview A composite TTS sends allows ChromeVox to use |
7 * multiple TTS engines at the same time. | 7 * multiple TTS engines at the same time. |
8 * | 8 * |
9 */ | 9 */ |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... |
33 */ | 33 */ |
34 cvox.CompositeTts.prototype.add = function(tts) { | 34 cvox.CompositeTts.prototype.add = function(tts) { |
35 this.ttsEngines_.push(tts); | 35 this.ttsEngines_.push(tts); |
36 return this; | 36 return this; |
37 }; | 37 }; |
38 | 38 |
39 | 39 |
40 /** | 40 /** |
41 * @override | 41 * @override |
42 */ | 42 */ |
43 cvox.CompositeTts.prototype.speak = | 43 cvox.CompositeTts.prototype.speak = function( |
44 function(textString, queueMode, properties) { | 44 textString, queueMode, properties) { |
45 this.ttsEngines_.forEach(function(engine) { | 45 this.ttsEngines_.forEach(function(engine) { |
46 engine.speak(textString, queueMode, properties); | 46 engine.speak(textString, queueMode, properties); |
47 }); | 47 }); |
48 return this; | 48 return this; |
49 }; | 49 }; |
50 | 50 |
51 | 51 |
52 /** | 52 /** |
53 * Returns true if any of the TTSes are still speaking. | 53 * Returns true if any of the TTSes are still speaking. |
54 * @override | 54 * @override |
(...skipping 21 matching lines...) Expand all Loading... |
76 cvox.CompositeTts.prototype.addCapturingEventListener = function(listener) { | 76 cvox.CompositeTts.prototype.addCapturingEventListener = function(listener) { |
77 this.ttsEngines_.forEach(function(engine) { | 77 this.ttsEngines_.forEach(function(engine) { |
78 engine.addCapturingEventListener(listener); | 78 engine.addCapturingEventListener(listener); |
79 }); | 79 }); |
80 }; | 80 }; |
81 | 81 |
82 | 82 |
83 /** | 83 /** |
84 * @override | 84 * @override |
85 */ | 85 */ |
86 cvox.CompositeTts.prototype.increaseOrDecreaseProperty = | 86 cvox.CompositeTts.prototype.increaseOrDecreaseProperty = function( |
87 function(propertyName, increase) { | 87 propertyName, increase) { |
88 this.ttsEngines_.forEach(function(engine) { | 88 this.ttsEngines_.forEach(function(engine) { |
89 engine.increaseOrDecreaseProperty(propertyName, increase); | 89 engine.increaseOrDecreaseProperty(propertyName, increase); |
90 }); | 90 }); |
91 }; | 91 }; |
92 | 92 |
93 | 93 |
94 /** | 94 /** |
95 * @override | 95 * @override |
96 */ | 96 */ |
97 cvox.CompositeTts.prototype.propertyToPercentage = function(property) { | 97 cvox.CompositeTts.prototype.propertyToPercentage = function(property) { |
(...skipping 19 matching lines...) Expand all Loading... |
117 }; | 117 }; |
118 | 118 |
119 /** @override */ | 119 /** @override */ |
120 cvox.CompositeTts.prototype.toggleSpeechOnOrOff = function() { | 120 cvox.CompositeTts.prototype.toggleSpeechOnOrOff = function() { |
121 var value = false; | 121 var value = false; |
122 this.ttsEngines_.forEach(function(engine) { | 122 this.ttsEngines_.forEach(function(engine) { |
123 value |= engine.toggleSpeechOnOrOff(); | 123 value |= engine.toggleSpeechOnOrOff(); |
124 }); | 124 }); |
125 return value; | 125 return value; |
126 }; | 126 }; |
OLD | NEW |