from gtts import gTTS from IPython.display import Audio from io import BytesIO
Get user input
text = input("Enter the text you want to convert to speech: ")
Create a gTTS object and get audio as bytes
tts = gTTS(text) audio_bytes = BytesIO() tts.write_to_fp(audio_bytes)
from IPython.display import Audio
Replace 'your_audio_file.mp3' with the name of your audio file
audio_path = '/content/welcome.mp3'
Play the audio
Audio(audio_path)
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.