Skip to content

Faster Whisper transcription with CTranslate2

Comment edit: Clarify chunk_length usage (#1536)

Purfview7b99be5376b4
diff --git a/faster_whisper/transcribe.py b/faster_whisper/transcribe.py
index 51eb1c5..6a6ce5a 100644
--- a/faster_whisper/transcribe.py
+++ b/faster_whisper/transcribe.py
@@ -338,6 +338,9 @@ class BatchedInferencePipeline:
the maximum will be set by the default max_length.
chunk_length: The length of audio segments. If it is not None, it will overwrite the
default chunk_length of the FeatureExtractor.
+ Note: It's primarily intended for models that specify a particular chunk length
+ for inference, such as Distil models.
+ Leave this unset unless a model author recommends a specific value.
clip_timestamps: Optionally provide list of dictionaries each containing "start" and
"end" keys that specify the start and end of the voiced region within
`chunk_length` boundary. vad_filter will be ignored if clip_timestamps is used.
@@ -845,6 +848,9 @@ class WhisperModel:
the maximum will be set by the default max_length.
chunk_length: The length of audio segments. If it is not None, it will overwrite the
default chunk_length of the FeatureExtractor.
+ Note: It's primarily intended for models that specify a particular chunk length
+ for inference, such as Distil models.
+ Leave this unset unless a model author recommends a specific value.
clip_timestamps:
Comma-separated list start,end,start,end,... timestamps (in seconds) of clips to
process. The last end timestamp defaults to the end of the file.