Wave Arts VQE  1.00
Voice Quality Enhancement
aes.h
Go to the documentation of this file.
00001 /*
00002  * This file is part of the Wave Arts VQE library.
00003  * Copyright (C) 2011 Wave Arts, Inc. (http://wavearts.com)
00004  *
00005  * VQE is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * VQE is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * A copy of the GNU General Public License is included with VQE,
00016  * and can be found online at <http://www.gnu.org/licenses/>.
00017  *
00018  * If you'd like to distribute a closed-source product which uses VQE,
00019  * you must obtain a commercial VQE license from Wave Arts.
00020  */
00021 //
00022 // Acoustic Echo Suppression, based on echosupp.m matlab script.
00023 //
00024 // Bill Gardner, Sep 2010
00025 //
00026 
00029 
00030 
00031 #ifndef _AES_H
00032 #define _AES_H
00033 
00034 #include <stdio.h>
00035 #include "dre.h"
00036 #include "AecLatCal.h"
00037 #include "EQ.h"
00038 
00040 typedef struct {
00041         float sampRate; 
00042         int blockLen;   
00043         float envTime;  
00044         float activeThreshDb;   
00045         float dtThreshDb;               
00046         float nearTalkHoldTime; 
00047         float maxLatencyTime;   
00048         float echoGainAvgTime;  
00049 } AesParam;
00050 
00061 typedef struct {
00062         AesParam param;                         
00063         float blockTime;                        
00064         int nearTalk;                           
00065         int nearTalkHoldBlocks;         
00066         int nearTalkHold;                       
00067         float refEnvGain;                       
00068         float refEnv;                           
00069         float echoGain;         
00070         float *xin;                     
00071         float *xDelay;          
00072         int xIndex;                     
00073         int maxLatency;         
00074         Dre *nearDre;           
00075         Dre *farDre;            
00076         Avg *nearAvg;           
00077         Avg *farAvg;            
00078         int latency;            
00079         int trainNearOnEcho;    
00080         int blockIndex;         
00081         // AC-coupling HPF EQ
00082         EqState hpfZ[2];                
00083         Eq2Coeff hpfCoeff;              
00084         int dumpMatlabData;     
00085         FILE *matFp;            
00086 } Aes;
00087 
00088 #ifdef  __cplusplus
00089 extern "C" {
00090 #endif
00091 
00095 Aes *AesNew(AesParam *param);
00096 
00098 void AesDelete(Aes *p);
00099 
00101 void AesReset(Aes *p);
00102 
00109 void AesProc(Aes *p, float *ref, float *rec);
00110 
00119 void AesSetLatency(Aes *p, int latency);
00120 
00127 void AesGetDefaultParam(AesParam *p);
00128 
00137 void AesSetMatlabDump(Aes *p, int dumpData, char *path);
00138 
00139 #ifdef  __cplusplus
00140 }
00141 #endif
00142 
00143 #endif
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines