Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create api #1

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
6 changes: 3 additions & 3 deletions openvoice_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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",
)

Expand All @@ -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,
Expand Down