Closed
Bug 1228695
Opened 9 years ago
Closed 9 years ago
Acoustic models and grammars should be loaded before the SpeechRecognition::Start
Categories
(Core :: Web Speech, defect)
Core
Web Speech
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: anatal, Assigned: anatal)
References
Details
User Story
As a developer, I want both the models and the grammar be loaded before start the recognition to previously know if errors happened, to start to recognize faster and to provide a better experience for the users.
Attachments
(1 file, 1 obsolete file)
4.28 KB,
patch
|
kdavis
:
review-
smaug
:
review-
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•9 years ago
|
||
Assignee | ||
Comment 2•9 years ago
|
||
Assignee | ||
Comment 3•9 years ago
|
||
Attachment #8693278 -
Attachment is obsolete: true
Assignee | ||
Comment 4•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
User Story: (updated)
Assignee | ||
Updated•9 years ago
|
User Story: (updated)
Assignee | ||
Updated•9 years ago
|
Attachment #8693283 -
Flags: review?(kdavis)
Attachment #8693283 -
Flags: review?(bugs)
Before I do a formal review I'm just wondering about the logic of this commit.
It seems to more-or-less, revert most of the changes of Bug 1185018 which laid the path for multiple languages. How do you see multiple languages being supported as a result of this patch? I see several problems in this respect:
1. Calling SetRecognitionService before SpeechRecognition.lang is set only allows for a single language
2. If after setting SpeechRecognition.grammars I change SpeechRecognition.lang, the grammar is assumed
valid, but it isn't, as grammars are language specific.
3. Setting of SpeechRecognition.lang has no effect, the language is chosen on SpeechRecognition creation
There are likely more issues that I didn't see on first glance.
The idea you've put forth doesn't seem to solve the problem of a responsive app, but to simply moves the problem around; now the model is loaded when SpeechRecognition is newed up in Javacript. This will still take "user time", time that the user will notice when they run a webpage.
Have you explored other means, besides changing gecko, to achieve the goal of having a responsive system? The first things that come to mind are:
1. Making sure the lifetime the SpeechRecognition is as long as possible, to avoid loading
an unloading the model.
2. Calling start() with a dummy grammar on app load to load the model. Then subsequent
calls to start() will only validate a grammar but not load a model. (This has the
advantage of being equivalent to what you've done, but not rolling back work for
multiple languages.)
3. Using the SpeechRecognition.onstart event handler to indicate to the user when they
can speak. (After SpeechRecognition.start() is called and before this event handler
is called, the app should not indicate it is not able to listen, as it can't.)
Again, there are likely other things I haven't thought of.
Flags: needinfo?(anatal)
Comment 6•9 years ago
|
||
Comment on attachment 8693283 [details] [diff] [review]
This patch changes the order of the models and grammar loading
From API point of view, would it make sense if SpeechRecognition constructor took DOMString lang as a parameter, and SetRecognitionService would be called at that time only if lang was passed.
But yeah, as the patch is written, constructor succeeds only if there is service for the language defined in <html> element or the default lang is used.
Should SpeechRecognition object have some .readyState property which is set to 'pending' or some such
when grammars are set, and then when loading/validation is ready, the state is changed ('ready') and event is fired?
Attachment #8693283 -
Flags: review?(bugs) → review-
Comment 7•9 years ago
|
||
(r- was especially about object->SetRecognitionService(aRv); call and the other parts of the comment were more like wondering what should happen here.)
Comment on attachment 8693283 [details] [diff] [review]
This patch changes the order of the models and grammar loading
Review of attachment 8693283 [details] [diff] [review]:
-----------------------------------------------------------------
I still have all the questions in comment 5. So, I'm going to review- until they are answered.
Attachment #8693283 -
Flags: review?(kdavis) → review-
Assignee | ||
Comment 10•9 years ago
|
||
As discussed with Kelly at Vaani, Gecko won't be used for speech anymore due the pivot to iot.
Assignee | ||
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Assignee | ||
Updated•9 years ago
|
Flags: needinfo?(anatal)
You need to log in
before you can comment on or make changes to this bug.
Description
•