目录
💥1 概述
📚2 运行结果
🎉3 参考文献
👨💻4 Matlab代码
💥1 概述
神经网络的输入是混合(男性+女性)音频的振幅谱。神经网络的输出目标是男性说话者理想的软掩模。损失函数是使输出和输入目标之间的均方误差最小化。在输出端,利用混合信号的输出幅度谱和相位将音频STFT转换回时域,并采用自监督学习方法。训练集是混合音频的前40秒中理想软掩模和二进制掩模的分离结果,网络输出是验证集为混合音频后的后20秒中男性说话者预测的理想软掩膜。
📚2 运行结果
主函数部分代码:
firstTrainingAudioFile = "f.mp3";
secondTrainingAudioFile = "m.mp3";
C=1;%用于强化背景音乐
firstsongTrain = C*audioread(firstTrainingAudioFile);
secondsongTrain = audioread(secondTrainingAudioFile);
L=500000;%采样值
firstsongTrain = firstsongTrain(L:2*L);
secondsongTrain = secondsongTrain(L:2*L);%训练集
firstValidationAudioFile ="f.mp3";
secondValidationAudioFile = "m.mp3";
firstsongValidate = C*audioread(firstValidationAudioFile);
secondsongValidate = audioread(secondValidationAudioFile);
L1=1000000;
firstsongValidate = firstsongValidate(3*L1:4*L1);
secondsongValidate = secondsongValidate(2.5*L1:3.5*L1);%验证级
% 将训练信号缩放到相同的功率。将验证信号缩放到相同的功率。
firstsongTrain =firstsongTrain/norm(firstsongTrain);%训练集,
secondsongTrain = secondsongTrain/norm(secondsongTrain);
firstsongValidate = firstsongValidate/norm(firstsongValidate);%验证集
secondsongValidate = secondsongValidate/norm(secondsongValidate);
mixTrain = firstsongTrain + secondsongTrain;
mixTrain = mixTrain / max(mixTrain);
mixValidate = firstsongValidate + secondsongValidate;
mixValidate = mixValidate / max(mixValidate);
WindowLength = 128;
FFTLength = 128;
OverlapLength = 128-1;
Fs = 44000;
win = hann(WindowLength,"periodic");
audiowrite('est_mix.wav',mixValidate,Fs);
P_mix0 = stft(mixTrain,'Window',win,'OverlapLength',OverlapLength,'FFTLength',FFTLength);
P_f = abs(stft(firstsongTrain,'Window',win,'OverlapLength',OverlapLength,'FFTLength',FFTLength));
P_s = abs(stft(secondsongTrain,'Window',win,'OverlapLength',OverlapLength,'FFTLength',FFTLength));
N = 1 + FFTLength/2;文章来源:https://www.toymoban.com/news/detail-402855.html
🎉3 参考文献
[1]鲁玉军,周世豪,胡小勇.基于BP神经网络和小波神经网络的太阳辐射强度预测[J].软件工程,2023,26(01):5-8+4.DOI:10.19644/j.cnki.issn2096-1472.2023.001.002.文章来源地址https://www.toymoban.com/news/detail-402855.html
👨💻4 Matlab代码
到了这里,关于基于神经网络的自监督学习方法音频分离器(Matlab代码实现)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!