Files
yuyinfenxi/README.md
2025-07-02 13:54:05 +08:00

37 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

安装依赖pip install -r requirements.txt
训练模型
python main.py --mode train --casia_path ./CAISA --savee_path ./SAVEE --ravdess_path ./RAVDESS --epochs 50
参数说明:
`--mode`:运行模式,选择`train`进行训练
`--casia_path`CASIA数据集路径
`--savee_path`SAVEE数据集路径
`--ravdess_path`RAVDESS数据集路径
`--epochs`训练轮数默认为100
预测情感
python predict.py --audio ./RAVDESS/Actor_01/03-01-01-01-01-01-01.wav --model ./output/emotion_model
参数说明:
`--audio`:要预测的音频文件路径
`--model`:训练好的模型目录,默认为./output/emotion_model
音频可视化
单个音频可视化:
python waveform_only.py --audio_path ./RAVDESS/Actor_01/03-01-01-01-01-01-01.wav --output_path ./output/waveform.png
参数说明:
`--audio_path`:音频文件路径
`--output_path`:输出波形图保存路径
批量音频可视化:
python batch_waveform.py --audio_dir ./RAVDESS/Actor_01 --output_dir ./output/waveforms --limit 5
参数说明:
`--audio_dir`:音频文件目录
`--output_dir`:输出波形图保存目录
`--limit`:处理文件数量限制,默认处理所有文件
`--file_ext`音频文件扩展名默认为wav