Constructor
new TranscriptPanel(workspace, callbacks)
Parameters:
| Name | Type | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
workspace | object | the Workspace controller instance | |||||||||||||||||||||
callbacks | object | callback functions for transcript interactionsProperties
|
Classes
Methods
clearSearch()
Clears the search bar, removes all highlights, and notifies the workspace.
clearTranscriptPanel()
Clears the transcript body and resets the save button and empty state.
loadFromProject(project)
Loads transcript data from the given project and renders it. Also begins polling for audio readiness to enable the Transcribe button.
Parameters:
| Name | Type | Description |
|---|---|---|
project | Project | the project to load transcript data from |
makeSegmentEditable(segIdx)
Turns a transcript segment span into a contentEditable field. Commits the edit on Enter or blur; cancels (restores original text) on Escape. The span text is normalised (trailing space stripped) while editing, then restored with a trailing space on commit. Keyboard events are stopped from propagating so playback shortcuts don't fire.
Parameters:
| Name | Type | Description |
|---|---|---|
segIdx | number | index into loadedSegments |
openAddLinkDialog(segIdx)
Opens the hyperlink dialog for the current native text selection if one exists, otherwise adds a link covering the entire segment text.
Parameters:
| Name | Type | Description |
|---|---|---|
segIdx | number | index of the segment that was right-clicked |
populateSpeakerFilter()
Populates the speaker filter dropdown from the active project's speakers. Preserves the current selection when possible.
renderTranscript()
Fully re-renders the transcript from the active transcript's speaker blocks.
(async) retranscribeSegments(segIndices)
Retranscribes the given segment indices one at a time, showing progress in the transcription status bar. Preserves the user's edited text while updating word timestamps. Pushes one undo/redo entry per segment.
Parameters:
| Name | Type | Description |
|---|---|---|
segIndices | Array.<number> | indices into the active project's transcript segments |
setActiveSegment(segmentIdx)
Marks the segment at segmentIdx as active (scrolls it into view) and removes the active class from the previous one. Called as the playhead moves through audio.
Parameters:
| Name | Type | Description |
|---|---|---|
segmentIdx | number | segment index, or -1 to clear |
setActiveWord(time)
Highlights the word span (if any) that contains the given playback time within the currently active segment. Clears any previously highlighted word.
Parameters:
| Name | Type | Description |
|---|---|---|
time | number | current playback time in seconds |
setHoveredSegment(segmentIdx)
Applies the hover CSS class to the segment at segmentIdx and removes it from the previous one.
Parameters:
| Name | Type | Description |
|---|---|---|
segmentIdx | number | segment index, or -1 to clear |
setSelectedSegment(segmentIdx)
Applies the selected CSS class to segmentIdx and removes it from the previous selection.
Parameters:
| Name | Type | Description |
|---|---|---|
segmentIdx | number | segment index, or -1 to clear |
startPollingAudioReady()
Public entry point called once the waveform has fully loaded for a server project.