Переглянути джерело

新增脚本: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")