nasality.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:AutismVoicePrint 作者: opraveen 项目源码 文件源码
def preprocess_sample(aud_sample,rate):
    # Step 0: Pre-process the speech sample
    # a. Down-sample to 8 MHz (should be enough for Autism detection - only human speech)
    # b. Normalization [Apply gain s.t the sample data is in the range [-1.0, 1.0]
    # c. Noise Cancellation

    proc_sample = signal.resample(aud_sample, len(aud_sample)*SAMPLING_RATE/rate)

    if np.max(proc_sample) > 1.0:
        proc_sample = proc_sample*1.0/pow(2, 15)

    proc_sample = noise_removal(proc_sample)
    return proc_sample
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号