Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
DenisT
/
brain-rot-tok
like
1
Sleeping
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
07c6017
brain-rot-tok
/
utils
/
text_to_speech.py
Topallaj Denis
init
aff0a09
12 months ago
raw
Copy download link
history
blame
Safe
149 Bytes
import
pyttsx3
def
text_to_speech
(
text, audio_file_path
):
engine = pyttsx3.init()
engine.save_to_file(text, audio_file_path)
engine.runAndWait()