当前位置:网站首页>Librosa audio processing tutorial

Librosa audio processing tutorial

2022-07-06 06:56:00 andrew P

Speech feature extraction : Understand Mel spectrogram (Mel-spectrogram)、 Mel inverse frequency coefficient (MFCCs) Principle _BeichenLiu.Polaris The blog of -CSDN Blog _ Mel spectrum

1.librosa.core.load(path,sr) Resample the audio

librosa.core.load — librosa 0.7.2 documentation

librosa .core. load route , sr=22050, Mono = really , Offset =0.0, The duration of the = nothing , dtype =<class 'numpy.float32'>, res_type='kaiser_best' [ resources ]

Load audio file When floating point ​​ Between sequences .

The audio will be automatically resampled to a given rate ( Default sr=22050).

To preserve the native sampling rate of the file , Please use sr=None.

2.librosa.stft(), The short-time Fourier transform

librosa.core.stft — librosa 0.7.2 documentation

The short-time Fourier transform ( STFT ).[1]( The first 2 Chapter )

STFT By calculating the discrete Fourier transform on a short overlapping window (DFT) To represent the signal in the time-frequency domain .

This function returns a complex valued matrix D bring

  • np.abs(D[f, t]) yes frame t Local frequency bin f Range of , also

  • np.angle(D[f, t]) It's the frequency bin f  In frame t The aspect of .

Integers t and f You can use utility functions frames_to_sample And convert to physical units fft_frequencies.

原网站

版权声明
本文为[andrew P]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207060643347752.html