Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Issue 2364753002: Improve TTS GetMatchingVoices algorithm (Closed)

Created:
4 years, 3 months ago by dmazzoni
Modified:
4 years, 2 months ago
Reviewers:
David Tseng
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Improve TTS GetMatchingVoices algorithm The previous algorithm only handled exact matches and a few partial matches. Replace it with an algorithm that sorts the possible voices based on a strict precedence of criteria and returns the best one. This fixes cases where it was using a language other than the system language when there were no voices with matching criteria. BUG=582455 TEST=Manually test TTS Demo app, speechSynthesis API, and ChromeVox to confirm no breakage Committed: https://crrev.com/f48913979bb58b7e4b8585b873392484241edb2c Cr-Commit-Position: refs/heads/master@{#421958}

Patch Set 1 #

Patch Set 2 : Fix tests #

Total comments: 6

Patch Set 3 : Fix DCHECK #

Patch Set 4 : Address feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+181 lines, -78 lines) Patch
M chrome/browser/speech/tts_controller_impl.h View 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/speech/tts_controller_impl.cc View 1 2 3 3 chunks +88 lines, -76 lines 0 comments Download
M chrome/browser/speech/tts_controller_unittest.cc View 1 2 3 3 chunks +89 lines, -2 lines 0 comments Download
M chrome/test/data/extensions/api_test/tts_engine/register_engine/test.js View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 22 (14 generated)
dmazzoni
4 years, 3 months ago (2016-09-23 18:08:29 UTC) #7
David Tseng
lgtm https://codereview.chromium.org/2364753002/diff/20001/chrome/browser/speech/tts_controller_impl.cc File chrome/browser/speech/tts_controller_impl.cc (right): https://codereview.chromium.org/2364753002/diff/20001/chrome/browser/speech/tts_controller_impl.cc#newcode401 chrome/browser/speech/tts_controller_impl.cc:401: if (TrimLanguageCode(voice.lang) == TrimLanguageCode(utterance->lang())) else if? https://codereview.chromium.org/2364753002/diff/20001/chrome/browser/speech/tts_controller_impl.cc#newcode410 chrome/browser/speech/tts_controller_impl.cc:410: ...
4 years, 2 months ago (2016-09-23 22:10:50 UTC) #11
dmazzoni
https://codereview.chromium.org/2364753002/diff/20001/chrome/browser/speech/tts_controller_impl.cc File chrome/browser/speech/tts_controller_impl.cc (right): https://codereview.chromium.org/2364753002/diff/20001/chrome/browser/speech/tts_controller_impl.cc#newcode401 chrome/browser/speech/tts_controller_impl.cc:401: if (TrimLanguageCode(voice.lang) == TrimLanguageCode(utterance->lang())) On 2016/09/23 at 22:10:50, David ...
4 years, 2 months ago (2016-09-26 19:26:12 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2364753002/60001
4 years, 2 months ago (2016-09-26 19:26:58 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/286454)
4 years, 2 months ago (2016-09-26 20:58:38 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2364753002/60001
4 years, 2 months ago (2016-09-29 20:42:40 UTC) #19
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 2 months ago (2016-09-29 22:29:40 UTC) #20
commit-bot: I haz the power
4 years, 2 months ago (2016-09-29 22:32:25 UTC) #22
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/f48913979bb58b7e4b8585b873392484241edb2c
Cr-Commit-Position: refs/heads/master@{#421958}

Powered by Google App Engine
This is Rietveld 408576698