Spaces:
Sleeping
Sleeping
import gradio as gr | |
from gtts import gTTS | |
import os | |
def greet(name): | |
greeting_text = f"Hello, {name}! Welcome to our AI-powered voice greeting system." | |
tts = gTTS(text=greeting_text, lang='en') | |
tts.save("greeting.mp3") | |
return "greeting.mp3" | |
# Create Gradio interface | |
iface = gr.Interface( | |
fn=greet, | |
inputs="text", | |
outputs="audio", | |
title="AI Voice Greeting", | |
description="Enter your name and receive a personalized greeting as an AI-generated voice." | |
) | |
# Launch the interface | |
iface.launch() | |