mirror of https://github.com/coqui-ai/TTS.git
Fetch all built-in speakers (#2626)
This commit is contained in:
parent
aef7f6d980
commit
23a7a9a363
|
@ -105,7 +105,7 @@ class CS_API:
|
||||||
"""List built-in Coqui Studio speakers."""
|
"""List built-in Coqui Studio speakers."""
|
||||||
self._check_token()
|
self._check_token()
|
||||||
conn = http.client.HTTPSConnection("app.coqui.ai")
|
conn = http.client.HTTPSConnection("app.coqui.ai")
|
||||||
conn.request("GET", f"{self.api_prefix}/speakers", headers=self.headers)
|
conn.request("GET", f"{self.api_prefix}/speakers?per_page=100", headers=self.headers)
|
||||||
res = conn.getresponse()
|
res = conn.getresponse()
|
||||||
data = res.read()
|
data = res.read()
|
||||||
return [Speaker(s) for s in json.loads(data)["result"]]
|
return [Speaker(s) for s in json.loads(data)["result"]]
|
||||||
|
|
Loading…
Reference in New Issue