Add word-level timestamps and confidence scores
- New word_timestamps option (default False) in client handshake - When enabled, each segment includes 'words' array with per-word start/end times and probability scores - Wired through entire pipeline: client → server → backend → transcribe() - Words include timestamp_offset for accurate absolute times - REST API already supported word timestamps; now WebSocket does too - Added 9 unit tests for word timestamp extraction and formatting
This commit is contained in:
@@ -293,6 +293,7 @@ class TranscriptionServer:
|
||||
translation_queue=translation_queue,
|
||||
hotwords=options.get("hotwords"),
|
||||
diarization=self._create_diarizer(options),
|
||||
word_timestamps=options.get("word_timestamps", False),
|
||||
)
|
||||
|
||||
logging.info("Running faster_whisper backend.")
|
||||
|
||||
Reference in New Issue
Block a user