Commit e7be6c7c authored by dmazzoni@chromium.org's avatar dmazzoni@chromium.org

Fix the speech rate and volume on Chrome OS; after switching the

scale of these parameters in the TTS API, the conversion to Chrome OS
values was done incorrectly and this fixes it.

BUG=91883
TEST=manual testing
Review URL: http://codereview.chromium.org/7550049

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95781 0039d316-1c4b-4281-b951-d872f2087c98
parent adfc43c8
......@@ -88,7 +88,7 @@ bool ExtensionTtsPlatformImplChromeOs::Speak(
if (params.rate >= 0.0) {
AppendSpeakOption(
chromeos::SpeechSynthesisLibrary::kSpeechPropertyRate,
DoubleToString(1.5 + params.rate * 2.5),
DoubleToString(params.rate),
&options);
}
......@@ -101,10 +101,11 @@ bool ExtensionTtsPlatformImplChromeOs::Speak(
}
if (params.volume >= 0.0) {
// The TTS service allows a range of 0 to 5 for speech volume.
// The Chrome OS TTS service allows a range of 0 to 5 for speech volume,
// but 5 clips, so map to a range of 0...4.
AppendSpeakOption(
chromeos::SpeechSynthesisLibrary::kSpeechPropertyVolume,
DoubleToString(params.volume * 5),
DoubleToString(params.volume * 4),
&options);
}
......
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