Skip to main content
The TranscriptionResult component displays the transcription output with synchronized audio playback, speaker identification, and multiple export formats.

Component Props

TranscriptResult
required
Transcription result containing transcript, audio URL, and alignment data
AudioType
required
MIME type of the audio file (e.g., “audio/mpeg”, “audio/wav”)
SpeakerNames
required
Record mapping speaker IDs to custom display names
(speakerId: string, value: string) => void
required
Callback fired when a speaker name is edited

TypeScript Interfaces

Usage Example

Features

1. Language Detection Display

Shows detected language and confidence level:

2. Speaker Name Customization

Allows users to rename speakers for better readability:

3. Export Options

Multiple copy formats via dropdown:
Export handlers:

4. Interactive Transcript Viewer

Synchronized playback with word highlighting:

5. Word Rendering with Speaker Labels

Custom word renderer that shows speaker changes:

Word Status Types

  • spoken: Words that have already been spoken (muted text)
  • current: Currently playing word (highlighted in primary color)
  • unspoken: Words not yet reached (normal foreground color)

Utility Functions

The component uses several utility functions from transcript-utils.ts:

getUniqueSpeakers

Extracts all unique speaker IDs from transcript words:

buildTranscriptMarkdown

Generates formatted markdown with optional timestamps and speakers:

Play/Pause Button Rendering

Dependencies

Source Location

/home/daytona/workspace/source/src/features/speech-to-text-playground/transcription-result.tsx