opentts
opentts copied to clipboard
Python Basics Example/Demo
Hi Team, I ended up here from browsing HackerNews where many people were looking for open-source TTS software packages: https://news.ycombinator.com/item?id=34211457 I started having a go with OpenTTS but was significantly slowed down since I could not quickly find a nice basic python implementation showing exactly how to get it up and running (i.e. in python read aloud "hello world" in one of the many voices). Is there any possibility of such a thing being put on the repo for people to build upon, rather than the html interface focus at present?
I used the docker container in Windows WSL and query it from the host like this:
import requests
resp = requests.get(
"http://localhost:5500/api/tts",
params={
"voice": "coqui-tts:en_vctk",
"text": "I started having a go with OpenTTS but was significantly slowed down since I could not quickly find a nice basic python implementation.",
"speakerId": "p228",
"lang": "en"
}
)
# Write it on disk or something
with open("file.wav", "wb") as f:
f.write(resp.content)