From c27c010f968ad1c6be8ef0e338865c74515975b0 Mon Sep 17 00:00:00 2001 From: Guillaume Klein Date: Tue, 21 Mar 2023 17:13:37 +0100 Subject: [PATCH] Ignore Unicode errors in input file metadata --- faster_whisper/audio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/faster_whisper/audio.py b/faster_whisper/audio.py index 8d176d7..4cc1564 100644 --- a/faster_whisper/audio.py +++ b/faster_whisper/audio.py @@ -34,7 +34,7 @@ def decode_audio(input_file: Union[str, BinaryIO], sampling_rate: int = 16000): raw_buffer = io.BytesIO() dtype = None - with av.open(input_file) as container: + with av.open(input_file, metadata_errors="ignore") as container: frames = container.decode(audio=0) frames = _group_frames(frames, 500000) frames = _resample_frames(frames, resampler)