资源简介
语音识别源代码 基于凌阳61开发 预处理 特征参数提取 匹配识别
代码片段和文件信息
#include
#include
#include
#include
int number=18;
int numbers=520000;
int kk=0;
long counter=0;
long N_sample;
short *lpdata;
#define mfcc_dims 13
#define pi 3.1415926
#define SEQU_length 1280
void waveread(char *filename);
double mfcc(double dataR[]double dataI[]double mel[13]int N);
struct MFCC_STRUCT
{
int frames;
double **data;
};
void waveread(char *filename)
{
long count;
char cbuf[5];
FILE *fp;
if((fp=fopen(filename“rb+“))==NULL)
{
exit(0);
}
counter=0;
fread(cbufsizeof(char)4fp);
cbuf[4]=‘\0‘;
if(strcmp(cbuf“RIFF“)!=0)
exit(1);
fseek(fpsizeof(char)*4SEEK_CUR);
fread(cbufsizeof(char)4fp);
cbuf[4]=‘\0‘;
if(strcmp(cbuf“WAVE“)!=0)
exit(1);
fread(cbuf41fp);
cbuf[4]=‘\0‘;
if(strcmp(cbuf“fmt “)!=0)
exit(1);
fread(&count41fp);
fseek(fpcount+4SEEK_CUR);
fread(&count41fp);
N_sample=count/2;
if(N_sample>numbers)
{
counter=numbers;
}
else
{
counter=N_sample;
}
lpdata=(short *)malloc(counter*sizeof(short));
fread(lpdata2counterfp);
fclose(fp);
}
void swap (double a double b)
{
double t;
t = a;
a = b;
b = t;
}
void bitrp (double xreal [] double ximag [] int n)
{
int i j a b p;
for (i = 1 p = 0; i < n; i *= 2)
{
p ++;
}
for (i = 0; i < n; i ++)
{
a = i;
b = 0;
for (j = 0; j < p; j ++)
{
b = (b << 1) + (a & 1);
a >>= 1;
}
if ( b > i)
{
swap (xreal [i] xreal [b]);
swap (ximag [i] ximag [b]);
}
}
}
double mfcc(double dataR[]double dataI[]double mel[13]int N)
{
int imkjtindex1index2;
int n=256;
double wreal[512]wimag[512]trealtimagurealuimagarg;
int Fi_upFi_down;
double delt_f = 8000.0 / N;
double MFCC_Y[20] MFCC_k = 0;
int delt_F_up delt_F_down;
int F[22] = {0100200300400500600700800900100011491320151617412000229726393031348240004000};
double cos_par[20] = {0.0654498469 0.1963495408 0.3272492347 0.4581489286 0.5890486225
0.7199483164 0.8508480103 0.9817477042 1.1126473981 1.2435470920
1.3744467859 1.5053464798 1.6362461737 1.7671458676 1.8980455615
2.0289452554 2.1598449493 2.2907446432 2.4216443371 2.5525440310};
mel[0]=0;
for (i=0;i {
mel[0]+=dataR[i]*dataR[i];
}
mel[0]=log(mel[0]);
for(i=0;i dataR[i]=dataR[i]*(0.54-0.46*cos(2*pi*i/(N-1)));
bitrp (dataR dataI n);
arg = - 2 * 3.14159 / n;
treal = cos (arg);
timag = sin (arg);
wreal [0] = 1.0;
wimag [0] = 0.0;
for (j = 1; j < n / 2; j ++)
{
wreal[j]=(double)cos((j-1)*arg);
wimag[j]=(double)sin((j-1)*arg);
}
for (m = 2; m <= n; m *= 2)
{
for (k
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
I.A.... 31418 2006-10-22 09:57 dtw_train\0_10.wav
I.A.... 25318 2006-10-22 09:56 dtw_train\0_11.wav
I.A.... 26134 2006-10-22 09:56 dtw_train\0_12.wav
I.A.... 17988 2006-10-22 10:02 dtw_train\0_20.wav
I.A.... 16480 2006-10-22 10:02 dtw_train\0_21.wav
I.A.... 15722 2006-10-22 10:02 dtw_train\0_22.wav
I.A.... 18738 2006-10-22 10:07 dtw_train\0_30.wav
I.A.... 18188 2006-10-22 10:06 dtw_train\0_31.wav
I.A.... 25418 2006-10-22 10:06 dtw_train\0_32.wav
I.A.... 18014 2006-10-22 16:22 dtw_train\0_40.wav
I.A.... 16712 2006-10-22 16:22 dtw_train\0_41.wav
I.A.... 17982 2006-10-22 16:23 dtw_train\0_42.wav
I.A.... 17556 2006-10-22 20:57 dtw_train\0_50.wav
I.A.... 16376 2006-10-22 20:57 dtw_train\0_51.wav
I.A.... 17312 2006-10-22 20:58 dtw_train\0_52.wav
I.A.... 17322 2006-10-22 22:00 dtw_train\0_60.wav
I.A.... 17198 2006-10-22 22:01 dtw_train\0_61.wav
I.A.... 16012 2006-10-22 22:01 dtw_train\0_62.wav
I.A.... 29424 2006-10-22 10:12 dtw_train\1_10.wav
I.A.... 27978 2006-10-22 10:11 dtw_train\1_11.wav
I.A.... 29228 2006-10-22 10:11 dtw_train\1_12.wav
I.A.... 13292 2006-10-22 10:14 dtw_train\1_20.wav
I.A.... 12474 2006-10-22 10:14 dtw_train\1_21.wav
I.A.... 11960 2006-10-22 10:14 dtw_train\1_22.wav
I.A.... 20822 2006-10-22 10:17 dtw_train\1_30.wav
I.A.... 16834 2006-10-22 10:17 dtw_train\1_31.wav
I.A.... 17894 2006-10-22 10:17 dtw_train\1_32.wav
I.A.... 10930 2006-10-22 16:17 dtw_train\1_40.wav
I.A.... 14132 2006-10-22 16:18 dtw_train\1_41.wav
I.A.... 13286 2006-10-22 16:18 dtw_train\1_42.wav
............此处省略182个文件信息
相关资源
- AM3358核心开发板原理图和PCB
- 用PID设计电源buck电路的电压模式反馈
- RTL8211 网卡接口板原理图加PCB文件
- VECTOR的CCP源码(CAN标定协议代码)
- OPENCL1.2 标准
- Signal Detection And Estimation - Solution Man
- CCD图像传感器技术与应用
- 一种非常好的快速DCT算法
- 签名工具cydia Impactor
- DevExpress16.3全套图标
- capicom包和demo代码全
- lucene4.0+ik
- CSAPP_buflab 解答详细过程(内含源程序
- 基于VHDL的简易CPU设计详细实验报告
- COMSOL_PDE_学习资料
- GlobalMapper_LiDAR_Classification_Workflows
- cache ODBC 2015[Win64]
- NI Labview CLAD官方模拟题
- 数据结构算法演示系统DSDEMO类C描述语
- Stochastic Process(Stanford 2008).pdf
- 基于opencv的车道线检测代码
- Digital+Image+processing+Gonzalez+-+Solution+M
- Nokia安全平台&CheckPoint;防火墙操作手册
- SD3.0文档+SPI+SDIO模式___MMC卡时序
- infocom论文模板 latex
- 单片机STC12C5A60S2中文使用手册
- CCS6.0及XDS100v3仿真器
- Saliency Filters的实现
- OpenStack Essentials (2nd Edition)
- 华硕的点位图软件 TSICT
评论
共有 条评论