wuxulong19950206 commited on
Commit
ab4a9a7
·
1 Parent(s): 11f2c2b
Files changed (1) hide show
  1. deploy_model.py +5 -2
deploy_model.py CHANGED
@@ -2,7 +2,7 @@
2
  Author: wuxulong19950206 [email protected]
3
  Date: 2024-03-11 19:46:42
4
  LastEditors: wuxulong19950206 [email protected]
5
- LastEditTime: 2024-03-11 20:29:07
6
  FilePath: \apeech_rec\deploy_model.py
7
  Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
8
  '''
@@ -29,7 +29,10 @@ def get_pretrained_model():
29
 
30
  feat = Spectrogram()
31
  ms = ModelSpeech(sm251bn, feat, max_label_length=64)
32
-
 
 
 
33
  ms.load_model('models\SpeechModel251bn_epoch12.model.h5')
34
  return ms
35
  def decode(model,filename):
 
2
  Author: wuxulong19950206 [email protected]
3
  Date: 2024-03-11 19:46:42
4
  LastEditors: wuxulong19950206 [email protected]
5
+ LastEditTime: 2024-03-11 20:57:50
6
  FilePath: \apeech_rec\deploy_model.py
7
  Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
8
  '''
 
29
 
30
  feat = Spectrogram()
31
  ms = ModelSpeech(sm251bn, feat, max_label_length=64)
32
+ if os.path.exists('models\SpeechModel251bn_epoch12.model.h5'):
33
+ print('*[提示] 加载预训练的声学模型')
34
+ else:
35
+ print('*[提示] 预训练的声学模型不存在')
36
  ms.load_model('models\SpeechModel251bn_epoch12.model.h5')
37
  return ms
38
  def decode(model,filename):