Displays a scrollable list of transcription entries automatically grouped by speaker within configurable time windows. This is the base component that accepts entries directly as props for maximum flexibility.
Use TranscriptViewer (this component) when:
Use ConnectedTranscriptViewer when:
The component receives an array of TranscriptionEntry objects and processes them:
groupingWindowMs are combinedBasic usage with manual state management:
function TranscriptionPanel() {
const [entries, setEntries] = useState<TranscriptionEntry[]>([]);
useEffect(() => {
client.addEventListener('transcription', (event) => {
setEntries(prev => [...prev, {
id: event.detail.id,
text: event.detail.text,
speaker: event.detail.userId,
speakerName: event.detail.userName,
timestamp: new Date(),
}]);
});
}, [client]);
return (
<TranscriptViewer
entries={entries}
localUserId={userId}
showTimestamps
autoScroll
/>
);
}
With confidence and sentiment indicators:
<TranscriptViewer
entries={entries}
localUserId={userId}
showTimestamps
showConfidence // Shows colored dot based on transcription accuracy
showSentiment // Shows sentiment from mood analysis
autoScroll
groupingWindowMs={3000} // Group messages within 3 seconds
onEntryClick={(entry) => highlightInVideo(entry.timestamp)}
/>
Full customization with internationalization:
<TranscriptViewer
entries={entries}
localUserId={userId}
showTimestamps
emptyMessage="Comienza a hablar para ver transcripciones"
labels={{
you: 'Tú',
today: 'Hoy',
noTranscriptions: 'Sin transcripciones todavía',
loading: 'Inicializando...',
}}
colors={{
localUser: '#6366f1',
confidenceHigh: '#22c55e',
confidenceMedium: '#f59e0b',
confidenceLow: '#ef4444',
}}
styles={{
fontSize: '1rem',
borderRadius: 12,
maxHeight: 500,
}}
sx={{ bgcolor: 'background.paper', borderRadius: 2 }}
/>
ConnectedTranscriptViewer from @hiyve/transcription/connected - Auto-connected version for HiyveProvider users
TranscriptViewer component - displays live transcription entries grouped by speaker.