Overview
TheCallbacks interface allows you to monitor and respond to various stages of the transcription process. It extends preprocessing and splitting callbacks from ffmpeg-simplified, providing a complete view of the entire audio processing pipeline.
Type definition
Properties
Transcription callbacks
Called just before the transcription process begins.Parameters:
totalChunks: Total number of chunks to be transcribed
Called when each individual chunk is transcribed.Parameters:
chunkIndex: Index of the current chunk being processed (0-based)
Called when all transcription is complete.Parameters:
transcripts: Array of all transcribed segments
This callback is only called when ALL chunks transcribe successfully. If any chunk fails, this callback will not be invoked.
Inherited callbacks
Usage examples
Error handling
When errors occur during transcription, theonTranscriptionFinished callback will not be called. Handle errors using try-catch:
Related
TranscribeOptions
Configuration options including callbacks
Segment
Type passed to onTranscriptionFinished
Progress callbacks guide
Complete guide to using callbacks
Error handling
Learn about error handling strategies