tool¶
WhisperX transcription tool.
Classes
WhisperX transcription and translation tool. |
- class WhisperXTool(model_name='distil-large-v3', task='transcribe', device='cpu', overwrite=False, verbose=True)[source]¶
Bases:
TranscriptionTool
WhisperX transcription and translation tool.
- Parameters:
model_name (
str
) – The name of the model to use.device (
str
) – The device where the computation should be executed.overwrite (
bool
) – Whether to overwrite existing files, otherwise raise an error.verbose (
Union
[bool
,int
]) – Whether to execute the computation verbosely.task (str)
- inference(audio_path, transcription_path, batch_size=16, language=None)[source]¶
WhisperX’s backed transcription method.
- Parameters:
audio_path (
Union
[str
,Path
]) – Path to the audio track.transcription_path (
Union
[str
,Path
]) – Path to the transcription file.batch_size (
int
) – Batch size, reduce if low on GPU memory.language (
Optional
[str
]) – Country-code string of the spoken language.
- Returns: