WAV降采样方式横向评测

Nov. 17, 2019, 5:36 p.m.

read: 1193




# scipy.signal 进行降采样
def wav_file_resample(sig, source_sample=44100, dest_sample=16000):
    try:
        signal.resample
    except:
        from scipy import signal

    '''
    对WAV文件进行resample的操作 
    !!!注意:sig必须是np.int16格式
    :param file_path: 需要进行resample操作的wav文件的路径
    :param source_sample:
    :param dest_sample:
    :return:
    '''
    # sample_rate, sig = wavfile.read(file_path)
    # print(sample_rate)
    # print(sig)
    result = int((sig.shape[0]) / source_sample * dest_sample)
    x_resampled = signal.resample(sig, result)
    x_resampled = x_resampled.astype(np.int16)

    return x_resampled




SoX 变速不变调 音频加速减速

SoX - 音频处理的瑞士军刀Welcome to the home of SoX, the Swiss Army knife of sound processing programs.摘自SoX…

Kaldi线下交流会后有感

文章标题:Kaldi线下交流会后有感文章内容:前言这篇主要写写感悟吧。非常开心能够在非常繁忙的工作去参加第四届kaldi线下交流会。感觉这一届的商业化的气息更加浓厚了。大抵是这些交流会发展壮大之后都…

此站点由 ASP.NETIIS 驱动 | © 2018-2023 hupeng.me. All Rights Reserved.