Repository navigation
Add a speech fallback to the audio check - #264
Merged
Merged
Conversation
jserv
reviewed
Oct 9, 2026
jserv
reviewed
Oct 9, 2026
| try { | ||
| nodes.audioTestVoice.pause(); | ||
| nodes.audioTestVoice.currentTime = 0; | ||
| await nodes.audioTestVoice.play(); |
Contributor
There was a problem hiding this comment.
After the WAV fails to load once (a dropped connection, a server restart), the element keeps MEDIA_ERR_SRC_NOT_SUPPORTED, and every later play() rejects with NotSupportedError without fetching again. The error listener's "Reload the page" hint fires first. This catch then overwrites it with "Try again", which can never succeed. Reload the source when the element is in an error state.
Suggested change
| await nodes.audioTestVoice.play(); | |
| if (nodes.audioTestVoice.error) nodes.audioTestVoice.load(); | |
| await nodes.audioTestVoice.play(); |
Playback noise reduction can suppress a pure test tone while preserving speech. Offer a local speech sample with explicit candidate confirmation so the output check remains useful without relying on external services or changing microphone processing. Closes sysprog21#44
liehcheng
force-pushed
the
codex/issue-44-speech-fallback
branch
from
October 9, 2026 03:57
f720d4e to
5128b85
Compare
Contributor
|
Thank @liehcheng for contributing! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On the Acer system reported in #44, the preflight's pure tone becomes inaudible with microphone capture and playback noise reduction active, while interviewer speech remains audible. Keep the tone and add a "Can't hear the tone?" control that plays a short speech sample. Candidates still confirm output with "I heard it", and the preflight offers guidance about playback noise reduction and audio enhancements.
The included test-voice.wav was generated using TTSMaker voice 148, Alayna (US English), and converted from MP3 to 24 kHz, 16-bit mono PCM. The asset's README records its source, voice, spoken text, format and licensing link. Users play the included file without generating speech or installing a synthesis engine. Replay uses one media element, failures remain retryable, and playback stops on leaving, starting the interview, or switching back to the tone. The server serves the embedded file as
audio/wav.Validation:
cargo build --release --lockedand./scripts/test.shpassed using local Windows/WSL adapters. All six Chromium speech regression tests passed, and a separate check verified the current release's embedded audio and preflight playback flow. The contributor confirmed that the shipped speech sample is audible. Seventeen Rust tests remained ignored.Closes #44
Summary by cubic
Adds a speech fallback to the preflight audio check for systems where playback noise reduction silences the pure tone while preserving speech.
Candidates who can't hear the tone can now play a bundled speech sample via a new "Can't hear the tone?" button, which relabels to "Play speech again" after the first play. Output is still confirmed with "I heard it", now applying to either tone or speech, and the preflight shows guidance about noise reduction and audio enhancements.
test-voice.wavso no external service or synthesis engine is needed; the server serves it asaudio/wav.audio/wavand matches the shipped file.Written for commit 5128b85. Summary will update on new commits.