# encoding: utf-8
'''
@file: 8convert16.py
@time: 2022/10/19
@author: zpj
'''
import os
import subprocess
# 添加文件输入输出路径
input_path = " "
output_path = " "
for file in os.listdir(input_path):
file1 = input_path + file
file2 = output_path + file
cmd = "ffmpeg -i " + file1 + " -ar 16000 " + file2 #ffmpeg -i 输入文件 -ar 采样率 输出文件
subprocess.call(cmd, shell=True)
Python转换音频采样率(8k到16k)
最新推荐文章于 2024-06-17 09:50:14 发布