资源简介

这是一段关于语音处理与识别的程序,里面有MATLAB程序以及详细注释。

资源截图

代码片段和文件信息

#include “stdafx.h“
#include “SR3.h“
#include “CepDlg.h“
#include “SR3Doc.h“
#include “SR3View.h“
#include “math.h“
#include “LpcDlg1.h“
#include “time.h“
#include “ChildFrm.h“
#include “mmsystem.h“
#include “dsound.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#define pi 3.1415926
#define DIV_THRES 0.0000001
IMPLEMENT_DYNCREATE(CSR3View CView)

BEGIN_MESSAGE_MAP(CSR3View CView)
//{{AFX_MSG_MAP(CSR3View)
ON_WM_LBUTTONDOWN()
ON_COMMAND(ID_LPC OnLpc)
ON_COMMAND(ID_CEP OnCep)
ON_COMMAND(ID_SPEAKER_REC OnSpeakerRec)
ON_COMMAND(ID_MFCC OnMfcc)
ON_COMMAND(ID_PLAY OnPlay)
ON_COMMAND(ID_WAVE_DEAL OnWaveDeal)
ON_COMMAND(ID_ENDPOINTDETECTION OnEndpointdetection)
ON_COMMAND(ID_ENTROPY OnEntropy)
ON_COMMAND(ID_TIMEFREQUENCE OnTimefrequence)
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW CView::OnFilePrintPreview)
END_MESSAGE_MAP()
#ifdef _DEBUG
void CSR3View::AssertValid() const
{
CView::AssertValid();
}

void CSR3View::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}

CSR3Doc* CSR3View::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSR3Doc)));
return (CSR3Doc*)m_pDocument;
}
#endif //_DEBUG
CSR3View::CSR3View()
{ alreadyReads=false;
tagLButtonDown = FALSE;
tagOut = TRUE;
tagClip = FALSE;
num_frame = 0;
winOverlap = 0.5;//帧移50%
//frameOffset = (int)(winSize*winOverlap);//帧移128点
frameOffset=128;
N1=0;N2=0;
/*
for(int i=0;i<6;i++)
Len[i]=0;*/




}
CSR3View::~CSR3View()
{

}

BOOL CSR3View::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
//  the CREATESTRUCT cs

return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CSR3View drawing

void CSR3View::OnDraw(CDC* pDC)
{
CSR3Doc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
LPSTR  pDIB;
    pDIB = (LPSTR) ::GlobalLock((HGLOBAL) pDoc->hDIB);//在此处同当前的现存句柄联系起来

CRect rcClient;
GetClientRect(&rcClient);
CPoint cuPoint=currentPoint;
    char *signal;    
    signal=pDIB;

    PlotSignal(pDC&rcClientsignalpDoc->wavRIFF.riffSIZEpDoc->wavFORM.wBitsPerSample/8);
Plotframe(pDC&rcClientpDoc->wavDATA.dataSIZEpDoc->wavFORM.nSamplesPerSecpDoc->wavFORM.wBitsPerSample/8);

CPen* oldPen;//收藏旧笔 
    CPen My1Pen;
    My1Pen.CreatePen(PS_SOLID1RGB(25500));
    oldPen=pDC->Selectobject(&My1Pen);//选中新笔
    if (!tagOut)
{
ScreenToClient(&cuPoint);//先对应于当前窗口转换位置再换成此窗口的对应位置
        cuPoint.x=(long)((double)currentPoint.x*((double)(rcClient.right-rcClient.left)/(double)currentRect.right));
        pDC->MoveTo(cuPoint.xrcClient.top+35);
pDC->LineTo(cuPoint.xrcClient.bottom-35)

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2010-11-05 10:16  endpoint\
     文件       61490  2010-10-18 19:09  endpoint\addpoint.cpp
     目录           0  2010-11-05 10:16  endpoint\SR3\
     文件        1331  2004-07-02 15:15  endpoint\SR3\CepDlg.cpp
     文件        1257  2004-07-02 15:15  endpoint\SR3\CepDlg.h
     文件        1735  2004-07-19 15:44  endpoint\SR3\ChildFrm.cpp
     文件        1458  2004-07-19 15:45  endpoint\SR3\ChildFrm.h
     文件        1824  2004-06-15 08:37  endpoint\SR3\CordinatePlette.cpp
     文件        1326  2004-06-15 08:34  endpoint\SR3\CordinatePlette.h
     目录           0  2010-11-05 10:16  endpoint\SR3\Debug\
     文件        1294  2004-06-16 15:29  endpoint\SR3\LpcDlg
     文件        1441  2004-06-16 10:01  endpoint\SR3\LpcDlg.cpp
     文件        1539  2004-07-02 15:23  endpoint\SR3\LpcDlg1.cpp
     文件        1245  2004-07-02 15:22  endpoint\SR3\LpcDlg1.h
     文件       15949  2004-07-16 18:02  endpoint\SR3\MainFrm.cpp
     文件        1748  2004-07-09 17:04  endpoint\SR3\MainFrm.h
     文件        5708  2004-07-19 15:19  endpoint\SR3\PopWnd.cpp
     文件        1739  2004-07-19 15:17  endpoint\SR3\PopWnd.h
     文件        4685  2004-06-15 08:15  endpoint\SR3\ReadMe.txt
     目录           0  2010-11-05 10:16  endpoint\SR3\res\
     文件        1746  2004-07-19 17:15  endpoint\SR3\Resource.h
     文件      500118  2004-05-31 20:50  endpoint\SR3\res\bitmap1.bmp
     文件       67110  2004-06-07 18:10  endpoint\SR3\res\bmp00001.bmp
     文件         766  2004-06-03 21:28  endpoint\SR3\res\ico00001.ico
     文件         766  2004-06-02 22:38  endpoint\SR3\res\icon1.ico
     文件        1078  2004-05-27 16:22  endpoint\SR3\res\SR3.ico
     文件         394  2004-05-27 16:22  endpoint\SR3\res\SR3.rc2
     文件        1078  2004-05-27 16:22  endpoint\SR3\res\SR3Doc.ico
     文件         958  2004-06-03 21:12  endpoint\SR3\res\Toolbar.bmp
     文件      533152  2006-03-07 20:01  endpoint\SR3\SR3.APS
     文件        4588  2006-03-07 21:11  endpoint\SR3\SR3.clw
............此处省略14个文件信息

评论

共有 条评论