소스 검색

新增脚本:test_whister.py,用于使用whisper_small模型进行音频预测并保存结果

zhch158_admin 4 달 전
부모
커밋
62c33946d6
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      zhch/test_whister.py

+ 6 - 0
zhch/test_whister.py

@@ -0,0 +1,6 @@
+from paddlex import create_model
+model = create_model(model_name="whisper_small")
+output = model.predict(input="./sample_data/zh.wav", batch_size=1)
+for res in output:
+    res.print()
+    res.save_all(save_path="./sample_data/output")