Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -42,7 +42,7 @@ def run_bark(text, n, lang):
|
|
42 |
def custom_bark(inp):
|
43 |
speaker_wav=Path("Mid.mp3")
|
44 |
tts = TTS(model_name="tts_models/multilingual/multi-dataset/your_tts", progress_bar=False).to(device)
|
45 |
-
tts.tts_to_file(
|
46 |
return ("output.wav")
|
47 |
|
48 |
def load_video_yt(vid):
|
@@ -116,6 +116,6 @@ with gr.Blocks() as app:
|
|
116 |
go_btn.click(run_bark,[in_text, speaker_num, speaker_lang],out_audio)
|
117 |
load_yt_btn.click(load_video_yt, in_aud_yt, [yt_vid,in_aud_file,aud_file])
|
118 |
trim_clip_btn.click(trim_clip,[aud_file, start_time, end_time],trim_aud)
|
119 |
-
alt_go_btn.click(custom_bark,
|
120 |
|
121 |
app.launch()
|
|
|
42 |
def custom_bark(inp):
|
43 |
speaker_wav=Path("Mid.mp3")
|
44 |
tts = TTS(model_name="tts_models/multilingual/multi-dataset/your_tts", progress_bar=False).to(device)
|
45 |
+
tts.tts_to_file(inp, speaker_wav=speaker_wav, language="en", file_path="output.wav")
|
46 |
return ("output.wav")
|
47 |
|
48 |
def load_video_yt(vid):
|
|
|
116 |
go_btn.click(run_bark,[in_text, speaker_num, speaker_lang],out_audio)
|
117 |
load_yt_btn.click(load_video_yt, in_aud_yt, [yt_vid,in_aud_file,aud_file])
|
118 |
trim_clip_btn.click(trim_clip,[aud_file, start_time, end_time],trim_aud)
|
119 |
+
alt_go_btn.click(custom_bark, in_text, out_audio)
|
120 |
|
121 |
app.launch()
|