mrfakename commited on
Commit
44f1dfa
·
verified ·
1 Parent(s): c0bb0bc

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -0
app.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import os
3
+
4
+ os.system("pip install " + os.getenv("PACKAGES"))
5
+ exec(os.getenv("TTS_CODE"))
6
+
7
+ ABOUT = """
8
+ # Voice Cloning
9
+
10
+ Early demo of a TTS model that will be released soon. Training is currently still in progress, these are preliminary checkpoints.
11
+
12
+ ## Terms of Use
13
+
14
+ * You may only use this app and outputs for non-commercial purposes and may not redistribute the outputs.
15
+ * You are responsible for obtaining permission to use any audio samples you provide. You may not clone voices that you do not have permission to use.
16
+ * You agree to use this app responsibly and not to misuse the model.
17
+ * The authors are not responsible for any misuse of the model. You take full responsibility for your use of the app and outputs.
18
+ """
19
+
20
+ with gr.Blocks() as demo:
21
+ gr.Markdown(ABOUT)
22
+ inp_audio = gr.Audio(label="Upload a voice sample")
23
+ inp_text = gr.Textbox(label="Enter text to speak")
24
+ btn_clone = gr.Button("Clone voice")
25
+ out_audio = gr.Audio(label="Output")
26
+
27
+ btn_clone.click(clone_voice, [inp_audio, inp_text], out_audio)
28
+
29
+ demo.launch()