Add interactive turn detection visualizer to docs#616
Open
devin-ai-integration[bot] wants to merge 8 commits intomainfrom
Open
Add interactive turn detection visualizer to docs#616devin-ai-integration[bot] wants to merge 8 commits intomainfrom
devin-ai-integration[bot] wants to merge 8 commits intomainfrom
Conversation
Co-Authored-By: Dan Ince <dince@assemblyai.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: Dan Ince <dince@assemblyai.com>
Co-Authored-By: Dan Ince <dince@assemblyai.com>
Co-Authored-By: Dan Ince <dince@assemblyai.com>
- Replace sliders with preset-only buttons (Aggressive/Balanced/Conservative) - Display parameter values as text instead of interactive sliders - Restore speech waveform visualization with confidence-based coloring - Fix EoT logic: when silence period extends into next speech segment, turn continues - In conservative mode, segment 2 (conf 0.35 < threshold 0.7) correctly shows turn continuing into segment 3 - Add 'turn continues' indicator between connected segments Co-Authored-By: Dan Ince <dince@assemblyai.com>
Co-Authored-By: Dan Ince <dince@assemblyai.com>
Co-Authored-By: Dan Ince <dince@assemblyai.com>
Co-Authored-By: Dan Ince <dince@assemblyai.com>
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.
Add interactive turn detection visualizer to docs
Summary
Adds an interactive React component (
TurnDetectionVisualizer) to the turn detection docs page that visually demonstrates how the three turn detection parameters affect end-of-turn detection.The component renders inline on the page (always visible, no toggle) under the "How it works" section:
code → valuegrid below the visualizationmin_silence_when_confidentpath, amber formax_turn_silencefallback) — hidden when the silence period extends into the next speech segmentmin_silenceormax_silence) and "EoT" text — labels update when switching presetsThe two EoT conditions are modeled:
min_end_of_turn_silence_when_confidentmax_turn_silenceWhen the computed EoT time for a segment falls after the next segment's start, the turn is not ended — this is visually highlighted, which is especially visible in Conservative mode where segment 2 (conf 0.35 < threshold 0.7) continues into segment 3.
Updates since last revision
min_silence/max_silence) are now positioned above the vertical marker lines instead of behind/below them. Labels use a two-line layout: parameter name (small, gray) on top, "EoT" (bold, colored) below, with the vertical line starting beneath. Container height increased to 140px and all internal elements shifted down to accommodate the labels at the top. This addresses feedback that labels were obscured by the lines.fern-check,lint) are unrelated to this PR —fern checkconfirms[docs]:✓ All checks passed.Review & Testing Checklist for Human
#22c55e,#f59e0b), waveform bar colors (var(--accent-9),var(--accent-7)), and the "turn continues" bar (var(--accent-5)) should be verified in dark mode. Dark mode was not tested. This is the highest-risk item.min_silence/max_silence) appear clearly above the vertical lines and do not overlap with the lines or waveform bars. Labels use absolute positioning attop: 0pxwithin a 140px container; verify they don't clip or collide with content above the visualizer.minWidth: "500px"withoverflowX: "auto", which will cause horizontal scrolling on small screens. Verify this is acceptable.Recommended test plan: Run
fern docs dev, openlocalhost:3000/docs/universal-streaming/turn-detection, scroll to "How it works" section. Try each preset button. Verify EoT labels are above the vertical lines. Specifically verify Conservative mode shows "turn continues" between segments 2 and 3 with no EoT marker there. Check in both light and dark mode, and resize browser to ~400px width to test overflow behavior.Notes
openapi.ymlare unrelated to this PR.