From 7cbe60e545dce76f73081a1792ad24494be3d202 Mon Sep 17 00:00:00 2001 From: "G502VS\\princ" Date: Mon, 23 Sep 2024 10:04:42 +0800 Subject: [PATCH] create api --- api.py | 8 +------- openvoice_app.py | 6 +++--- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/api.py b/api.py index 41c6294e..76dd378d 100644 --- a/api.py +++ b/api.py @@ -102,13 +102,7 @@ class ToneColorConverter(OpenVoiceBaseClass): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) - if kwargs.get('enable_watermark', True): - import wavmark - self.watermark_model = wavmark.load_model().to(self.device) - else: - self.watermark_model = None - - + self.watermark_model = None def extract_se(self, ref_wav_list, se_save_path=None): if isinstance(ref_wav_list, str): diff --git a/openvoice_app.py b/openvoice_app.py index 39223413..5903e004 100644 --- a/openvoice_app.py +++ b/openvoice_app.py @@ -245,7 +245,7 @@ def predict(prompt, style, audio_file_pth, mic_file_path, use_mic, agree): with gr.Row(): gr.Markdown(description) with gr.Column(): - gr.Video('https://github.com/myshell-ai/OpenVoice/assets/40556743/3cba936f-82bf-476c-9e52-09f0f417bb2f', autoplay=True) + gr.Video('https://github.com/myshell-ai/OpenVoice/assets/40556743/3cba936f-82bf-476c-9e52-09f0f417bb2f', autoplay=False) with gr.Row(): gr.HTML(wrapped_markdown_content) @@ -283,7 +283,7 @@ def predict(prompt, style, audio_file_pth, mic_file_path, use_mic, agree): ) tos_gr = gr.Checkbox( label="Agree", - value=False, + value=True, info="I agree to the terms of the cc-by-nc-4.0 license-: https://github.com/myshell-ai/OpenVoice/blob/main/LICENSE", ) @@ -292,7 +292,7 @@ def predict(prompt, style, audio_file_pth, mic_file_path, use_mic, agree): with gr.Column(): out_text_gr = gr.Text(label="Info") - audio_gr = gr.Audio(label="Synthesised Audio", autoplay=True) + audio_gr = gr.Audio(label="Synthesised Audio", autoplay=False) ref_audio_gr = gr.Audio(label="Reference Audio Used") gr.Examples(examples,