diff --git a/SpeechModel24.py b/SpeechModel24.py index 2186d32..996482c 100644 --- a/SpeechModel24.py +++ b/SpeechModel24.py @@ -191,7 +191,7 @@ class ModelSpeech(): # 语音模型类 加载模型参数 ''' self._model.load_weights(filename) - self.base_model.load_weights(filename + '.base') + #self.base_model.load_weights(filename + '.base') def SaveModel(self,filename='model_speech/speech_model24',comment=''): ''' diff --git a/SpeechModel25.py b/SpeechModel25.py index 3127ddb..c76eca2 100644 --- a/SpeechModel25.py +++ b/SpeechModel25.py @@ -200,7 +200,7 @@ class ModelSpeech(): # 语音模型类 加载模型参数 ''' self._model.load_weights(filename) - self.base_model.load_weights(filename + '.base') + #self.base_model.load_weights(filename + '.base') def SaveModel(self,filename='model_speech/speech_model25',comment=''): ''' diff --git a/SpeechModel251.py b/SpeechModel251.py index 0921f35..6cb9bd1 100644 --- a/SpeechModel251.py +++ b/SpeechModel251.py @@ -211,7 +211,7 @@ class ModelSpeech(): # 语音模型类 加载模型参数 ''' self._model.load_weights(filename) - self.base_model.load_weights(filename + '.base') + #self.base_model.load_weights(filename + '.base') def SaveModel(self,filename = abspath + 'model_speech/m'+ModelName+'/speech_model'+ModelName,comment=''): ''' @@ -439,7 +439,7 @@ if(__name__=='__main__'): ms = ModelSpeech(datapath) - #ms.LoadModel(modelpath + 'm251/speech_model251_e_0_step_100000.model') + #ms.LoadModel(modelpath + 'm251/speech_model251_e_0_step_100000.h5') ms.TrainModel(datapath, epoch = 50, batch_size = 16, save_step = 500) #t1=time.time() diff --git a/SpeechModel251_limitless.py b/SpeechModel251_limitless.py index 4aef546..b211661 100644 --- a/SpeechModel251_limitless.py +++ b/SpeechModel251_limitless.py @@ -209,7 +209,7 @@ class ModelSpeech(): # 语音模型类 加载模型参数 ''' self._model.load_weights(filename) - self.base_model.load_weights(filename + '.base') + #self.base_model.load_weights(filename + '.base') def SaveModel(self,filename = abspath + 'model_speech/m'+ModelName+'/speech_model'+ModelName,comment=''): ''' diff --git a/SpeechModel251_p.py b/SpeechModel251_p.py index efe53c0..bba322f 100644 --- a/SpeechModel251_p.py +++ b/SpeechModel251_p.py @@ -213,7 +213,7 @@ class ModelSpeech(): # 语音模型类 加载模型参数 ''' self._model.load_weights(filename) - self.base_model.load_weights(filename + '.base') + #self.base_model.load_weights(filename + '.base') def SaveModel(self,filename = abspath + 'model_speech/m'+ModelName+'/speech_model'+ModelName,comment=''): ''' diff --git a/SpeechModel252.py b/SpeechModel252.py index 91098ca..2b11e62 100644 --- a/SpeechModel252.py +++ b/SpeechModel252.py @@ -217,7 +217,7 @@ class ModelSpeech(): # 语音模型类 加载模型参数 ''' self._model.load_weights(filename) - self.base_model.load_weights(filename + '.base') + #self.base_model.load_weights(filename + '.base') def SaveModel(self,filename = abspath + 'model_speech/m'+ModelName+'/speech_model'+ModelName,comment=''): ''' diff --git a/SpeechModel26.py b/SpeechModel26.py index 8083551..6b12da1 100644 --- a/SpeechModel26.py +++ b/SpeechModel26.py @@ -218,7 +218,7 @@ class ModelSpeech(): # 语音模型类 加载模型参数 ''' self._model.load_weights(filename) - self.base_model.load_weights(filename + '.base') + #self.base_model.load_weights(filename + '.base') def SaveModel(self,filename='model_speech/m26/speech_model26',comment=''): ''' diff --git a/SpeechModel261.py b/SpeechModel261.py index 892a55b..9fd3d54 100644 --- a/SpeechModel261.py +++ b/SpeechModel261.py @@ -226,7 +226,7 @@ class ModelSpeech(): # 语音模型类 加载模型参数 ''' self._model.load_weights(filename) - self.base_model.load_weights(filename + '.base') + #self.base_model.load_weights(filename + '.base') def SaveModel(self,filename = abspath + 'model_speech/m'+ModelName+'/speech_model'+ModelName,comment=''): ''' diff --git a/SpeechModel261_p.py b/SpeechModel261_p.py index 8dc00b3..5831f8d 100644 --- a/SpeechModel261_p.py +++ b/SpeechModel261_p.py @@ -230,7 +230,7 @@ class ModelSpeech(): # 语音模型类 加载模型参数 ''' self._model.load_weights(filename) - self.base_model.load_weights(filename + '.base') + #self.base_model.load_weights(filename + '.base') def SaveModel(self,filename = abspath + 'model_speech/m'+ModelName+'/speech_model'+ModelName,comment=''): ''' diff --git a/asrserver.py b/asrserver.py index 273f2fb..e4d8cd9 100644 --- a/asrserver.py +++ b/asrserver.py @@ -34,7 +34,7 @@ from LanguageModel import ModelLanguage datapath = './' modelpath = 'model_speech/' ms = ModelSpeech(datapath) -ms.LoadModel(modelpath + 'm251/speech_model251_e_0_step_12000.model') +ms.LoadModel(modelpath + 'm251/speech_model251_e_0_step_12000.h5') ml = ModelLanguage('model_language') ml.LoadModel() diff --git a/test.py b/test.py index c0cc491..0c4f729 100644 --- a/test.py +++ b/test.py @@ -46,8 +46,8 @@ else: ms = ModelSpeech(datapath) -#ms.LoadModel(modelpath + 'm22_2\\0\\speech_model22_e_0_step_257000.model') -ms.LoadModel(modelpath + 'm251\\speech_model251_e_0_step_625000.model') +#ms.LoadModel(modelpath + 'm22_2\\0\\speech_model22_e_0_step_257000.h5') +ms.LoadModel(modelpath + 'm251\\speech_model251_e_0_step_625000.h5') #ms.TestModel(datapath, str_dataset='test', data_count = 64, out_report = True) r = ms.RecognizeSpeech_FromFile('D:\\语音数据集\\ST-CMDS-20170001_1-OS\\20170001P00241I0052.wav') diff --git a/test_mspeech.py b/test_mspeech.py index 8a7a335..4736abc 100644 --- a/test_mspeech.py +++ b/test_mspeech.py @@ -64,7 +64,7 @@ else: ms = ModelSpeech(datapath) -ms.LoadModel(modelpath + 'm251/speech_model251_e_0_step_42500.model') +ms.LoadModel(modelpath + 'm251/speech_model251_e_0_step_42500.h5') ms.TestModel(datapath, str_dataset='test', data_count = 128, out_report = True) diff --git a/train_mspeech.py b/train_mspeech.py index 0e4eabf..c4f1807 100644 --- a/train_mspeech.py +++ b/train_mspeech.py @@ -63,7 +63,7 @@ else: ms = ModelSpeech(datapath) -#ms.LoadModel(modelpath + 'speech_model251_e_0_step_327500.model') +#ms.LoadModel(modelpath + 'speech_model251_e_0_step_327500.h5') ms.TrainModel(datapath, epoch = 50, batch_size = 16, save_step = 500)