Voice Audio Data and Pitch Extraction

12 ビュー (過去 30 日間)
jcclar12
jcclar12 2022 年 10 月 13 日
コメント済み: jcclar12 2022 年 11 月 3 日
I want to extract numerical data from raw voice audio files(.wav)- take out the numeric pitch (Hz) and do specturm analysis in a voice audio file. However, I want to have the pitch throughout the audio file with time stamps to a later to be converted to a .csv or .txt, and for other analysis like spectrum and stats.
How do I do that? I am looking for succesful code. I am new to Matlab, but I have the audio packages already installed. So far I seen parts of what I want to do on the internet, but they never work. As for now the data is not noisy, but I might need to clean some with extra sound in the background.
Thanks for your help in advance.

採用された回答

jibrahim
jibrahim 2022 年 10 月 20 日
You can use the pitch function to get pitch values along with the time stamps
[x,fs] = audioread("SingingAMajor-16-mono-18secs.ogg");
winLength = round(0.05*fs);
overlapLength = round(0.045*fs);
[f0,idx] = pitch(x,fs,Method="SRH",WindowLength=winLength,OverlapLength=overlapLength);
tf0 = idx/fs;
  3 件のコメント
Walter Roberson
Walter Roberson 2022 年 11 月 2 日
The internal code uses
hopLength = params.WindowLength - params.OverlapLength;
numHops = floor((size(x,1)-params.WindowLength)/hopLength);
varargout{2} = cast(((0:numHops)*hopLength + params.WindowLength)','like',x);
So it is more or less creating windows, and you are getting an index for each window.
jcclar12
jcclar12 2022 年 11 月 3 日
Thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulation, Tuning, and Visualization についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by