Like tokens are now merged for more fluid TTS.

This commit is contained in:
Peter Xiao 2013-08-13 15:39:01 -07:00
commit 16d13b6b59

View file

@ -356,6 +356,28 @@ var speakTokenQueue = function(token) {
speakToken_(token, 1);
};
/**
* @param {!cvoxAce.Token} token Token to speak.
* Get the token speech property.
*/
var getTokenProp = function(token) {
/* Types are period delimited. In this case, we only syntax speak the outer
* most type of token. */
if (!token || !token.type) {
return;
}
var split = token.type.split('.');
if (split.length === 0) {
return;
}
var type = split[0];
var prop = rules[type];
if (!prop) {
prop = DEFAULT_PROP;
}
return prop;
};
/**
* Speak the token based on the syntax of the token.
* @private