lmx0's picture
Update test.py
4300325
raw
history blame contribute delete
312 Bytes
from train import ASR_Model
from model_cnn import Model
model = ASR_Model(device='cuda',model_path='model/model.pth',pinyin_path ='pinyin.txt')
result = model.predict('Examples/中原石化加油站.wav')
print(result) #[('zhong', 1), ('yuan', 2), ('shi', 2), ('hua', 4), ('jia', 1), ('you', 2), ('zhan', 4)]