mirror of
https://github.com/wassname/TTS.git
synced 2026-09-09 11:16:00 +08:00
Update Studio API for XTTS (#2861)
* Update Studio API for XTTS * Update the docs * Update README.md * Update README.md Update README
This commit is contained in:
@@ -191,9 +191,25 @@ from TTS.api import CS_API
|
||||
|
||||
# Init 🐸 Coqui Studio API
|
||||
# you can either set the API token as an environment variable `COQUI_STUDIO_TOKEN` or pass it as an argument.
|
||||
api = CS_API(api_token=<token>)
|
||||
|
||||
# XTTS - Best quality and life-like speech in EN
|
||||
api = CS_API(api_token=<token>, model="XTTS")
|
||||
api.speakers # all the speakers are available with all the models.
|
||||
api.list_speakers()
|
||||
api.list_voices()
|
||||
wav, sample_rate = api.tts(text="This is a test.", speaker=api.speakers[0].name, emotion="Happy", speed=1.5)
|
||||
|
||||
# XTTS-multilingual - Multilingual XTTS with [en, de, es, fr, it, pt, ...] (more langs coming soon)
|
||||
api = CS_API(api_token=<token>, model="XTTS-multilingual")
|
||||
api.speakers
|
||||
api.emotions
|
||||
api.list_speakers()
|
||||
api.list_voices()
|
||||
wav, sample_rate = api.tts(text="This is a test.", speaker=api.speakers[0].name, emotion="Happy", speed=1.5)
|
||||
|
||||
# V1 - Fast and lightweight TTS in EN with emotion control.
|
||||
api = CS_API(api_token=<token>, model="V1")
|
||||
api.speakers
|
||||
api.emotions # emotions are only for the V1 model.
|
||||
api.list_speakers()
|
||||
api.list_voices()
|
||||
wav, sample_rate = api.tts(text="This is a test.", speaker=api.speakers[0].name, emotion="Happy", speed=1.5)
|
||||
|
||||
Reference in New Issue
Block a user