Обработка и анализ аудиофайлов python
интересует следующий вопрос: у меня есть задание по обработке аудиофайлов, их этих файлов нужно вытащить следующие параметры, которые указаны ниже(параметры даны на английском) для дальнейшего написания нейронной сети на Python. Я новичок в этой теме, из интернета узнал, что нужно использовать библиотеку Librosa или parselmouth, но чтение документации ничего не дало, я так и не смог найти как вычленить данный параметры. Буду раз любой помощи, может есть еще какие-нибудь библиотеки, с помощью которых можно получить данные характеристики из аудиофайлов или ресурсы, на которых описано как с помощью библиотек указанных выше получить данные параметры. Заранее спасибо за любую помощь.
Нужные параметры: Frequency related parameters:
Pitch, logarithmic F0 on a semitone frequency scale, starting at 27.5 Hz (semitone 0).
Jitter, deviations in individual consecutive F0 period lengths.
Formant 1, 2, and 3 frequency, centre frequency of first, second, and third formant
Formant 1, bandwidth of first formant.
Energy/Amplitude related parameters: 5) Shimmer, difference of the peak amplitudes of consecutive F0 periods.
Loudness, estimate of perceived signal intensity from an auditory spectrum.
Harmonics-to-noise ratio (HNR), relation of energy in harmonic c
Spectral (balance) parameters: 8) Alpha Ratio, ratio of the summed energy from 50-1000 Hz and 1-5 kHz
Hammarberg Index, ratio of the strongest energy peak in the 0-2 kHz region to the strongest peak in the 2–5 kHz region.
Spectral Slope 0-500 Hz and 500-1500 Hz, linear regression slope of the logarithmic power spectrum within the two given bands.
Formant 1, 2, and 3 relative energy, as well as the ratio of the energy of the spectral harmonic peak at the first, second, third formant’s centre frequency to the energy of the spectral peak at F0.
Harmonic difference H1-H2, ratio of energy of the first F0 harmonic (H1) to the energy of the second F0 harmonic (H2).
Harmonic difference H1-A3, ratio of energy of the first F0 harmonic (H1) to the energy of the highest harmonic in the third formant range (A3).
Ответы (1 шт):
Это похоже на набор фичей для аудио GeMAPS. Он достаточно распостранён и можно найти готовые решения, которые сгенерируют все 13 значений.
Например, можно поставить библиотеку opensmile и получить фичи для аудиофайла:
import opensmile
smile = opensmile.Smile(
feature_set=opensmile.FeatureSet.GeMAPS,
feature_level=opensmile.FeatureLevel.Functionals,
)
y = smile.process_file('audio.wav')