Skip to content

Commit

Permalink
update utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
lemisky committed May 21, 2022
1 parent ecf95d0 commit 5d4b516
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 5d4b516

Please sign in to comment.