Like tokens are now merged for more fluid TTS.
This commit is contained in:
parent
0f93b3098f
commit
16d13b6b59
1 changed files with 22 additions and 0 deletions
|
|
@ -356,6 +356,28 @@ var speakTokenQueue = function(token) {
|
||||||
speakToken_(token, 1);
|
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.
|
* Speak the token based on the syntax of the token.
|
||||||
* @private
|
* @private
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue