自适应波束形成(五)——Frost波束形成2

本文介绍如何使用Frost波束形成器对真实环境中的语音信号进行增强。在6*3.7*3.4m3的测试室内,通过DAR2000音频采集卡和PK-080VH拾音器收集8路语音信号,并以C++实现算法,但未涉及音频文件的读写操作。
摘要由CSDN通过智能技术生成

        上篇是对matlab模拟产生的阵列接收语音进行增强,这篇主要是利用Frost波束形成器对真实信号进行增强。

1  测试环境

        采集环境为6*3.7*3.4m3的测试室,用恒通DAR2000多路音频采集卡(如图1左),通过D型音频接线口与由烽火PK-080VH微型数字针孔拾音器(如图1右)组成的麦克风阵列相连,采集8路真实语音信号进行语音增强测试。

                

                                 图1 DAR2000多路音频采集卡和 PK-080VH微型数字针孔拾音器

2 C++源码

        这里仅仅是测试算法,所以没有加入读取音频及写音频部分的代码,通过将音频数据存放于txt中简单存取。

       

#define BOUNDS_CHECK

#include 
  
  
   
   
#include 
   
   
    
    
#include 
    
    
     
     
#include 
     
     
      
      
#include 
      
      
        #include 
       
         #include 
        
          #include 
         
           #include 
          
            #include 
           
             #include 
            
              #include "engine.h" using namespace std; using namespace splab; typedef double Type; const int M=8,N=38454,fs=8000,J=20; //麦克风数 const double theta=-PI*30.0/180.0,mu=0.00002; //指向角-30 const Type c=Type(340.0); const Type d=Type(0.064); const Type Ts=1.0/fs; //计算时延 Type delay(int m) { Type T=(M-1)*d/c; //cout< 
             
               < 
              
                =0.5) { return Dd+1; } else { return Dd-1; }*/ return D; } int delay1(int m) { Type T=M*d/c; //cout< 
               
                 < 
                
                  =0.5) { return Dd+1; } else { return Dd-1; } } //分数时延滤波器 Vector 
                 
                   h(int m) { Vector 
                  
                    H(10); for(int n=0; n<10; n++) { H[n]=1; for(int k=0; k<=10; k++) { Type nk=n-k; if(k!=n) H[n]*=((delay(m)-k)/nk); //cout< 
                   
                     < 
                    
                      Cons() { Matrix 
                     
                       C(M*J,J); for(int i=0; i 
                      
                        c(M*J); for(int j=0; j 
                       
                         fcon() { Vector 
                        
                          f(J); f[0]=1; return f; } //计算C(C^TC)^-1 Matrix 
                         
                           Cc() { Matrix 
                          
                            C=Cons(); Matrix 
                           
                             CTC(J,J); for(int i=0; i 
           
  • 2
    点赞
  • 22
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值