Spaces:
Sleeping
Sleeping
File size: 729 Bytes
f6bbb30 0d6f6f4 f6bbb30 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import gradio as gr
from coqui_tts import CoquiTTS
def speech(text, audio):
coqui_tts = CoquiTTS(speaker_wave_file = audio)
return coqui_tts.speech_text_and_save_it(text, "output.wav")
interface = gr.Interface(
fn = speech,
title = "🎤Voice cloner",
description = "Record your voice or any other voice, input the text that you want to be spoken using the reference voice and voilà !",
inputs = [gr.Textbox(label= "Text to speak", placeholder = "Your text to speech here"),
gr.Audio(label= "Audio to clone", sources = ["microphone"], type = "filepath")],
outputs = [gr.Audio(label = "File path")]
, allow_flagging = "never")
if __name__ == '__main__':
interface.launch()
|