Update test.py
Browse files
test.py
CHANGED
|
@@ -2,5 +2,5 @@ from train import ASR_Model
|
|
| 2 |
from model_cnn import Model
|
| 3 |
|
| 4 |
model = ASR_Model(device='cuda',model_path='model/model.pth',pinyin_path ='pinyin.txt')
|
| 5 |
-
result = model.predict('
|
| 6 |
-
print(result)
|
|
|
|
| 2 |
from model_cnn import Model
|
| 3 |
|
| 4 |
model = ASR_Model(device='cuda',model_path='model/model.pth',pinyin_path ='pinyin.txt')
|
| 5 |
+
result = model.predict('Examples/中原石化加油站.wav')
|
| 6 |
+
print(result) #[('zhong', 1), ('yuan', 2), ('shi', 2), ('hua', 4), ('jia', 1), ('you', 2), ('zhan', 4)]
|