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 Defines a Tts interface. | 6 * @fileoverview Defines a Tts interface. |
7 * | 7 * |
8 * All TTS engines in ChromeVox conform to the this interface. | 8 * All TTS engines in ChromeVox conform to the this interface. |
9 * | 9 * |
10 */ | 10 */ |
11 | 11 |
12 goog.provide('cvox.QueueMode'); | |
Peter Lundblad
2014/09/29 13:51:04
In basically all other files, you should add a cor
dmazzoni
2014/09/30 22:01:20
Done.
| |
13 goog.provide('cvox.TtsCapturingEventListener'); | |
12 goog.provide('cvox.TtsInterface'); | 14 goog.provide('cvox.TtsInterface'); |
13 goog.provide('cvox.TtsCapturingEventListener'); | 15 |
16 /** | |
17 * Queue modes for calls to speak(). | |
Peter Lundblad
2014/09/29 13:51:04
nit: Qualify speak, i.e. {@code cvox.TtsInterface.
dmazzoni
2014/09/30 22:01:20
Done.
| |
18 * | |
19 * FLUSH: stop speech, clear everything, then speak this utterance. | |
20 * QUEUE: append this utterance to the end of the queue. | |
21 * CATEGORY_FLUSH: clear any utterances of the same category (as set by | |
22 * properties['category']) from the queue, then enqueue this utterance. | |
23 * @enum | |
24 */ | |
25 cvox.QueueMode = { | |
26 FLUSH: 0, | |
Peter Lundblad
2014/09/29 13:51:04
Would be nice to have the jsdoc inside the {} pair
dmazzoni
2014/09/30 22:01:20
Done.
| |
27 QUEUE: 1, | |
28 CATEGORY_FLUSH: 2 | |
29 }; | |
14 | 30 |
15 /** | 31 /** |
16 * @interface | 32 * @interface |
17 * An interface for clients who want to get notified when an utterance | 33 * An interface for clients who want to get notified when an utterance |
18 * starts or ends from any source. | 34 * starts or ends from any source. |
19 */ | 35 */ |
20 cvox.TtsCapturingEventListener = function() { }; | 36 cvox.TtsCapturingEventListener = function() { }; |
21 | 37 |
22 /** | 38 /** |
23 * Called when any utterance starts. | 39 * Called when any utterance starts. |
24 */ | 40 */ |
25 cvox.TtsCapturingEventListener.prototype.onTtsStart = function() { }; | 41 cvox.TtsCapturingEventListener.prototype.onTtsStart = function() { }; |
26 | 42 |
27 /** | 43 /** |
28 * Called when any utterance ends. | 44 * Called when any utterance ends. |
29 */ | 45 */ |
30 cvox.TtsCapturingEventListener.prototype.onTtsEnd = function() { }; | 46 cvox.TtsCapturingEventListener.prototype.onTtsEnd = function() { }; |
31 | 47 |
32 | 48 |
33 /** | 49 /** |
34 * @interface | 50 * @interface |
35 */ | 51 */ |
36 cvox.TtsInterface = function() { }; | 52 cvox.TtsInterface = function() { }; |
37 | 53 |
38 /** | 54 /** |
39 * Speaks the given string using the specified queueMode and properties. | 55 * Speaks the given string using the specified queueMode and properties. |
40 * @param {string} textString The string of text to be spoken. | 56 * @param {string} textString The string of text to be spoken. |
41 * @param {number=} queueMode The queue mode: cvox.AbstractTts.QUEUE_MODE_FLUSH | 57 * @param {cvox.QueueMode} queueMode The queue mode to use for speaking. |
David Tseng
2014/09/26 22:29:23
I pretty much just looked at this file. I assume C
dmazzoni
2014/09/30 22:01:20
Acknowledged.
| |
42 * for flush, cvox.AbstractTts.QUEUE_MODE_QUEUE for adding to queue. | |
43 * @param {Object=} properties Speech properties to use for this utterance. | 58 * @param {Object=} properties Speech properties to use for this utterance. |
44 * @return {cvox.TtsInterface} A tts object useful for chaining speak calls. | 59 * @return {cvox.TtsInterface} A tts object useful for chaining speak calls. |
45 */ | 60 */ |
46 cvox.TtsInterface.prototype.speak = | 61 cvox.TtsInterface.prototype.speak = |
47 function(textString, queueMode, properties) { }; | 62 function(textString, queueMode, properties) { }; |
48 | 63 |
49 | 64 |
50 /** | 65 /** |
51 * Returns true if the TTS is currently speaking. | 66 * Returns true if the TTS is currently speaking. |
52 * @return {boolean} True if the TTS is speaking. | 67 * @return {boolean} True if the TTS is speaking. |
(...skipping 21 matching lines...) Expand all Loading... | |
74 cvox.TtsInterface.prototype.increaseOrDecreaseProperty = | 89 cvox.TtsInterface.prototype.increaseOrDecreaseProperty = |
75 function(propertyName, increase) { }; | 90 function(propertyName, increase) { }; |
76 | 91 |
77 | 92 |
78 /** | 93 /** |
79 * Returns the default properties of the first tts that has default properties. | 94 * Returns the default properties of the first tts that has default properties. |
80 * @param {string} property Name of property. | 95 * @param {string} property Name of property. |
81 * @return {?number} The default value. | 96 * @return {?number} The default value. |
82 */ | 97 */ |
83 cvox.TtsInterface.prototype.getDefaultProperty = function(property) { }; | 98 cvox.TtsInterface.prototype.getDefaultProperty = function(property) { }; |
OLD | NEW |