Spaces:
Build error
Build error
File size: 1,205 Bytes
092b425 44d995e 821d0f5 7f854f5 ef987de 7f854f5 55c9c33 7f854f5 ef987de 092b425 30e22cb 7f854f5 092b425 821d0f5 092b425 9671ec4 092b425 821d0f5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
import os
os.system('pip install gradio==2.3.0a0')
os.system('pip freeze')
import gradio as gr
from subprocess import call
def run_cmd(command):
try:
print(command)
call(command)
except KeyboardInterrupt:
print("Process interrupted")
sys.exit(1)
def inference(text):
cmd = ['tts', '--text', text]
run_cmd(cmd)
return 'tts_output.wav'
inputs = gr.inputs.Textbox(lines=5, label="Input Text")
outputs = gr.outputs.Audio(type="file",label="Output Audio")
title = "coqui-ai-TTS"
description = "Gradio demo for coqui-ai-TTS: a deep learning toolkit for Text-to-Speech, battle-tested in research and production. To use it, simply add your text, or click one of the examples to load them. Read more at the links below."
article = "<p style='text-align: center'><a href='https://tts.readthedocs.io/en/latest/'>TTS is a library for advanced Text-to-Speech generation</a> | <a href='https://github.com/coqui-ai/TTS'>Github Repo</a></p>"
examples = [
["This is an open-source library that generates synthetic speech!"]
]
gr.Interface(inference, inputs, outputs, title=title, description=description, article=article, examples=examples, enable_queue=True ).launch() |