fix: 修复默认加载的文件名问题

This commit is contained in:
nl 2021-11-25 17:45:06 +08:00
parent 4adc8e56e9
commit 6adc664de6
2 changed files with 2 additions and 2 deletions

View File

@ -45,6 +45,6 @@ feat = Spectrogram()
evalue_data = DataLoader('dev') evalue_data = DataLoader('dev')
ms = ModelSpeech(sm251, feat, max_label_length=64) ms = ModelSpeech(sm251, feat, max_label_length=64)
ms.load_model('save_models/' + sm251.get_model_name() + '.h5') ms.load_model('save_models/' + sm251.get_model_name() + '.model.h5')
ms.evaluate_model(data_loader=evalue_data, data_count=-1, ms.evaluate_model(data_loader=evalue_data, data_count=-1,
out_report=True, show_ratio=True, show_per_step=100) out_report=True, show_ratio=True, show_per_step=100)

View File

@ -44,7 +44,7 @@ sm251 = SpeechModel251(
feat = Spectrogram() feat = Spectrogram()
ms = ModelSpeech(sm251, feat, max_label_length=64) ms = ModelSpeech(sm251, feat, max_label_length=64)
ms.load_model('save_models/' + sm251.get_model_name() + '.h5') ms.load_model('save_models/' + sm251.get_model_name() + '.model.h5')
res = ms.recognize_speech_from_file('filename.wav') res = ms.recognize_speech_from_file('filename.wav')
print('*[提示] 声学模型语音识别结果:\n',res) print('*[提示] 声学模型语音识别结果:\n',res)