Spaces:
Runtime error
Runtime error
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() |