Text2Speech / webui.py
DanielIglesias97's picture
First upload to the repo.
f869e1d
raw
history blame contribute delete
397 Bytes
import gradio as gr
import os
def speech_to_text(input_text):
os.system(f"python -m mlx_audio.tts.generate --model mlx-community/csm-1b --text \"{input_text}\"")
return 'audio_000.wav'
demo = gr.Interface(
speech_to_text,
[
gr.Textbox(label="Text prompt"),
],
[
gr.Audio(type="filepath"),
]
)
demo.launch(server_name="0.0.0.0", server_port=7860)