From 6adc664de614625928dec70d6fb1f9f76b5da9b2 Mon Sep 17 00:00:00 2001 From: nl <3210346136@qq.com> Date: Thu, 25 Nov 2021 17:45:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E7=9A=84=E6=96=87=E4=BB=B6=E5=90=8D=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- evaluate_speech_model.py | 2 +- predict_speech_file.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/evaluate_speech_model.py b/evaluate_speech_model.py index 2093ef4..80b8036 100644 --- a/evaluate_speech_model.py +++ b/evaluate_speech_model.py @@ -45,6 +45,6 @@ feat = Spectrogram() evalue_data = DataLoader('dev') 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, out_report=True, show_ratio=True, show_per_step=100) diff --git a/predict_speech_file.py b/predict_speech_file.py index c82e8ba..4ef4384 100644 --- a/predict_speech_file.py +++ b/predict_speech_file.py @@ -44,7 +44,7 @@ sm251 = SpeechModel251( feat = Spectrogram() 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') print('*[提示] 声学模型语音识别结果:\n',res)