feat(rsvpSpeech): Implement RSVP speech response mode validation and adjust silence thresholds - #140
Merged
Conversation
…adjust silence thresholds
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The changes are well-scoped, covered by new/updated tests (including validation snapshots), and the modified capture/controller behavior is exercised by targeted regressions.
Pull request overview
Adds RSVP-speech specific validation and refines RSVP speech capture behavior to better separate “start input” (microphone running) from “start capture” (emit gated PCM + begin utterance), while aligning provider silence/endpointing thresholds with RSVP needs.
Changes:
- Add a new experiment-table validation error when RSVP reading uses both
responseSpokenBoolandresponseSpokenToExperimenterBoolin the same enabled condition. - Introduce
startInput()to microphone capture and use it during RSVP speech preparation so input can run before stimulus onset without buffering/emitting pre-onset frames. - Set RSVP-specific provider silence/endpointing thresholds (ElevenLabs VAD silence = 1.5s; Deepgram default endpointing = 1500ms), with tests asserting URL parameters.
File summaries
| File | Description |
|---|---|
preprocess/validateExperimentTable.ts |
Adds checkRsvpSpeechResponseModes and registers it in TABLE_CHECKS. |
components/speech/audioCapture.ts |
Adds startInput() and updates start()/stop() to support pre-onset input without pre-onset emission. |
components/rsvpSpeech/rsvpSpeechController.ts |
Starts microphone input during prepare() and applies RSVP-specific silence/endpointing defaults in transcriber creation. |
tests/validationGreenSnapshot.test.ts |
Adds a per-check trigger scenario for RSVP speech response mode incompatibility. |
tests/__snapshots__/validationGreenSnapshot.test.ts.snap |
Updates snapshot to include the new validation output. |
tests/rsvpSpeechCompiler.test.ts |
New targeted validation tests for RSVP speech response mode rules across conditions/blocks/defaults. |
tests/audioCapture.test.ts |
Adds tests for startInput() gating semantics and lifecycle behavior. |
tests/speechSession.test.ts |
Adds a regression test ensuring presentation end doesn’t prematurely stop input or start final-result timeout behavior. |
tests/rsvpSpeechController.test.ts |
Expands controller tests for startInput() behavior and provider silence/endpointing configuration. |
Review details
- Files reviewed: 9/9 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
No description provided.