Dual Trace analyses conversations between two speakers in real time. It extracts key words from each speaker's transcript, compares them, and visualises the linguistic overlap as an interactive graph. The graph appears on the Display (stage projector) and Playback (gallery TV) pages.
⚡ Live Manual recording. Press Rec A or Rec B to record one speaker at a time. Audio is sent to ElevenLabs for transcription, then the text is analysed and the graph updates. Good for rehearsals or controlled recording.
🎙 USB Two USB microphones record both speakers simultaneously in continuous chunks. Each chunk is transcribed automatically — no manual switching. Best for live performances with dedicated mics per speaker.
🎬 Video Upload a pre-recorded video or audio file. The system sends it to ElevenLabs for transcription with speaker diarization, then analyses the result and builds a timeline. Use this for post-performance review or rehearsal playback.
Connect two USB audio devices (mics or interfaces) to the MacBook. Switch to USB mode and click Refresh to see available devices. Assign one mic per speaker and press Start Recording. Audio is chunked and transcribed continuously.
For XLR stage mics, use a USB audio interface (Focusrite Scarlett 2i2, MOTU M2, etc.) with audio routing software to present each input as a separate device.
Theme The title/topic of the conversation. Shown on the display page header.
A / B / Role Speaker names and their roles (e.g., Psychoanalyst, Cryptographer). Shown on the display axes.
API Key Your ElevenLabs API key for speech-to-text transcription. Required for Live and USB modes.
Max Rec Maximum recording duration in seconds (default: 300 = 5 minutes). In Live mode, recording auto-stops after this limit to prevent runaway recordings.
Contest. Contested threshold (default: 0.3). Controls how similar two speakers' word usage must be for a word to be classified as "contested" rather than "shared". Lower values = more words marked contested. Range: 0 to 1.
Stem Enable Porter stemming. When on, words are reduced to their root form before comparison (e.g., "running" and "runs" both become "run"). Useful for detecting semantic overlap that exact matching would miss.
Chunk USB chunk length in seconds (default: 30). In USB mode, audio is split into chunks of this duration. Each chunk is transcribed separately. Shorter chunks = faster visual updates but more API calls.
Stop Additional stop words to filter out (comma-separated). These words are excluded from the keyword analysis alongside the built-in common words list.
Focus Words to always keep as keywords (comma-separated). These bypass both frequency thresholds and stop-word filtering, ensuring they appear in the analysis whenever spoken.
A running word count (Xw) appears next to each speaker's recording timer in Live mode and next to each speaker name in USB mode. Counts update after each transcription and when transcripts are edited.
Each section has a small lock button. When clicked, it turns red and reads locked, making fields read-only to prevent accidental changes during a performance. There are three lockable sections: identity (theme/speakers), settings (API key, thresholds), and word filters (stop/focus words). Lock transcripts separately using their own lock buttons.
Sessions auto-save to the browser's IndexedDB. Use New in the bottom bar to start a fresh session (previous one is kept). Use History to browse and restore past sessions. Use Export (in each mode's toolbar) to download the session as a JSON file for playback.
Renaming sessions: In the History drawer, click a session's theme text to rename it. Press Enter or click away to save. The custom title appears in the session indicator at the bottom of the panel.
display.html Opens on the stage projector. Receives live data from the operator panel via localStorage. Shows the graph, speaker names, stats, session timer, and theme. Press F to toggle fullscreen.
Waiting state: Before the first analysis arrives, the display shows a subtle breathing glow and pulsing status dot to signal the system is connected and ready. The glow settles once data starts flowing.
Live status: A ● LIVE badge appears below the theme as soon as recording starts (in either Live or USB mode). Each speaker also shows a real-time status — recording or transcribing — next to their name. These indicators clear when processing finishes.
Graph density: When the graph grows past 30 or 60 nodes, the system automatically adjusts physics spacing and reduces label sizes so nodes don't overlap.
To let audience members follow along on their phones, set the Room mode to Live Room and click Create Room. A 6-character room code appears. Share this code or the URL audience.html?room=CODE with the audience.
Audience members see the same word map and transcripts as the stage display, but in a phone-friendly layout with tabs. They can tap any word pill for details. Requires one-time Firebase setup (see SETUP.md).
The stage display (display.html) continues to work as normal — both displays receive the exact same data from the operator panel.
playback.html Opens on the gallery TV. Loads exported JSON files and replays the analysis timeline synchronised to video. Supports loop and autoplay for exhibition.
All display pages use identical graph visualisation — same node sizes, colours, and animations.
Press Ctrl+Shift+D on display.html or playback.html to toggle a debug HUD showing FPS, node/edge counts, and render statistics. Useful for diagnosing performance during rehearsals.
Each word appears as a pill-shaped node. Colour indicates ownership:
Node size reflects word frequency. Badge numbers show occurrence count. Words must appear at least twice to show up (filters out transcription noise).
Transcripts are editable in real time. Click into any transcript to correct transcription errors. Changes are debounced (800ms) and automatically re-analysed. Lock a transcript to prevent accidental edits during performance.
Click Notes in the bottom bar to open a scratchpad. Notes are saved with the session.
The bottom bar shows the latest log message. Click it to expand the full log history. Colour-coded: green = success, pink = error, amber = warning, grey = info.