A Fundamental End-to-End Speech Recognition Toolkit and Open Source SOTA Pretrained Models, Supporting Speech Recognition, Voice Activity Detection, Text Post-processing etc.
model = AutoModel(model="fa-zh")
wav_file = "C:/Users/Administrator/Desktop/wav1/hebing.wav"
text_file = "C:/Users/Administrator/Desktop/wav1/text.txt"
res = model.generate(input=(wav_file, text_file), data_type=("sound", "text"))
print(res)
执行后结果为空,音频存在,文本不清楚要什么格式。
2024-04-13 08:07:07,639 - modelscope - INFO - PyTorch version 2.2.1+cu118 Found.
2024-04-13 08:07:07,644 - modelscope - INFO - Loading ast index from C:\Users\Administrator.cache\modelscope\ast_indexer
2024-04-13 08:07:07,990 - modelscope - INFO - No valid ast index found from C:\Users\Administrator.cache\modelscope\ast_indexer, generating ast index from prebuilt!
2024-04-13 08:07:08,290 - modelscope - INFO - Loading done! Current index file version is 1.10.0, with md5 56d597da7bd460716acd15d95d44467e and a total number of 946 components indexed
2024-04-13 08:07:19,435 - modelscope - WARNING - Using the master branch is fragile, please use it with caution!
2024-04-13 08:07:19,436 - modelscope - INFO - Use user-specified model revision: master
ckpt: C:\Users\Administrator.cache\modelscope\hub\iic\speech_timestamp_prediction-v1-16k-offline\model.pt
rtf_avg: 0.017: 100%|████████████████████████████████████████████████████████████████████| 1/1 [00:05<00:00, 5.74s/it]
[{'key': "{'key':", 'text': '', 'timestamp': []}]
from funasr import AutoModel
model = AutoModel(model="fa-zh") wav_file = "C:/Users/Administrator/Desktop/wav1/hebing.wav" text_file = "C:/Users/Administrator/Desktop/wav1/text.txt" res = model.generate(input=(wav_file, text_file), data_type=("sound", "text")) print(res)
执行后结果为空,音频存在,文本不清楚要什么格式。
2024-04-13 08:07:07,639 - modelscope - INFO - PyTorch version 2.2.1+cu118 Found. 2024-04-13 08:07:07,644 - modelscope - INFO - Loading ast index from C:\Users\Administrator.cache\modelscope\ast_indexer 2024-04-13 08:07:07,990 - modelscope - INFO - No valid ast index found from C:\Users\Administrator.cache\modelscope\ast_indexer, generating ast index from prebuilt! 2024-04-13 08:07:08,290 - modelscope - INFO - Loading done! Current index file version is 1.10.0, with md5 56d597da7bd460716acd15d95d44467e and a total number of 946 components indexed 2024-04-13 08:07:19,435 - modelscope - WARNING - Using the master branch is fragile, please use it with caution! 2024-04-13 08:07:19,436 - modelscope - INFO - Use user-specified model revision: master ckpt: C:\Users\Administrator.cache\modelscope\hub\iic\speech_timestamp_prediction-v1-16k-offline\model.pt rtf_avg: 0.017: 100%|████████████████████████████████████████████████████████████████████| 1/1 [00:05<00:00, 5.74s/it] [{'key': "{'key':", 'text': '', 'timestamp': []}]