[{"createTime":1735734952000,"id":1,"img":"hwy_ms_500_252.jpeg","link":"https://activity.huaweicloud.com/cps.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=V1g3MDY4NTY=&utm_medium=cps&utm_campaign=201905","name":"华为云秒杀","status":9,"txt":"华为云38元秒杀","type":1,"updateTime":1735747411000,"userId":3},{"createTime":1736173885000,"id":2,"img":"txy_480_300.png","link":"https://cloud.tencent.com/act/cps/redirect?redirect=1077&cps_key=edb15096bfff75effaaa8c8bb66138bd&from=console","name":"腾讯云秒杀","status":9,"txt":"腾讯云限量秒杀","type":1,"updateTime":1736173885000,"userId":3},{"createTime":1736177492000,"id":3,"img":"aly_251_140.png","link":"https://www.aliyun.com/minisite/goods?userCode=pwp8kmv3","memo":"","name":"阿里云","status":9,"txt":"阿里云2折起","type":1,"updateTime":1736177492000,"userId":3},{"createTime":1735660800000,"id":4,"img":"vultr_560_300.png","link":"https://www.vultr.com/?ref=9603742-8H","name":"Vultr","status":9,"txt":"Vultr送$100","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":5,"img":"jdy_663_320.jpg","link":"https://3.cn/2ay1-e5t","name":"京东云","status":9,"txt":"京东云特惠专区","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":6,"img":"new_ads.png","link":"https://www.iodraw.com/ads","name":"发布广告","status":9,"txt":"发布广告","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":7,"img":"yun_910_50.png","link":"https://activity.huaweicloud.com/discount_area_v5/index.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=aXhpYW95YW5nOA===&utm_medium=cps&utm_campaign=201905","name":"底部","status":9,"txt":"高性能云服务器2折起","type":2,"updateTime":1735660800000,"userId":3}]
设计目标:
对语音信号进行时频域分析和处理的基本方法【设计工具】MATLAB【设计要求】
1)分别录制一段男生和女生语音文件及相应有明显高频或低频干扰的语音文件*.wav,并将文件导入Matlab中;
2)分别分析各段语音的频谱,绘制其频谱图,分析语音信号和干扰信号的频段;
3)设计相应的滤波器,剔除含干扰的语音段的干扰信号,并分析滤波信号的频谱;
4)生成滤波后的语音文件,分析听觉效果。
以下是MATLAB实现代码和步骤:
* 导入语音文件
首先,需要将录制好的语音文件(男生和女生语音文件及含干扰的语音文件)导入MATLAB中。可以使用 audioread 函数读取 WAV
文件,并将其作为一个数字向量存储在MATLAB的工作空间中。
% 导入男生语音文件 [voice_male, Fs] = audioread('male_voice.wav'); % 导入女生语音文件
[voice_female, Fs] = audioread('female_voice.wav'); % 导入含干扰的语音文件
[voice_interference, Fs] = audioread('voice_with_interference.wav');
* 分析频谱
接下来,需要对每个语音文件进行频谱分析,以了解语音信号和干扰信号的频段。可以使用 spectrogram 函数生成语音信号的频谱图。
% 绘制男生语音的频谱图 figure; spectrogram(voice_male, 256, [], [], Fs,