-
-
Notifications
You must be signed in to change notification settings - Fork 204
API ‐ Control and Configuration API
erew123 edited this page Sep 30, 2024
·
2 revisions
This set of endpoints allows you to control various aspects of the AllTalk server, including stopping generation, reloading configurations, switching models, and adjusting performance settings.
Interrupt the current TTS generation process, if the currently loaded TTS engine & method supports it. Currently only XTTS Streaming supports this.
-
URL:
http://{ipaddress}:{port}/api/stop-generation
-
Method:
PUT
{
"message": "Cancelling current TTS generation"
}
curl -X PUT "http://127.0.0.1:7851/api/stop-generation"
- This sets
tts_stop_generation
in the model_engine to True. - Stop requests will only be honored if the current TTS engine is capable of handling and can honor a stop request partway through generation.
Reload the TTS engine's configuration and scan for new voices and models.
-
URL:
http://{ipaddress}:{port}/api/reload_config
-
Method:
GET
Config file reloaded successfully
curl -X GET "http://127.0.0.1:7851/api/reload_config"
- This ensures that subsequent calls to
/api/currentsettings
,/api/voices
, and/api/rvcvoices
return up-to-date information.
Load or swap to one of the models presented by /api/currentsettings
in the models_available
list.
-
URL:
http://{ipaddress}:{port}/api/reload
-
Method:
POST
Parameter | Type | Description |
---|---|---|
tts_method |
string | The name of the model to load |
{"status": "model-success"}
or
{"status": "model-failure"}
curl -X POST "http://127.0.0.1:7851/api/reload?tts_method=xtts%20-%20xttsv2_2.0.2"
Enable or disable DeepSpeed mode, is the currently loaded TTS engine supports it.
-
URL:
http://{ipaddress}:{port}/api/deepspeed
-
Method:
POST
Parameter | Type | Description |
---|---|---|
new_deepspeed_value |
boolean |
True to enable DeepSpeed, False to disable |
{
"status": "deepspeed-success"
}
curl -X POST "http://127.0.0.1:7851/api/deepspeed?new_deepspeed_value=True"
Enable or disable Low VRAM mode. Will only benefit TTS Engines that support CUDA.
-
URL:
http://{ipaddress}:{port}/api/lowvramsetting
-
Method:
POST
Parameter | Type | Description |
---|---|---|
new_low_vram_value |
boolean |
True to enable Low VRAM mode, False to disable |
{
"status": "lowvram-success"
}
curl -X POST "http://127.0.0.1:7851/api/lowvramsetting?new_low_vram_value=True"
- Use the Stop Generation endpoint when you need to cancel an ongoing TTS generation process.
- The Reload Configuration endpoint is useful after making changes to the AllTalk configuration or adding new voice models.
- Use the Reload/Swap Model endpoint to change the active TTS model dynamically.
- The DeepSpeed and Low VRAM endpoints allow you to adjust performance settings based on your system's capabilities and current needs.
- Always check the response status to ensure your configuration changes were applied successfully.
- After making configuration changes, it's a good practice to use the status endpoints (from the AllTalk Server and TTS Engine Status API) to verify the new state of the server.