none commited on
Commit
8551eaf
·
1 Parent(s): 0389089
Files changed (2) hide show
  1. app.py +8 -3
  2. datasets/CoTMovieDubbing/GT.wav +0 -0
app.py CHANGED
@@ -155,6 +155,9 @@ def process_video_dubbing(video_path: str, subtitle_text: str, audio_path: str =
155
  if not subtitle_text.strip():
156
  raise ValueError("Subtitle text cannot be empty")
157
 
 
 
 
158
  output_path = deepdubber(video_path, subtitle_text, audio_path)
159
 
160
  return output_path
@@ -167,12 +170,14 @@ def process_video_dubbing(video_path: str, subtitle_text: str, audio_path: str =
167
 
168
  def create_ui():
169
  with gr.Blocks(title="DeepDubber-V1") as app:
170
- gr.Markdown("# DeepDubber-V1\nUpload your video file and enter the text you want to dub")
171
 
172
  with gr.Row():
173
  video_input = gr.Video(label="Upload video")
174
- audio_input = gr.Audio(label="Upload audio", type="filepath")
175
- subtitle_input = gr.Textbox(label="Enter the text", placeholder="Enter the text to be dubbed...", lines=5)
 
 
176
 
177
  process_btn = gr.Button("Start Dubbing")
178
 
 
155
  if not subtitle_text.strip():
156
  raise ValueError("Subtitle text cannot be empty")
157
 
158
+ if audio_path is None:
159
+ audio_path = "datasets/CoTMovieDubbing/GT.wav"
160
+
161
  output_path = deepdubber(video_path, subtitle_text, audio_path)
162
 
163
  return output_path
 
170
 
171
  def create_ui():
172
  with gr.Blocks(title="DeepDubber-V1") as app:
173
+ gr.Markdown("# DeepDubber-V1\nUpload your video file and enter the subtitle you want to dub")
174
 
175
  with gr.Row():
176
  video_input = gr.Video(label="Upload video")
177
+ audio_input = gr.Audio(label="Upload speech prompt (Optional)", type="filepath")
178
+ subtitle_input = gr.Textbox(
179
+ label="Enter the subtitle", placeholder="Enter the subtitle to be dubbed...", lines=5
180
+ )
181
 
182
  process_btn = gr.Button("Start Dubbing")
183
 
datasets/CoTMovieDubbing/GT.wav ADDED
Binary file (623 kB). View file