From 5d4b516bb5aeeec7a548a5bd33b15c57e4a3ca57 Mon Sep 17 00:00:00 2001 From: foyou Date: Sat, 21 May 2022 23:04:43 +0800 Subject: [PATCH] update utils.py --- utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.py b/utils.py index ea5ae23..4b77526 100644 --- a/utils.py +++ b/utils.py @@ -27,7 +27,7 @@ def to_pcm(in_path: str) -> tuple[str, int]: with av.open(in_path) as in_container: in_stream = in_container.streams.audio[0] sample_rate = in_stream.codec_context.sample_rate - if sample_rate not in [8000, 16000, 24000, 32000, 44100, 48000]: + if sample_rate not in [8000, 12000, 16000, 24000, 32000, 44100, 48000]: sample_rate = 24000 with av.open(out_path, 'w', 's16le') as out_container: out_stream = out_container.add_stream(