Swar / app.py
Bagda's picture
Update app.py
891d755 verified
raw
history blame
1.13 kB
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):
# यहाँ आप बैकएंड फंक्शन को कॉल करें, जो वीडियो डाउनलोड करे, ऑडियो निकाले, हिंदी में डब करे और डब्ड वीडियो रिटर्न करे
# उदाहरण के लिए: processed_video_path = backend_dubbing_function(video_url, "hindi")
# return processed_video_path
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()