|
from transformers import pipeline |
|
|
|
asr = pipeline("automatic-speech-recognition", model="ZeeshanGeoPk/haitian-speech-to-text") |
|
|
|
def transcribe(audio): |
|
return asr(audio)["text"] |
|
|
|
import gradio as gr |
|
gr.Interface(fn=transcribe, inputs=gr.Audio(type="filepath"), outputs="text").launch() |
|
|
|
import gradio as gr |
|
|
|
def dub_video(video_url): |
|
|
|
|
|
|
|
return "Processed video path will be returned here (replace with actual function call)" |
|
|
|
demo = gr.Interface( |
|
fn=dub_video, |
|
inputs=gr.Textbox(label="Enter video URL"), |
|
outputs=gr.Video(label="Hindi Dubbed Video"), |
|
title="Video Dubbing AI (Hindi)", |
|
description="Enter a video URL to get it dubbed in Hindi." |
|
) |
|
|
|
demo.launch() |
|
|