使用MFCC與CNN進行語音辨識
Step1)連線Google雲端硬碟
Step2)將聲音檔data資料夾放在Google雲端硬碟內,本範例放置在「機器學習」資料夾下的「mfcc_cnn」資料夾
從https://github.com/manashmandal/DeadSimpleSpeechRecognizer 下載data資料夾
使用以下指令切換資料夾
Step3)建立處理聲音檔的函式
以下程式碼參考Building a Dead Simple Speech Recognition Engine using ConvNet in Keras進行修改
Step4)使用mfcc提取聲音檔特徵值,轉換成npy格式,並建立訓練資料集與測試資料集
Step5)從npy讀取聲音檔的mfcc,輸入CNN進行訓練,訓練後模型參數儲存到檔案MFCC.h5
Step6)載入模型參數檔案MFCC.h5,進行預測
參考資料
1.Building a Dead Simple Speech Recognition Engine using ConvNet in Keras(https://blog.manash.io/building-a-dead-simple-word-recognition-engine-using-convnet-in-keras-25e72c19c12b)
2.自動語音識別(Automatic Speech Recognition) -- 觀念與實踐(https://ithelp.ithome.com.tw/articles/10195763)