说话人识别
本示例介绍了如何使用 Ludwig 进行简单的说话人识别任务。我们假设有以下数据,其中标签 0 对应于未经授权语音的音频文件,标签 1 对应于经授权语音的音频文件。样本数据如下所示
audio_path | label |
---|---|
audiodata/audio_000001.wav | 0 |
audiodata/audio_000002.wav | 0 |
audiodata/audio_000003.wav | 1 |
audiodata/audio_000004.wav | 1 |
ludwig experiment \
--dataset speaker_verification.csv \
--config config.yaml
使用 config.yaml
input_features:
-
name: audio_path
type: audio
preprocessing:
audio_file_length_limit_in_s: 7.0
audio_feature:
type: stft
window_length_in_s: 0.04
window_shift_in_s: 0.02
encoder:
type: cnnrnn
output_features:
-
name: label
type: binary