Spaces:
Runtime error
Runtime error
Ahsen Khaliq
commited on
Commit
•
fe98dd2
1
Parent(s):
e677203
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from voicefixer import VoiceFixer
|
2 |
+
import gradio as gr
|
3 |
+
voicefixer = VoiceFixer()
|
4 |
+
def inference(audio):
|
5 |
+
voicefixer.restore(input=audio.name, # input wav file path
|
6 |
+
output="output.wav", # output wav file path
|
7 |
+
cuda=False, # whether to use gpu acceleration
|
8 |
+
mode = 1) # You can try out mode 0, 1 to find out the best result
|
9 |
+
return 'output.wav'
|
10 |
+
|
11 |
+
inputs = gr.inputs.Audio(type="file" label="Input Audio")
|
12 |
+
outputs = gr.outputs.Audio(type="file",label="Output Audio")
|
13 |
+
|
14 |
+
|
15 |
+
title = "VITS"
|
16 |
+
description = "demo for VITS: Conditional Variational Autoencoder with Adversarial Learning for End-to-End Text-to-Speech. To use it, simply add your text, or click one of the examples to load them. Read more at the links below."
|
17 |
+
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2106.06103'>Conditional Variational Autoencoder with Adversarial Learning for End-to-End Text-to-Speech</a> | <a href='https://github.com/jaywalnut310/vits'>Github Repo</a></p>"
|
18 |
+
|
19 |
+
|
20 |
+
|
21 |
+
gr.Interface(inference, inputs, outputs, title=title, description=description, article=article).launch()
|