diff --git a/README.md b/README.md index 3e728f2..28fa6fe 100644 --- a/README.md +++ b/README.md @@ -499,6 +499,64 @@ Deepspeed and other such things can be installed. Please read the relevant instr ### 🟠Overview The Text-to-Speech (TTS) Generation API allows you to generate speech from text input using various configuration options. This API supports both character and narrator voices, providing flexibility for creating dynamic and engaging audio content. +#### 🟠 Ready Endpoint
+Check if the Text-to-Speech (TTS) service is ready to accept requests. + +- URL: `http://127.0.0.1:7851/api/ready`
- Method: `GET`
- Response: `Ready` + + `curl -X GET "http://127.0.0.1:7851/api/ready"` + +#### 🟠 Voices List Endpoint
+Retrieve a list of available voices for generating speech. + +- URL: `http://127.0.0.1:7851/api/voices`
- Method: `GET`
+ + `curl -X GET "http://127.0.0.1:7851/api/voices"` + + JSON return: `{"voices": ["voice1.wav", "voice2.wav", "voice3.wav"]}` + +#### 🟠 Preview Voice Endpoint +Generate a preview of a specified voice with hardcoded settings. + +- URL: `http://127.0.0.1:7851/api/previewvoice/`
- Method: `POST`
- Content-Type: `application/x-www-form-urlencoded`
+ + `curl -X POST "http://127.0.0.1:7851/api/previewvoice/" -F "voice=female_01.wav"` + + Replace `female_01.wav` with the name of the voice sample you want to hear. + + JSON return: `{"status": "generate-success", "output_file_path": "/path/to/outputs/api_preview_voice.wav", "output_file_url": "http://127.0.0.1:7851/audio/api_preview_voice.wav"}` + +#### 🟠 Switching Model Endpoint
+ +- URL: `http://127.0.0.1:7851/api/reload`
- Method: `POST`

+ `curl -X POST "http://127.0.0.1:7851/api/reload?tts_method=API%20Local"`
+ `curl -X POST "http://127.0.0.1:7851/api/reload?tts_method=API%20TTS"`
+ `curl -X POST "http://127.0.0.1:7851/api/reload?tts_method=XTTSv2%20Local"`
+ + Switch between the 3 models respectively. + + JSON return `{"status": "model-success"}` + +#### 🟠 Switch DeepSpeed Endpoint
+ +- URL: `http://127.0.0.1:7851/api/deepspeed`
- Method: `POST`

+ `curl -X POST "http://127.0.0.1:7851/api/deepspeed?new_deepspeed_value=True"` + + Replace True with False to disable DeepSpeed mode. + + JSON return `{"status": "deepspeed-success"}` + +#### 🟠 Switching Low VRAM Endpoint
+ +- URL: `http://127.0.0.1:7851/api/lowvramsetting`
- Method: `POST`

+ `curl -X POST "http://127.0.0.1:7851/api/lowvramsetting?new_low_vram_value=True"` + + Replace True with False to disable Low VRAM mode. + + JSON return `{"status": "lowvram-success"}` + +### 🟠 TTS Generation Endpoint + - URL: `http://127.0.0.1:7851/api/tts-generate`
- Method: `POST`
- Content-Type: `application/x-www-form-urlencoded`
@@ -606,29 +664,6 @@ Example JSON TTS Generation Response: `{"status": "generate-success", "output_file_path": "C:\text-generation-webui\extensions\alltalk_tts\outputs\myoutputfile_1703149973.wav", "output_file_url": "http://127.0.0.1:7851/audio/myoutputfile_1703149973.wav"}` -🟠 **Switching Model**

-`curl -X POST "http://127.0.0.1:7851/api/reload?tts_method=API%20Local"`
-`curl -X POST "http://127.0.0.1:7851/api/reload?tts_method=API%20TTS"`
-`curl -X POST "http://127.0.0.1:7851/api/reload?tts_method=XTTSv2%20Local"`
- -Switch between the 3 models respectively. - -JSON return `{"status": "model-success"}` - -🟠 **Switch DeepSpeed**

-`curl -X POST "http://127.0.0.1:7851/api/deepspeed?new_deepspeed_value=True"` - -Replace True with False to disable DeepSpeed mode. - -JSON return `{"status": "deepspeed-success"}` - -🟠 **Switching Low VRAM**

-`curl -X POST "http://127.0.0.1:7851/api/lowvramsetting?new_low_vram_value=True"` - -Replace True with False to disable Low VRAM mode. - -JSON return `{"status": "lowvram-success"}` - ### πŸ”΄ Future to-do list - Voice output within the command prompt/terminal (TBD). - Correct a few spelling mistakes in the documentation.