Spaces:
Runtime error
Runtime error
File size: 537 Bytes
bce6db8 c34f6f1 bce6db8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import gradio as gr
from gtts import gTTS
import os
def text_to_speech(text, language):
tts = gTTS(text=text, lang=language)
tts.save("output.mp3")
os.system("mpg321 output.mp3")
iface = gr.Interface(
fn=text_to_speech,
inputs=["text", "select"],
outputs="audio",
title="ν
μ€νΈ μμ± λ³ν",
description="ν
μ€νΈλ₯Ό μ
λ ₯νκ³ μΈμ΄λ₯Ό μ ννμ¬ μμ±μ λ£μΈμ",
examples=[["μλ
νμΈμ, μΈκ³!", "ko"], ["Bonjour, monde!", "fr"]],
allow_flagging="never"
)
iface.launch() |