Skip to content

feat(rsvpSpeech): Implement RSVP speech response mode validation and adjust silence thresholds - #140

Merged
sajjad-mazaheri merged 1 commit into
mainfrom
feature/rsvp-speech-timing-and-validation
Sep 7, 2026
Merged

feat(rsvpSpeech): Implement RSVP speech response mode validation and adjust silence thresholds#140
sajjad-mazaheri merged 1 commit into
mainfrom
feature/rsvp-speech-timing-and-validation

Conversation

@sajjad-mazaheri

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI lite review requested due to automatic review settings September 7, 2026 14:14
@sajjad-mazaheri
sajjad-mazaheri merged commit 94ae358 into main Sep 7, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 responseSpokenBool and responseSpokenToExperimenterBool in 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.

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.

2 participants