Closed Bug 1038061 Opened 10 years ago Closed 10 years ago

Support speech recognition on specific media stream

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: schien, Assigned: schien)

References

Details

(Whiteboard: [FT:Stream3])

Attachments

(1 file, 3 obsolete files)

Attached patch speech-input-opt-stream.patch (obsolete) (deleted) β€” β€” Splinter Review
Current speech recognition API cannot specify media stream, we could introduce an optional parameter in SpeechRecognition.start() to enable following use cases:
  1. multiple microphone selection via gUM media constraints
  2. remote audio stream (WebRTC)
  3. stream from audio file
Attachment #8455178 - Flags: feedback?(bugs)
Whiteboard: [FT:Stream3]
So the current spec doesn't support MediaStreams [1], but it definitely should and while the API
was designed, use of some sort of MediaStreams was discussed.
Could you file a spec bug about this[2].

[1] https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#speechreco-section
[2] https://www.w3.org/Bugs/Public/enter_bug.cgi?product=Speech%20API
Comment on attachment 8455178 [details] [diff] [review]
speech-input-opt-stream.patch

The else {} in SpeechRecognition::Start could use a proper indentation.
Attachment #8455178 - Flags: feedback?(ggoncalves)
Attachment #8455178 - Flags: feedback?(bugs)
Attachment #8455178 - Flags: feedback+
Comment on attachment 8455178 [details] [diff] [review]
speech-input-opt-stream.patch

+1 on indentation, otherwise looks good to me.

Once we have this, it may also be possible to simplify our testing code, which uses a bit of a hack to inject a custom MediaStream into an existing SpeechRecognition object: http://dxr.mozilla.org/mozilla-central/source/content/media/webspeech/recognition/test/head.js?from=content/media/webspeech/recognition/test/head.js#120
Attachment #8455178 - Flags: feedback?(ggoncalves) → feedback+
Spec bug is filed: https://www.w3.org/Bugs/Public/show_bug.cgi?id=26336
Attached patch speech-input-opt-stream.patch (obsolete) (deleted) β€” β€” Splinter Review
nit picked and update test cases.

try result:https://tbpl.mozilla.org/?tree=Try&rev=2074ce8e0d72
Assignee: nobody → schien
Attachment #8455178 - Attachment is obsolete: true
Attachment #8455948 - Flags: superreview?(bugs)
Attachment #8455948 - Flags: review?(ggoncalves)
Attachment #8455948 - Flags: review?(bugs)
Attached patch speech-input-opt-stream.patch (obsolete) (deleted) β€” β€” Splinter Review
need bypass gum permission check for test_call_start_from_end_handler.html.

try result: https://tbpl.mozilla.org/?tree=Try&rev=251643e053b7
Attachment #8455948 - Attachment is obsolete: true
Attachment #8455948 - Flags: superreview?(bugs)
Attachment #8455948 - Flags: review?(ggoncalves)
Attachment #8455948 - Flags: review?(bugs)
Attachment #8455962 - Flags: superreview?(bugs)
Attachment #8455962 - Flags: review?(ggoncalves)
Attachment #8455962 - Flags: review?(bugs)
Comment on attachment 8455962 [details] [diff] [review]
speech-input-opt-stream.patch

ggp, please check the test changes
Attachment #8455962 - Flags: superreview?(bugs)
Attachment #8455962 - Flags: superreview+
Attachment #8455962 - Flags: review?(bugs)
Attachment #8455962 - Flags: review+
Attached patch speech-input-opt-stream.patch (deleted) β€” β€” Splinter Review
fix intermittent error on b2g emulator debug build by avoiding gUM in testcase, carry smaug's r+ and sr+.

try result: https://tbpl.mozilla.org/?tree=Try&rev=213dfd8f6324
Attachment #8455962 - Attachment is obsolete: true
Attachment #8455962 - Flags: review?(ggoncalves)
Attachment #8456672 - Flags: superreview+
Attachment #8456672 - Flags: review?(ggoncalves)
Comment on attachment 8456672 [details] [diff] [review]
speech-input-opt-stream.patch

Looks good, thank you!
Attachment #8456672 - Flags: review?(ggoncalves) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/a038f26e9bbd
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/a038f26e9bbd
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: