fe_wave_feature.h

来自「这是一个语音特征提取的程序源码」· C头文件 代码 · 共 92 行

H
92
字号
///////////////////////////////////////////////////////////////////////////////
// This is a part of the Feature program.
// Version: 1.0
// Date: February 22, 2003
// Programmer: Oh-Wook Kwon
// Copyright(c) 2003 Oh-Wook Kwon. All rights reserved. owkwon@ucsd.edu
///////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////
// for interface to other modules
///////////////////////////////////////////////////////////////////////////////

#ifndef _FE_WAVE_FEATURE_H_
#define _FE_WAVE_FEATURE_H_

#include <climits>
#include <cfloat>
#include <cmath>

#ifdef max
#undef max
#endif
#ifdef min
#undef min
#endif

#include <list>
#include <vector>
#include <valarray>
#include <string>
#include <iostream>
#include <sstream>
#pragma warning(disable:4786)
using namespace std;


#include "FE_vector.h"
#include "FE_matrix.h"


class CSegment
{
public:
	CSegment() {}
	virtual ~CSegment() {}
	friend bool operator==(const CSegment& a, const CSegment& b);
	CSegment& operator=(const CSegment& a){
		m_fSegment = a.m_fSegment;
		m_nColor = a.m_nColor;
		m_nLevel = a.m_nLevel;
		m_szLabel = a.m_szLabel;
		return *this;
	}
	double m_fSegment;
	int m_nColor;
	int m_nLevel;
	string m_szLabel;
#ifdef WIN32
	CSize m_sizeText;
	CPoint m_ptText;
#endif
};


class CFeature
{
public:
	CFeature() { frameN = 0; dimN = 0; shiftN = 0; sampleFreqN = 0; }
	virtual ~CFeature() {}
	int byteN;
	int frameN;
	int dimN;
	int shiftN;
	int sampleFreqN;
	FeMatrix<float> mat;
	vector<short> vec;
	vector<CSegment> label;
};


inline bool operator==(const CSegment& a, const CSegment& b)
{
	if(a.m_fSegment == b.m_fSegment && a.m_szLabel == b.m_szLabel)
		return true;
	else
		return false;
}


#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?