Spaces:
Runtime error
Runtime error
File size: 746 Bytes
8f17843 1be915c 979fd10 1be915c 979fd10 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import os
os.system("pip install nemo_toolkit['all']")
import gradio as gr
import nemo.collections.asr as nemo_asr
asr_model = nemo_asr.models.ASRModel.from_pretrained("nvidia/stt_zh_citrinet_1024_gamma_0_25")
def trans(audio_path):
transcriptions = asr_model.transcribe([audio_path])
print(transcriptions)
return transcriptions
outputs = [gr.outputs.Textbox(label="stt result")]
interface = gr.Interface(fn=trans,
inputs=gr.Audio(source="upload", label="上传音频(长度小于60秒)", type="filepath"),
outputs=outputs,
enable_queue=True)
interface.launch(debug=True)
# gr.Interface.load("models/nvidia/stt_zh_citrinet_1024_gamma_0_25").launch() |