Add telemetry for on-device Web Speech
Categories
(Core :: Web Speech, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox158 | --- | fixed |
People
(Reporter: padenot, Assigned: padenot, NeedInfo)
References
Details
Attachments
(5 external files, 3 obsolete files)
| Assignee | ||
Comment 1•3 months ago
|
||
| Assignee | ||
Comment 2•3 months ago
|
||
session_ended is recorded from Reset(), the one path every teardown goes
through. No transcript text or audio is recorded.
| Assignee | ||
Comment 3•3 months ago
|
||
Three timing distributions, all recorded content-side:
- session_init_time, around the init IPC round trip, is the page-visible wait
between start() and recognition actually listening. - time_to_first_result, from [[started]] to the first result event.
- result_latency is true capture-to-JS latency, and comes for free from the
capture timestamps AudioCaptureTiming.h already plumbs end to end.
| Assignee | ||
Comment 4•3 months ago
|
||
Recorded in the utility process, where the inference happens:
- model_fetch_time and model_load_time separate opening an already-installed
model from reading the GGUF into memory. - chunk_inference_time is the per-call compute time.
- inference_realtime_factor is the session's audio over the time it took, x100
(400 means 4x faster than real time). Once per session: a per-call mean is
dominated by short chunks and overstates throughput by an order of magnitude.
Scaled because custom_distribution samples are integers, and a bare factor
would quantize away the 1-2x range that decides usability. - audio_processed_duration is its denominator, useful on its own.
- init_failure records why a session failed to start. All these causes reach
content as the single "network" error code, so this is the only way to tell a
missing model from a real failure.
The new test does a real recognition against the parakeet model served by
serve_model.py, so it runs in the speech-recognition subsuite. It asserts the
metrics have samples and logs the numbers rather than asserting on them, since
they depend on the machine.
| Assignee | ||
Comment 5•3 months ago
|
||
Counts impressions of the notification bar offering to turn speech recognition
back on, and what the user does with it.
- The observer notification carries which call was blocked, attributing an
impression to start() or install(). - An eventCallback counts dismissal, and navigating away for a bar the user
never acted on. Every removal path reports "disconnected", so this needs the
interactions to be tracked to tell the two apart. - A click listener on the <a is="moz-support-link"> counts "Learn more";
notificationbox only dispatches button callbacks for <label> elements.
dual_labeled_counter rather than events with string extras, so every dimension
is enumerated. The policy axis separates the managed case, where the bar has no
Enable button.
| Assignee | ||
Comment 6•3 months ago
|
||
Counts the prompt asking to download the model, whether the user continued, and
how the download then ended. All enumerated labels plus two numeric
distributions, so there are no free-form string dimensions.
Two arms needed code to be measurable at all:
- A user cancel and a network failure both arrive as done+!ok, so they were
indistinguishable. A flag set in the Cancel callback separates them. Pressing
Cancel closes the panel, so the outcome has to be decided when the
notification is removed rather than on a progress update -- otherwise a cancel
is recorded as abandoned. - A download whose panel goes away while it is still running produced no
terminal event at all; that is now recorded as abandoned.
#outcomeRecorded guarantees exactly one outcome per accepted download.
| Assignee | ||
Comment 7•3 months ago
|
||
MLModelHubService.downloadModel hardcoded featureId to "ml-model-hub-service",
so every firefox.ai.runtime.model_download event it produced carried the same
featureId regardless of which feature triggered the download. Pass the task name
through, matching getModelBlob(), so downloads started by native callers are
attributable: "speech-recognition" for the speech recognition model.
It also passed a "component" extra key, which model_download does not declare,
so glean rejected the key and flagged every one of these events invalid_value.
This was the only telemetryData caller in the tree, and featureId now carries
that information.
The new test drives a download through the XPCOM service and asserts every step
of it is attributed to the task name.
Comment 8•3 months ago
|
||
The severity field is not set for this bug.
:padenot, could you have a look please?
For more information, please visit BugBot documentation.
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
| Assignee | ||
Comment 9•2 months ago
|
||
MLModelHubService used the constant "ml-model-hub-service" as the feature ID for every native caller, so the existing firefox_ai_runtime.model_download events could not be selected by feature.
Pass the caller-provided task name as featureId, matching getModelBlob(). The browser test downloads through nsIMLModelHub and checks that every lifecycle event is attributed to speech-recognition.
Remove an attribute that was wrongly added and causes this to fail.
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Comment 10•2 months ago
|
||
Comment 11•2 months ago
|
||
Comment 12•2 months ago
|
||
Backed out for causing bc failures @ browser_speech_recognition_telemetry.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/da8e00aa145a1ebcfc60efc27bc5adcde105a08e
Comment 13•2 months ago
|
||
Comment 14•2 months ago
|
||
Comment 15•2 months ago
|
||
Backed out for causing bc failures @browser_speech_recognition_telemetry.js.
Comment 16•2 months ago
|
||
Comment 17•2 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/3d9e2eadbf43
https://hg.mozilla.org/mozilla-central/rev/83e4f40b5a4c
https://hg.mozilla.org/mozilla-central/rev/a6cec24d0774
https://hg.mozilla.org/mozilla-central/rev/b19693064953
https://hg.mozilla.org/mozilla-central/rev/d607e1d2efcf
Updated•1 month ago
|
Description
•