100 likes | 225 Views
語音犯罪偵防系統. 指導老師 : 黃志賢 老師 學生 : 吳建霖. 功能測試. 錄音. void CAddkeywordDlg::OnBnClickedButton1() { CString filename2; m_pPlayMMSound->PostThreadMessage(WM_PLAYMMSOUND_CLOSEFILE ,0,(LPARAM)m_pPlaySound); //mfc 媒體 API 使用 if(asasa) { // 錄音 fileaudioname.Format(“music\sound.wav”);// 存取目錄
E N D
語音犯罪偵防系統 指導老師:黃志賢 老師 學生:吳建霖
錄音 • void CAddkeywordDlg::OnBnClickedButton1() • { • CString filename2; • m_pPlayMMSound->PostThreadMessage(WM_PLAYMMSOUND_CLOSEFILE ,0,(LPARAM)m_pPlaySound); //mfc 媒體API使用 • if(asasa) • { • //錄音 • fileaudioname.Format(“music\\sound.wav”);//存取目錄 • m_Recording.SetWindowText("停止"); • asasa = FALSE; • m_pRecordSound->CurrFilename = fileaudioname; //取得音訊 • m_pRecordSound->PostThreadMessage(WM_RECORDSOUND_STARTRECORDING, 0, 0L); //物件屬性(按鈕) • } • else • { • //停止錄音 • m_pRecordSound->PostThreadMessage(WM_RECORDSOUND_STOPRECORDING, 0, 0L); • m_Recording.SetWindowText("錄音"); • asasa = TRUE; • Sleep(1000); • WinExec(filename2,SW_SHOWNORMAL);// • m_Recording.EnableWindow(FALSE); • m_search.EnableWindow(TRUE); • }
字轉音 • readtable.Format("411StateTable5E.txt"); • KeywordFile.Open("Final\\keyword.txt",CFile::modeCreate|CFile::modeWrite|CFile::typeBinary)
音檔與關鍵字詞庫作mfcc辨識 • 開發環境:visual c++ 6.0 • filename2.Format("HCopy -T 1 -C config.vat %s Record_sound\\MFCC\\%s.mfcc",fileaudioname,REF_USER_NAME);