Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用avec2013.conf配置文件进行音频特征提取,为什么提取到的单个特征文件只包含一个样本?(音频平均时长为10分钟) #80

Open
IT-xun opened this issue Dec 9, 2024 · 0 comments

Comments

@IT-xun
Copy link

IT-xun commented Dec 9, 2024

dir_name = 'D:/Projects/vscode/depression_detection/WAV_1'#省略第二个扬声器后的音频文件
out_dir = 'D:/Projects/vscode/depression_detection/WAV_features'

for subdir, dirs, files in os.walk(dir_name):
for file in files:
if file.endswith('.wav'):
input_filepath = os.path.join(subdir, file).replace("\", "/")
partic_id = os.path.basename(subdir)
sample_dir = os.path.join(out_dir, partic_id).replace("\", "/")
if not os.path.exists(sample_dir):
os.makedirs(sample_dir)
os.chdir(sample_dir)
instname = os.path.splitext(file)[0]
outfilepath = sample_dir + '/' + instname + '.csv'

        #opensmile command
        opensmile_call = 'SMILExtract'+' '+'-C'+' '+'D:/opensmile-3.0-win-x64/config/avec11-14/avec2013.conf'+' '+'-I'+' '+input_filepath+' '+'-csvoutput'+' '+outfilepath
        #'SMILExtract -C config/avec11-14/avec2013.conf -I 300_AUDIO.WAV -csvoutput 300_AUDIOtest.csv'
        os.system('cd D:\\opensmile-3.0-win-x64\\bin && ' + opensmile_call)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant