Spaces:
Sleeping
Sleeping
wuxulong19950206
commited on
Commit
·
53596fd
1
Parent(s):
dafc7b5
model
Browse files- deploy_model.py +10 -2
- models/SpeechModel251bn_epoch18.model.h5 +3 -0
deploy_model.py
CHANGED
@@ -1,3 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import os
|
2 |
|
3 |
from speech_model import ModelSpeech
|
@@ -22,7 +30,7 @@ def get_pretrained_model():
|
|
22 |
feat = Spectrogram()
|
23 |
ms = ModelSpeech(sm251bn, feat, max_label_length=64)
|
24 |
|
25 |
-
ms.load_model('
|
26 |
return ms
|
27 |
def decode(model,filename):
|
28 |
|
@@ -35,6 +43,6 @@ def not_use():
|
|
35 |
str_pinyin = res
|
36 |
res = ml.pinyin_to_text(str_pinyin)
|
37 |
print('语音识别最终结果:\n', res)
|
38 |
-
chinese_models = {"chinese":'
|
39 |
language_to_models = {
|
40 |
"Chinese": list(chinese_models.keys())}
|
|
|
1 |
+
'''
|
2 |
+
Author: wuxulong19950206 [email protected]
|
3 |
+
Date: 2024-03-11 19:46:42
|
4 |
+
LastEditors: wuxulong19950206 [email protected]
|
5 |
+
LastEditTime: 2024-03-11 19:48:42
|
6 |
+
FilePath: \apeech_rec\deploy_model.py
|
7 |
+
Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
8 |
+
'''
|
9 |
import os
|
10 |
|
11 |
from speech_model import ModelSpeech
|
|
|
30 |
feat = Spectrogram()
|
31 |
ms = ModelSpeech(sm251bn, feat, max_label_length=64)
|
32 |
|
33 |
+
ms.load_model('models\SpeechModel251bn_epoch18.model.h5')
|
34 |
return ms
|
35 |
def decode(model,filename):
|
36 |
|
|
|
43 |
str_pinyin = res
|
44 |
res = ml.pinyin_to_text(str_pinyin)
|
45 |
print('语音识别最终结果:\n', res)
|
46 |
+
chinese_models = {"chinese":'models\SpeechModel251bn_epoch18.model.h5'}
|
47 |
language_to_models = {
|
48 |
"Chinese": list(chinese_models.keys())}
|
models/SpeechModel251bn_epoch18.model.h5
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4f8984e420632d94b0e5bb507d75ddef6b76ded3ef0f9076188e541023255c7c
|
3 |
+
size 6746064
|