This code imports necessary modules and functions from other files, reads a WAV file and normalizes its data, adds white Gaussian noise to the signal, and calculates the short-time Fourier transform of the signal. It then applies voice activity detection (VAD) using the log-spectral distance method and plots the original signal, the noised signal, and the log-spectral distance. Finally, it finds the segments of voice activity and plots them on the original, noised, and log-spectral distance plots. The resulting figure is saved and displayed.

from chapter2_基础soundBase import from chapter4_特征提取end_detection import from scipyio import wavfile from chapter4_特征提取end_detection import fs data = wavfilereadC4_1_ywav data = data 327680 # 将数据

原文地址: http://www.cveoy.top/t/topic/bJ3C 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录