Skip to content

feat(site): split playground into STT / TTS / Analysis pages - #51

Merged
Alex-Wengg merged 4 commits into
mainfrom
feat/page-split
Aug 23, 2026
Merged

feat(site): split playground into STT / TTS / Analysis pages#51
Alex-Wengg merged 4 commits into
mainfrom
feat/page-split

Conversation

@Alex-Wengg

Copy link
Copy Markdown
Member

Stacked on #50 (feat/transcribe-progress) — the shared run flow carries that PR's transcription-progress reporting, so this branches from it rather than main. Rebase onto main after #50 merges.

Structure

One all-in-one playground becomes one page per function, all deriving their engine picker from the registry:

Page Entry Engines Controls
index.htmlSpeech to Text (root URL stays the flagship demo) src/stt.ts asr-parakeet, asr-whisper, asr-nemotron, eou-parakeet, asr-voicechat file input, 🎤 live mic, custom-vocabulary + ITN row (Parakeet), SRT/VTT caption downloads, load + transcription progress, output box
tts.htmlText to Speech src/tts.ts tts-kokoro-en, tts-kokoro-zh (+ anything the registry gains, e.g. a future tts-voicechat) text box → Synthesize → audio player + ⬇ WAV download
analyze.htmlAnalysis src/analyze.ts vad-silero (detect), diarization-sortformer (diarize) file input → segment listing in the output box

All five pages (incl. live.html, music.html) share the nav "Speech to Text · Text to Speech · Analysis · Live captions · Music" with the current page bold/unlinked.

Registry category field

EngineEntry gains category: "stt" | "tts" | "analysis"; each page filters ENGINES by it, so a newly registered engine lands on the right page with no page-side id lists. Availability probes (e.g. asr-voicechat) still prune per page. EngineCategory is re-exported from the SDK root.

Shared core

src/main.ts moved bodily into src/pages/playground.ts as initPlayground({ category, defaultEngineId?, mic?, captions?, vocab? }) — pick→load→run, live-mic, captions, and vocab/ITN logic unchanged; page-only UI is gated on flags + element presence. The three entries are thin one-liners. Only additive behavior: tts.html gets a WAV download the combined page never offered.

Gates

  • npx tsc --noEmit clean; npm run build emits all five pages to dist/
  • prettier / npm run format:check clean; npm run conformance OK
  • ci-smoke-parakeet + ci-smoke-kokoro OK against cached weights
  • vite preview curl-checked: each page serves its title, nav, and its own entry chunk

The playground split (one page per function) needs to filter the engine
catalog per page. Category lives on the registry entry so new engines are
routed to the right page at registration time instead of via page-side id
lists.
One all-in-one playground page becomes three function-specific pages, each a
thin entry over a shared core:

- index.html (src/stt.ts) — Speech to Text: the five ASR engines, live mic
  mode, SRT/VTT caption downloads, Parakeet custom-vocabulary + ITN row,
  transcription progress. Root URL stays the flagship transcription demo.
- tts.html (src/tts.ts) — Text to Speech: TTS engines from the registry;
  text box, audio player, WAV download.
- analyze.html (src/analyze.ts) — Analysis: Silero VAD + Sortformer
  diarization; file in, segment listing out.

src/main.ts moves bodily into src/pages/playground.ts as
initPlayground({ category, ... }): the engine picker filters the registry by
category (availability probes intact), page-only UI (mic, captions, vocab,
player, WAV link) is gated on flags plus element presence, and the run /
load / live-mic flows are unchanged. tts.html gains the WAV download the
old combined page never had; the player element moves off index.html with
the text row since only TTS used them.

live.html and music.html get the five-item nav; all pages mark the current
page unlinked. vite rollupOptions gains tts + analyze inputs.
README live links, quick start, layout tree, and the registry category note;
ARCHITECTURE entry-points section; STREAMING mic-loop references follow
main.ts → pages/playground.ts.
@Alex-Wengg
Alex-Wengg changed the base branch from feat/transcribe-progress to main August 23, 2026 20:34
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 23, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
fluidaudio-web b9dbaad Aug 23 2026, 08:38 PM

@Alex-Wengg
Alex-Wengg merged commit a3751d6 into main Aug 23, 2026
6 checks passed
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.

1 participant