CodeGen / wav2vec_asr.py
Halleq's picture
Create wav2vec_asr.py
0408dce verified
raw
history blame contribute delete
319 Bytes
import gradio as gr
# ุชุญู…ูŠู„ ู†ู…ูˆุฐุฌ Wav2Vec2
model_id = "facebook/wav2vec2-base-960h"
asr = gr.Interface.load(f"huggingface/{model_id}")
# ูˆุงุฌู‡ุฉ Gradio
gr.Interface(
fn=asr,
inputs=gr.Audio(source="upload", type="filepath"),
outputs="text",
title="Wav2Vec2 Speech Recognition"
).launch()