Skip to content

feat(voice): provider-agnostic TTS seam + audio-reactive renderer - #8

Merged
nshaul merged 1 commit into
mainfrom
voice-viz-audio-reactive
Jul 30, 2026
Merged

nshaul merged 1 commit into
mainfrom
voice-viz-audio-reactive

Conversation

@reshimu

@reshimu reshimu commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • Provider-agnostic voice seam (src/voice/): a VoiceAdapter interface with an ElevenLabs adapter (proxied through server-side api/voice/*.js so the key never reaches the bundle) and a zero-cost Web Speech fallback, selected via VITE_VOICE_PROVIDER.
  • VoiceViz — audio-reactive canvas renderer driven by the pre-written voice-drivers.js (smoothed RMS/low-band/spectral-centroid scalars), accepting either a live AnalyserNode or a pre-computed curve.
  • VoicePanel — the connection surface: provider name, key present/absent, health() result, and a Test voice button wired into VoiceViz.
  • Spec at docs/specs/voice-viz.md, approved before implementation.

Test plan

  • pnpm typecheck — clean
  • pnpm lint — clean (--max-warnings=0)
  • pnpm test — 19 files / 87 tests passing (voice-drivers TDD suite, adapter tests with mocked fetch/speechSynthesis, VoiceViz smoke test)
  • pnpm build — demo + library both build; public library bundle size unchanged (voice code isn't exported publicly)
  • pnpm check:bundle-size / test:consumer / test:react-consumer — all pass
  • Two-stage review: spec compliance PASS, code quality PASS (two real bugs found and fixed — a stuck-disabled Test voice button in the default config, and an AudioContext/blob-URL leak on repeated clicks)
  • Verified no secret staged (git diff --cached grep, .env.example has empty values, .gitignore covers .env*)

🤖 Generated with Claude Code

Adds src/voice/ with an ElevenLabs adapter behind a server-side proxy and a
Web Speech fallback. Adds VoiceViz, driven by smoothed RMS/low-band/centroid
scalars rather than generative video, so the form re-renders from design tokens.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@nshaul
nshaul merged commit d96e68c into main Jul 30, 2026
1 check passed
@nshaul
nshaul deleted the voice-viz-audio-reactive branch July 30, 2026 23:41
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.

3 participants