Skip to content

[4.0] fix(audio-captions): start speech recognition without a track in Edge - #26560

Merged
antobinary merged 1 commit into
bigbluebutton:v4.0.x-developfrom
antobinary:fix-26517-webspeech-edge-default-microphone-40
Nov 17, 2026
Merged

antobinary merged 1 commit into
bigbluebutton:v4.0.x-developfrom
antobinary:fix-26517-webspeech-edge-default-microphone-40

Conversation

@antobinary

Copy link
Copy Markdown
Member

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

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 microphoneAlert toast tells them, as it did before #25970.

How to test

In Microsoft Edge on Windows (this is the test that is still missing):

  1. Enable automatic captions: public.app.audioCaptions.enabled: true with provider webspeech.
  2. Join with Edge, join audio with the microphone, choose a transcription language and speak for a few minutes.
  3. Without this change the captions stay nearly empty or show unrelated fragments. With it they should follow the speech, as they did on 3.0.39.
  4. To see which path a client took: with this change, Edge's console shows Captions speech recognition started on the browser default microphone once (log code captions_speech_recognition_default_device).
  5. In Chrome nothing changes: with a microphone selected in the meeting that is not the system default, Chrome still transcribes the selected one.

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.

Client User agent start() calls With the microphone track Without an argument
4.0.2 as packaged Chrome 156 2 2 0
4.0.2 as packaged Edge 156, Windows 2 2 0
This branch Chrome 156 2 2 0
This branch Edge 156, Windows 2 0 2

In the last run the client logged captions_speech_recognition_default_device once, for the first of the two sessions.

More

  • tsc and eslint are clean, and the client builds.
  • The check covers every Edge (browserInfo.isEdge), not only Edge on Windows, where the reports come from.
  • v3.0.x-develop has the same getInputTrack(), so the commit can be backported to 3.0 as it is.
  • Added/updated documentation (not needed)

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
@antobinary antobinary added this to the Release 4.0 milestone Nov 16, 2026
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The speech caption component now returns null from getInputTrack on Edge. Other browsers continue to use the first live, unmuted audio track.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: tainan404, arthurk12

Merge Risk: Low · up to a5a01

Edge users now get captions from the browser's default microphone. If that is not the microphone selected for the meeting, captions may reflect a different device and the existing alert may not warn them. The change is small and easy to revert. Confirm in Edge on Windows that captions are usable before relying on it.

Pre-merge checks: Passed 4

Check name Status Explanation
Description check Passed The description is directly related to the changeset. It explains that Edge no longer receives the microphone track in SpeechRecognition.start(), which matches the one-condition change in getInputTrac…
Linked Issues check Passed Directly linked issue #26517 asks that Edge webspeech captions work as on 3.0.39, and it names two candidate fixes: pass the track only where it is known to work, or fall back to start() for Edge. At …
Out of Scope Changes check Passed The PR changes one condition in getInputTrack(): an early return of null when browserInfo.isEdge is true. The AI change summary reports +4/-0 lines in speech/component.tsx and no changed declarations.…
Title check Passed The title names the main change: speech recognition in Edge starts without a track, which matches the summary (getInputTrack returns null on Edge) and the objectives (omit the meeting mic track for Ed…
Full details: Description check

Explanation

The description is directly related to the changeset. It explains that Edge no longer receives the microphone track in SpeechRecognition.start(), which matches the one-condition change in getInputTrack(). It also gives the linked issue, motivation, and test steps.

Full details: Linked Issues check

Explanation

Directly linked issue #26517 asks that Edge webspeech captions work as on 3.0.39, and it names two candidate fixes: pass the track only where it is known to work, or fall back to start() for Edge. At head, getInputTrack() in speech/component.tsx returns null when browserInfo.isEdge is true, before it reads the audio track. start() then runs without an argument on Edge. Other browsers still receive a live, unmuted track clone. The no-track branch (the !clone path) does not recreate the recognizer on Edge, because hadTrackRef is never set there. This matches the issue's suggested fix. The issue has no non-coding requirements that apply here. The issue's runtime expectation, that Edge transcribes speech, is not verified: the PR author's test used a stub recognizer, and real Edge transcription is still missing. That is a verification gap, not a missing code requirement. No automated test was added, and the issue does not require one.

Full details: Out of Scope Changes check

Explanation

The PR changes one condition in getInputTrack(): an early return of null when browserInfo.isEdge is true. The AI change summary reports +4/-0 lines in speech/component.tsx and no changed declarations. The rest of the component, including the clone handling, the default-device log code, and the recognizer recreation, is already at the merge base, and the PR does not add it. The change connects directly to #26517. Limitation: the whole-PR text diff could not be read (changed blobs unavailable in the checkout). This verdict relies on the supplied summary and the head file contents. The change set is small, so the uncertainty does not affect the verdict.

Full details: Title check

Explanation

The title names the main change: speech recognition in Edge starts without a track, which matches the summary (getInputTrack returns null on Edge) and the objectives (omit the meeting mic track for Edge, keep it for other browsers). It is specific, concise, and follows the [4.0] fix(...) convention. The title does not mention the Edge-only scope or the default microphone trade-off, but it does not need to cover every detail.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f7fa9623-d4ad-4f25-bbb3-a6fe86c43b73
Commits

Reviewing files that changed from the base of the PR and between 6dfe981 and a5a01d5.

Files selected for processing: 1

  • bigbluebutton-html5/imports/ui/components/audio/audio-graphql/audio-captions/speech/component.tsx

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@github-actions

Copy link
Copy Markdown

✅ Automated tests have passed!

@ritzalam

Copy link
Copy Markdown
Member

I tested the browser behaviour on its own, in real Edge on Windows. Edge's recognizer transcribes nothing when start() is given a microphone track, and transcribes normally when it is called without one. Chrome transcribes either way. This confirms the cause the PR assumed.

Setup: a standalone page with no BBB server involved. It uses the same recognizer settings as the client (continuous, interimResults, restart on end) and passes a clone() of a getUserMedia track, as start() in speech/component.tsx does. The same USB microphone, which is the Windows default, was used for every run. I read the same passage aloud each time.

Browser start() Passage words recognised What came back
Edge 157, Windows with track 0% 16 final results in 56 s, all empty
Edge 157, Windows without 91% 3 final results with the full passage
Edge 157, Windows with track (repeat) 0% 8 final results in 27 s, all empty
Edge 157, Windows with track (longer run) 0% 18 final results in 65 s, all empty
Chrome 156, Windows with track 96% full passage
Chrome 156, Windows without 91% full passage

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 network error after about 29 s and was restarted. The 27 s run ended before that point with no error, and the 35 s run without a track had no error. The empty results begin within 3 s, well before any error, so the errors do not cause them.

Not established:

  • Why Edge does this. A likely explanation is that Edge's recognizer gets no usable audio from the track, but this test cannot show that.
  • How this produces the cues in our recordings. The production files had a few fragments, not empty cues, and nearly every cue was 16 s long.

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 microphoneAlert toast). I'll post those results once a test host has the patched client.

@antobinary antobinary changed the title fix(audio-captions): start speech recognition without a track in Edge [4.0] fix(audio-captions): start speech recognition without a track in Edge Nov 17, 2026
@antobinary
antobinary removed the request for review from ramonlsouza November 17, 2026 14:16
@antobinary
antobinary merged commit 3fc5b07 into bigbluebutton:v4.0.x-develop Nov 17, 2026
37 checks passed
@antobinary
antobinary deleted the fix-26517-webspeech-edge-default-microphone-40 branch November 17, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Live captions (webspeech) near-empty or nonsense in Microsoft Edge since 3.0.40 — mic track passed to SpeechRecognition.start()

2 participants