Skip to content
Browse docs and components

Transcript

transcript

A transcript that follows the audio: the current line is marked and kept in view, the word being said lights within it, and any line or word seeks back to where it was spoken. One tab stop, arrow keys between lines.

Responsive

Install

$npxshadcnadd@forme/transcript

Adds the component, its registry dependencies, and the token stylesheet you import once.

Examples

2 more ways to put it to work. Install one by name and it lands beside the component, or copy it from the Code tab into your app.

Speakers

A diarised meeting: each line carries who said it, and a click marks the line — wire onSeek to a player to jump there.

$npxshadcnadd@forme/transcript-speakers
Responsive

Live captions

Lines join as a streaming speech-to-text service finalises them, and the box keeps up with the newest one.

$npxshadcnadd@forme/transcript-live-captions
Responsive

API reference

Read from the source, so it is the API of the file you install. A prop marked * is required.

Transcript

A transcript that follows the audio. A highlight slides from line to line, the word being said fills with an underline as it is spoken, and the box keeps the line in view — until the reader scrolls away, when a button offers the way back. Every line is one button (Enter replays it, a click on a word starts from that word) and the list is a single tab stop moved with the arrow keys, so a long recording is not hundreds of them.

PropTypeDefaultDescription
segments*readonly TranscriptSegment[]—In order. The shape speech models return: Whisper, WhisperX, Deepgram, AssemblyAI.
time*number—The playback position, in seconds.
onSeek(seconds: number) => void—Clicking a line seeks to it, or to the clicked word when there are word timings. Without it the transcript is read-only.
followbooleantrueKeeps the current line in view as playback moves. Scrolling away pauses it, and a "Back to" button brings it back.
playingbooleanfalseWhether the audio is playing: the current line then shows live bars in place of its time.
classNamestring—