BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/sv11-twango/transcript-viewer

Transcript Viewer

sv11-twango/transcript-viewer
FreeComponent

A word-synced transcript viewer with integrated audio playback and scrub bar.

Live preview

live · rendered by the registry
Rendered by sv11-twango on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add http://sv11.ui.twango.dev/r/transcript-viewer.json

Source

registry itemsv11.ui.twango.dev/r/transcript-viewer.json · first 6 KB
1<script lang="ts" module>
2 import type { HTMLAttributes } from "svelte/elements";
3 import type { Snippet } from "svelte";
4 import type { AudioType, CharacterAlignment, SegmentComposer } from "./context.svelte.js";
5
6 export type TranscriptViewerProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
7 /** URL of the audio file that backs the transcript. */
8 audioSrc: string;
9 /**
10 * MIME type emitted on the inner `<source>` element. Set this when
11 * serving non-MP3 audio so the browser picks the right decoder.
12 * @default "audio/mpeg"
13 */
14 audioType?: AudioType;
15 /**
16 * Character-level alignment used to compute word boundaries and drive
17 * highlighting. Shape matches ElevenLabs' `CharacterAlignmentResponseModel`;
18 * reshape other providers' output to the same structure.
19 */
20 alignment: CharacterAlignment;
21 /**
22 * Override the default word/gap segmentation. Receives the raw
23 * alignment and returns the composed `segments` and `words` arrays.
24 */
25 segmentComposer?: SegmentComposer;
26 /**
27 * When `true`, ElevenLabs-style tags like `[excited]` are stripped
28 * from the rendered transcript.
29 * @default true
30 */
31 hideAudioTags?: boolean;
32 /** Called when the audio starts playing. */
33 onPlay?: () => void;
34 /** Called when the audio is paused. */
35 onPause?: () => void;
36 /** Called with the current playback time (in seconds) on every audio `timeupdate`. */
37 onTimeUpdate?: (time: number) => void;
38 /** Called when playback reaches the end of the track. */
39 onEnded?: () => void;
40 /** Called with the total duration (in seconds) once metadata is available. */
41 onDurationChange?: (duration: number) => void;
42 /**
43 * Sub-components composed inside the root (e.g. `<TranscriptViewerAudio />`,
44 * `<TranscriptViewerWords />`, `<TranscriptViewerScrubBar />`).
45 */
46 children?: Snippet;
47 /** Bind to the underlying wrapper `<div>` element. */
48 ref?: HTMLDivElement | null;
49 };
50</script>
51
52<script lang="ts">
53 import { cn } from "$UTILS$.js";
54 import { setTranscriptViewer } from "./context.svelte.js";
55 import { composeSegments, guessedDurationFrom } from "./utils.js";
56
57 let {
58 audioSrc,
59 audioType = "audio/mpeg",
60 alignment,
61 segmentComposer,
62 hideAudioTags = true,
63 onPlay,
64 onPause,
65 onTimeUpdate,
66 onEnded,
67 onDurationChange,
68 class: className,
69 children,
70 ref = $bindable(null),
71 ...restProps
72 }: TranscriptViewerProps = $props();
73
74 const state = setTranscriptViewer();
75
76// … truncated

What it pulls in

npm packages

  • @lucide/svelte

Other registry items

  • button

Facts

Registry
sv11-twango
Type
registry:ui
Access
Free
Files written
0
Licence
MIT
First indexed
2026-08-02
Last confirmed
2 days ago

Go to the source

Docs on sv11-twango sv11.ui.twango.dev twangodev/sv11-ui on GitHub Raw registry item This item as JSON

More from sv11-twango

All 29 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Audio Playeraudio-playersv11-twangoComponentsFree2 deps
Bar Visualizerbar-visualizersv11-twangoComponentsFreeno deps
Conversationconversationsv11-twangoComponentsFree2 deps
Conversation Barconversation-barsv11-twangoComponentsFree1 dep
Live Waveformlive-waveformsv11-twangoComponentsFreeno deps
Matrixmatrixsv11-twangoComponentsFreeno deps
Messagemessagesv11-twangoComponentsFree2 deps
Mic Selectormic-selectorsv11-twangoComponentsFree1 dep
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex