Repository navigation
[4.0] fix(audio-captions): start speech recognition without a track in Edge - #26560
Conversation
Since bigbluebutton#25970 (the 4.0 port of bigbluebutton#25927) the client passes a clone of the meeting's microphone track to SpeechRecognition.start(), so that the browser transcribes the microphone in use in the meeting and not its own default one. That was developed and tested in Chrome. Microsoft Edge accepts the track too, but its live captions are then almost empty, and what does come through is unrelated to what was said. bigbluebutton#26517 has the measurements, taken on 3.0.40, the first 3.0 release with the same code: on a day when a fleet ran both client builds, Edge recordings had a median of 784 bytes of captions per recorded minute on the previous build and 10 on 3.0.40, while Chrome stayed level (699 and 739). Edge raises no error for the argument, so there is nothing to feature-detect: the browser itself is the only signal. getInputTrack() now returns no track in Edge. start() then takes the path it already has for a missing track: a session without an argument, on the browser's default microphone, as before bigbluebutton#25970. No track id is recorded, so a change of the input stream does not restart the session either. Other browsers are not affected. For Edge users this brings back the limitation bigbluebutton#25970 removed: when the browser's default microphone is not the one selected in the meeting, their speech is not transcribed. The microphoneAlert toast tells them, and the client logs captions_speech_recognition_default_device once, which also shows that a session took this path. Why Edge fails with a track is not established. The condition can go once Edge transcribes a track it is given. Related: bigbluebutton#26517
|
No actionable comments were generated in the recent review. WalkthroughThe speech caption component now returns Estimated code review effort: 2 (Simple) | ~5 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk:
|
✅ Automated tests have passed! |
|
I tested the browser behaviour on its own, in real Edge on Windows. Edge's recognizer transcribes nothing when Setup: a standalone page with no BBB server involved. It uses the same recognizer settings as the client (
Edge accepted the track without raising an error, as you expected. Instead it returned empty final results at a steady interval of about 3.2 s, whether or not anyone was speaking. In the two runs that lasted longer than 30 s, each session ended with a Not established:
Next: the PR build in a real meeting (Edge with and without the fix, a Chrome control, and Edge with a non-default meeting microphone to check the |
What does this PR do?
Automatic captions (webspeech): in Microsoft Edge the client no longer passes the meeting's microphone track to
SpeechRecognition.start(). The session starts without an argument, as it did before #25970, so Edge transcribes its default microphone again. Chrome and the other browsers still get the track.The change is one condition in
getInputTrack(). Everything else is the path the component already has for a missing track.Closes Issue(s)
Closes: #26517
Motivation
SpeechRecognition.start(). Between v3.0.39 and v3.0.40 no other commit touches the captions or the audio manager code.What Edge users lose with this change is what #25970 gave them: when the browser's default microphone is not the one selected in the meeting, their speech is not transcribed. The
microphoneAlerttoast tells them, as it did before #25970.How to test
In Microsoft Edge on Windows (this is the test that is still missing):
public.app.audioCaptions.enabled: truewith providerwebspeech.Captions speech recognition started on the browser default microphoneonce (log codecaptions_speech_recognition_default_device).What was checked so far is the code path only, in Google Chrome 156 with the user agent of Edge 156 on Windows, against a 4.0.2 server. The browser's recognizer was replaced by a stub that records the calls it gets, so nothing was transcribed. Each run joins audio, sets the transcription language to en-US, then mutes and unmutes once, which makes two
start()calls.start()callsIn the last run the client logged
captions_speech_recognition_default_deviceonce, for the first of the two sessions.More
tscandeslintare clean, and the client builds.browserInfo.isEdge), not only Edge on Windows, where the reports come from.getInputTrack(), so the commit can be backported to 3.0 as it is.