File size: 1,131 Bytes
219536e
 
 
 
 
 
 
 
 
891d755
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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()