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

Issue 15907012: Implement SpeechRecognizerImplAndroid (Closed)

Created:
7 years, 6 months ago by janx
Modified:
7 years, 6 months ago
CC:
Primiano Tucci (use gerrit), Peter Beverloo, chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Implement SpeechRecognizerImplAndroid Use JNI to perform speech recognition using Android's platform recognition capabilities. This CL changes the behavior of webkitSpeechRecognizer when the run-time flag --enable-speech-recognition is passed, but still won't recognize speech before an AndroidSpeechRecognitionManagerDelegate is implemented to grant according permissions. BUG=247369 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=206398

Patch Set 1 #

Total comments: 63

Patch Set 2 : OnRecognitionEnd, state_, removed AudioLevelsChange, fixes, nits #

Total comments: 28

Patch Set 3 : nits #

Total comments: 27

Patch Set 4 : Convert error codes in Java, refactor *{,JNI} methods into single methods, nits #

Total comments: 33

Patch Set 5 : Proper event teardown on abort, nits #

Patch Set 6 : Fix non-android builds by excluding speech_recognizer_impl_android #

Total comments: 39

Patch Set 7 : nits #

Total comments: 4

Patch Set 8 : Rebased, nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+539 lines, -12 lines) Patch
M content/browser/android/browser_jni_registrar.cc View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M content/browser/speech/speech_recognition_manager_impl.cc View 1 2 3 4 5 2 chunks +5 lines, -4 lines 0 comments Download
M content/browser/speech/speech_recognizer.h View 1 2 3 4 5 6 7 3 chunks +7 lines, -3 lines 0 comments Download
M content/browser/speech/speech_recognizer_impl.cc View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
A content/browser/speech/speech_recognizer_impl_android.h View 1 2 3 4 5 6 7 1 chunk +65 lines, -0 lines 0 comments Download
A content/browser/speech/speech_recognizer_impl_android.cc View 1 2 3 4 5 6 7 1 chunk +202 lines, -0 lines 0 comments Download
M content/content.gyp View 1 2 3 2 chunks +13 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 3 chunks +8 lines, -4 lines 0 comments Download
M content/content_jni.gypi View 1 chunk +1 line, -0 lines 0 comments Download
A content/public/android/java/src/org/chromium/content/browser/SpeechRecognition.java View 1 2 3 4 5 6 1 chunk +222 lines, -0 lines 0 comments Download
A content/public/android/java/src/org/chromium/content/browser/SpeechRecognitionError.template View 1 2 3 1 chunk +11 lines, -0 lines 0 comments Download
M content/public/browser/speech_recognition_event_listener.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
janx
Not ready for review yet, uploading for discussion about how best to resolve some issues ...
7 years, 6 months ago (2013-05-31 17:12:03 UTC) #1
janx
https://codereview.chromium.org/15907012/diff/1/content/browser/speech/speech_recognizer_impl_android.cc File content/browser/speech/speech_recognizer_impl_android.cc (right): https://codereview.chromium.org/15907012/diff/1/content/browser/speech/speech_recognizer_impl_android.cc#newcode86 content/browser/speech/speech_recognizer_impl_android.cc:86: return false; // FIXME Recognition seems to work when ...
7 years, 6 months ago (2013-05-31 17:22:24 UTC) #2
Primiano Tucci (use gerrit)
Very good job, we are very close for making it rock on Android. :) In ...
7 years, 6 months ago (2013-06-03 16:24:11 UTC) #3
janx
Thank you so much Primiano for the awesome comments! I ended up changing a lot ...
7 years, 6 months ago (2013-06-05 13:51:00 UTC) #4
janx
Recycled two comments from previous patchset for future reviewers: https://codereview.chromium.org/15907012/diff/11001/content/browser/speech/speech_recognizer_impl_android.cc File content/browser/speech/speech_recognizer_impl_android.cc (right): https://codereview.chromium.org/15907012/diff/11001/content/browser/speech/speech_recognizer_impl_android.cc#newcode43 content/browser/speech/speech_recognizer_impl_android.cc:43: ...
7 years, 6 months ago (2013-06-06 09:34:55 UTC) #5
Peter Beverloo
Thanks Jan! I mostly looked at the Java file, as Primiano looked at the other ...
7 years, 6 months ago (2013-06-06 11:48:13 UTC) #6
janx
Thanks for the comments! I filed an engineering bug (crbug.com/247369) corresponding to this CL and ...
7 years, 6 months ago (2013-06-06 16:09:37 UTC) #7
janx
Recycled 3 comments from last patchset: https://codereview.chromium.org/15907012/diff/20001/content/browser/speech/speech_recognizer_impl_android.cc File content/browser/speech/speech_recognizer_impl_android.cc (right): https://codereview.chromium.org/15907012/diff/20001/content/browser/speech/speech_recognizer_impl_android.cc#newcode43 content/browser/speech/speech_recognizer_impl_android.cc:43: listener_->OnRecognitionStart(session_id_); Primiano Tucci ...
7 years, 6 months ago (2013-06-07 12:43:58 UTC) #8
bulach
nice, thanks janx! I have a few nits and small suggestions, the most important one ...
7 years, 6 months ago (2013-06-07 15:35:10 UTC) #9
janx
Thank you for the great comments Marcus, they were really helpful! I addressed all of ...
7 years, 6 months ago (2013-06-10 16:51:18 UTC) #10
bulach
lgtm, thanks! just some nits and small details below, feel free to go ahead once ...
7 years, 6 months ago (2013-06-11 07:24:48 UTC) #11
Primiano Tucci (use gerrit)
https://codereview.chromium.org/15907012/diff/29001/content/browser/speech/speech_recognizer.h File content/browser/speech/speech_recognizer.h (right): https://codereview.chromium.org/15907012/diff/29001/content/browser/speech/speech_recognizer.h#newcode35 content/browser/speech/speech_recognizer.h:35: friend class base::RefCountedThreadSafe<SpeechRecognizer>; Nit: Was the move of friend ...
7 years, 6 months ago (2013-06-11 13:34:51 UTC) #12
janx
https://codereview.chromium.org/15907012/diff/29001/content/browser/speech/speech_recognition_manager_impl.cc File content/browser/speech/speech_recognition_manager_impl.cc (right): https://codereview.chromium.org/15907012/diff/29001/content/browser/speech/speech_recognition_manager_impl.cc#newcode145 content/browser/speech/speech_recognition_manager_impl.cc:145: session->recognizer = new SpeechRecognizerImplAndroid( On 2013/06/11 07:24:48, bulach wrote: ...
7 years, 6 months ago (2013-06-12 14:47:13 UTC) #13
Primiano Tucci (use gerrit)
LGTM. Great work. P.S. I've some final enjoyable nits. :) https://codereview.chromium.org/15907012/diff/47001/content/browser/speech/speech_recognizer_impl_android.cc File content/browser/speech/speech_recognizer_impl_android.cc (right): https://codereview.chromium.org/15907012/diff/47001/content/browser/speech/speech_recognizer_impl_android.cc#newcode104 ...
7 years, 6 months ago (2013-06-13 10:05:05 UTC) #14
Peter Beverloo
I'd like to see one more iteration, please. Thank you, looking good! https://codereview.chromium.org/15907012/diff/47001/content/browser/speech/speech_recognizer_impl_android.cc File content/browser/speech/speech_recognizer_impl_android.cc ...
7 years, 6 months ago (2013-06-13 11:46:22 UTC) #15
Primiano Tucci (use gerrit)
https://codereview.chromium.org/15907012/diff/47001/content/public/android/java/src/org/chromium/content/browser/SpeechRecognition.java File content/public/android/java/src/org/chromium/content/browser/SpeechRecognition.java (right): https://codereview.chromium.org/15907012/diff/47001/content/public/android/java/src/org/chromium/content/browser/SpeechRecognition.java#newcode32 content/public/android/java/src/org/chromium/content/browser/SpeechRecognition.java:32: private final int STATE_IDLE = 0; On 2013/06/13 11:46:23, ...
7 years, 6 months ago (2013-06-13 13:50:04 UTC) #16
janx
Thank you for the returns, all comments addressed. https://codereview.chromium.org/15907012/diff/47001/content/browser/speech/speech_recognizer_impl_android.cc File content/browser/speech/speech_recognizer_impl_android.cc (right): https://codereview.chromium.org/15907012/diff/47001/content/browser/speech/speech_recognizer_impl_android.cc#newcode43 content/browser/speech/speech_recognizer_impl_android.cc:43: SpeechRecognitionSessionConfig ...
7 years, 6 months ago (2013-06-13 16:08:52 UTC) #17
Peter Beverloo
lgtm. Please go through the owners dance :-).
7 years, 6 months ago (2013-06-13 16:22:02 UTC) #18
janx
Thanks Peter! Avi, could you have a look please? :)
7 years, 6 months ago (2013-06-13 17:31:29 UTC) #19
Avi (use Gerrit)
Only whiny nits from me. LGTM https://codereview.chromium.org/15907012/diff/55001/content/browser/speech/speech_recognizer.h File content/browser/speech/speech_recognizer.h (right): https://codereview.chromium.org/15907012/diff/55001/content/browser/speech/speech_recognizer.h#newcode23 content/browser/speech/speech_recognizer.h:23: DCHECK(listener_ != NULL); ...
7 years, 6 months ago (2013-06-13 17:51:48 UTC) #20
janx
Thank you Avi, all fixed! Pushing the patch down the rabbit hole.
7 years, 6 months ago (2013-06-14 10:36:08 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/janx@chromium.org/15907012/70001
7 years, 6 months ago (2013-06-14 10:36:27 UTC) #22
commit-bot: I haz the power
7 years, 6 months ago (2013-06-14 12:23:28 UTC) #23
Message was sent while issue was closed.
Change committed as 206398

Powered by Google App Engine
This is Rietveld 408576698