# Transcription

A timed transcript that follows playback and can seek.

- **Use it for**: A timed transcript that follows playback.
- **Not for**: Chat messages. Try [Message](https://unseenui.com/components/message/).

## Installation

```bash
npm install @stackunseen/ui
```

## Usage

```tsx
import { Transcription } from '@stackunseen/ui/media';
import '@stackunseen/ui/styles.css';

<Transcription segments={segments} currentTime={time} onSeek={seek} />
```

## All props

| Prop | Type | Description |
| --- | --- | --- |
| `className` | `string` |  |
| `currentTime` | `number` | Current playback time in seconds; highlights the active segment. |
| `emptyLabel` | `string` | Shown while there are no segments. |
| `follow` | `boolean` | Keeps the segment being played in view as playback moves on. |
| `inProgressLabel` | `string` | Shown after the last segment while `status` is `in-progress`. |
| `label` | `string` |  |
| `onSeek` | `((seconds: number) => void)` | Seeks the host's player to a segment. |
| `segments` (required) | `readonly TranscriptSegment[]` |  |
| `status` | `"unavailable" \| "complete" \| "in-progress"` | `in-progress` while the host is still transcribing: more segments may arrive. |
| `unavailableLabel` | `string` | Shown when `status` is `unavailable`. |

## Keyboard

Tab reaches controls; Enter or Space activates buttons. Accordions use arrow keys, Home and End. Select menus support arrows and typeahead; Escape closes menus and dialogs and restores focus.

## Works with

[AudioPlayer](https://unseenui.com/components/audio-player/), [VoiceSelector](https://unseenui.com/components/voice-selector/), [Persona](https://unseenui.com/components/persona/), [VoiceControl](https://unseenui.com/components/voice-control/)

Page: https://unseenui.com/components/transcription/
