Commit 567cdc9a authored by David Tseng's avatar David Tseng Committed by Commit Bot

Re-tune pitch in ChromeVox

- capital personality was tuned for Google tts some years ago. It is too high for the current engine
- re-do precedence logic. Do not set speech props if they were supplied by callers.

Bug: 855257
Change-Id: I541021fa456c5283e943ecb71183e99c547a4f8a
Reviewed-on: https://chromium-review.googlesource.com/1115517Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570546}
parent 5a77af81
......@@ -12,6 +12,7 @@ goog.provide('cvox.KbExplorer');
goog.require('BrailleCommandData');
goog.require('GestureCommandData');
goog.require('Spannable');
goog.require('cvox.AbstractTts');
goog.require('cvox.BrailleKeyCommand');
goog.require('cvox.ChromeVoxKbHandler');
goog.require('cvox.CommandStore');
......@@ -83,7 +84,8 @@ cvox.KbExplorer.init = function() {
*/
cvox.KbExplorer.onKeyDown = function(evt) {
chrome.extension.getBackgroundPage()['speak'](
cvox.KeyUtil.getReadableNameForKeyCode(evt.keyCode), false, {pitch: 0});
cvox.KeyUtil.getReadableNameForKeyCode(evt.keyCode), false,
cvox.AbstractTts.PERSONALITY_ANNOTATION);
// Allow Ctrl+W to be handled.
if (evt.keyCode == 87 && evt.ctrlKey) {
......
......@@ -215,9 +215,12 @@ cvox.AbstractTts.prototype.mergeProperties = function(properties) {
*/
cvox.AbstractTts.prototype.preprocess = function(text, properties) {
if (text.length == 1 && text >= 'A' && text <= 'Z') {
for (var prop in cvox.AbstractTts.PERSONALITY_CAPITAL)
for (var prop in cvox.AbstractTts.PERSONALITY_CAPITAL) {
if (properties[prop] === undefined) {
properties[prop] = cvox.AbstractTts.PERSONALITY_CAPITAL[prop];
}
}
}
// Substitute all symbols in the substitution dictionary. This is pretty
// efficient because we use a single regexp that matches all symbols
......@@ -327,7 +330,7 @@ cvox.AbstractTts.PERSONALITY_ASIDE = {
* @type {Object}
*/
cvox.AbstractTts.PERSONALITY_CAPITAL = {
'relativePitch': 0.6
'relativePitch': 0.2
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment