zhifu gao
2024-03-15 5023dd04224eddd4c9a047bd946695c3932743ae
examples/industrial_data_pretraining/whisper/demo_from_openai.py
@@ -10,10 +10,11 @@
# model = AutoModel(model="Whisper-small", hub="openai")
# model = AutoModel(model="Whisper-medium", hub="openai")
# model = AutoModel(model="Whisper-large-v2", hub="openai")
model = AutoModel(model="Whisper-large-v3", hub="openai")
model = AutoModel(model="Whisper-large-v3", hub="openai", vad_model="iic/speech_fsmn_vad_zh-cn-16k-common-pytorch",)
res = model.generate(
   language=None,
   task="transcribe",
   batch_size_s=0,
   input="https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.wav")
print(res)