Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
palondomus
/
CaesarAI
like
0
Sleeping
App
Files
Files
Community
8951a9e
CaesarAI
/
CaesarVoice.py
CaesarCloudSync
CaesarAI Deployed
9d3162f
almost 2 years ago
raw
Copy download link
history
blame
Safe
216 Bytes
from
gtts
import
gTTS
import
os
class
CaesarVoice
:
@classmethod
def
synthesise
(
self,text,filename=
"temp.wav"
,lang=
'en'
):
caesargtts = gTTS(text=text, lang=lang)
caesargtts.save(
f"
{filename}
"
)