wuxulong19950206 commited on
Commit
fbaa02a
·
1 Parent(s): 6102d8f
Files changed (1) hide show
  1. deploy_model.py +3 -3
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: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,11 +29,11 @@ def get_pretrained_model():
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):
39
 
 
2
  Author: wuxulong19950206 [email protected]
3
  Date: 2024-03-11 19:46:42
4
  LastEditors: wuxulong19950206 [email protected]
5
+ LastEditTime: 2024-03-11 21:02:36
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):
39