Update README.md
Browse files
README.md
CHANGED
|
@@ -2,47 +2,48 @@
|
|
| 2 |
|
| 3 |
## Overview
|
| 4 |
|
| 5 |
-
This API provides a Text-to-Speech (TTS) service that converts input text into speech audio. It supports multiple Indian languages and offers voice customization through
|
| 6 |
|
| 7 |
---
|
| 8 |
|
| 9 |
## Endpoint: `/Get_Inference`
|
| 10 |
|
| 11 |
* **Method**: `GET`
|
| 12 |
-
* **Description**: Generates speech audio from the provided text using the specified language and speaker.
|
| 13 |
|
| 14 |
### Query Parameters
|
| 15 |
|
| 16 |
-
| Parameter | Type | Required | Description
|
| 17 |
-
| --------- | ------ | -------- |
|
| 18 |
-
| `text` | string | Yes | The input text to be converted into speech
|
| 19 |
| `lang` | string | Yes | The language of the input text. Acceptable values include: `bhojpuri`, `bengali`, `english`, `gujarati`, `hindi`, `chhattisgarhi`, `kannada`, `magahi`, `maithili`, `marathi`, `telugu`. |
|
| 20 |
-
| `
|
| 21 |
-
|
| 22 |
-
### Available
|
| 23 |
-
|
| 24 |
-
| Language | Language codes |
|
| 25 |
-
|
|
| 26 |
-
| chhattisgarhi | hne |
|
| 27 |
-
| kannada | kn |
|
| 28 |
-
| maithili | mai |
|
| 29 |
-
| telugu | te |
|
| 30 |
-
| bengali | bn |
|
| 31 |
-
| bhojpuri | bho |
|
| 32 |
-
| marathi | mr |
|
| 33 |
-
| gujarati | gu |
|
| 34 |
-
| hindi | hi |
|
| 35 |
-
| magahi | mag
|
| 36 |
-
| english | en |
|
| 37 |
|
| 38 |
### Responses
|
| 39 |
|
| 40 |
* **200 OK**: Returns a WAV audio file as a streaming response containing the synthesized speech.
|
|
|
|
| 41 |
* **422 Unprocessable Entity**: Returned when:
|
| 42 |
|
| 43 |
-
* Any of the required query parameters (`text`, `lang`, `
|
| 44 |
* The specified `lang` is not supported.
|
| 45 |
-
* The specified `
|
| 46 |
|
| 47 |
|
| 48 |
|
|
@@ -150,7 +151,7 @@ base_url = 'http://localhost:8080/Get_Inference'
|
|
| 150 |
params = {
|
| 151 |
'text': 'ಮಾದರಿಯು ಸರಿಯಾಗಿ ಕಾರ್ಯನಿರ್ವಹಿಸುತ್ತಿದೆಯೇ ಎಂದು ಖಚಿತಪಡಿಸಿಕೊಳ್ಳಲು ಬಳಸಲಾಗುವ ಪರೀಕ್ಷಾ ವಾಕ್ಯ ಇದು.',
|
| 152 |
'lang': 'kannada',
|
| 153 |
-
'
|
| 154 |
}
|
| 155 |
|
| 156 |
# Send the GET request
|
|
@@ -166,4 +167,4 @@ else:
|
|
| 166 |
# Print the error message
|
| 167 |
print(f"Request failed with status code {response.status_code}")
|
| 168 |
print("Response:", response.text)
|
| 169 |
-
```
|
|
|
|
| 2 |
|
| 3 |
## Overview
|
| 4 |
|
| 5 |
+
This API provides a Text-to-Speech (TTS) service that converts input text into speech audio. It supports multiple Indian languages and offers voice customization through speaker references provided by the user .
|
| 6 |
|
| 7 |
---
|
| 8 |
|
| 9 |
## Endpoint: `/Get_Inference`
|
| 10 |
|
| 11 |
* **Method**: `GET`
|
| 12 |
+
* **Description**: Generates speech audio from the provided text using the specified language and speaker reference file.
|
| 13 |
|
| 14 |
### Query Parameters
|
| 15 |
|
| 16 |
+
| Parameter | Type | Required | Description |
|
| 17 |
+
| --------- | ------ | -------- | ----------- |
|
| 18 |
+
| `text` | string | Yes | The input text to be converted into speech.|
|
| 19 |
| `lang` | string | Yes | The language of the input text. Acceptable values include: `bhojpuri`, `bengali`, `english`, `gujarati`, `hindi`, `chhattisgarhi`, `kannada`, `magahi`, `maithili`, `marathi`, `telugu`. |
|
| 20 |
+
| `speaker_wav` | WAV file/Byte | Yes | Must be a WAV file |
|
| 21 |
+
|
| 22 |
+
### Available Languages
|
| 23 |
+
|
| 24 |
+
| Language | Language codes |
|
| 25 |
+
| --------- | ---------------- |
|
| 26 |
+
| chhattisgarhi | hne |
|
| 27 |
+
| kannada | kn |
|
| 28 |
+
| maithili | mai |
|
| 29 |
+
| telugu | te |
|
| 30 |
+
| bengali | bn |
|
| 31 |
+
| bhojpuri | bho |
|
| 32 |
+
| marathi | mr |
|
| 33 |
+
| gujarati | gu |
|
| 34 |
+
| hindi | hi |
|
| 35 |
+
| magahi | mag |
|
| 36 |
+
| english | en |
|
| 37 |
|
| 38 |
### Responses
|
| 39 |
|
| 40 |
* **200 OK**: Returns a WAV audio file as a streaming response containing the synthesized speech.
|
| 41 |
+
|
| 42 |
* **422 Unprocessable Entity**: Returned when:
|
| 43 |
|
| 44 |
+
* Any of the required query parameters (`text`, `lang`, `speaker_wav`) are missing.
|
| 45 |
* The specified `lang` is not supported.
|
| 46 |
+
* The specified `speaker_wav` is not available.
|
| 47 |
|
| 48 |
|
| 49 |
|
|
|
|
| 151 |
params = {
|
| 152 |
'text': 'ಮಾದರಿಯು ಸರಿಯಾಗಿ ಕಾರ್ಯನಿರ್ವಹಿಸುತ್ತಿದೆಯೇ ಎಂದು ಖಚಿತಪಡಿಸಿಕೊಳ್ಳಲು ಬಳಸಲಾಗುವ ಪರೀಕ್ಷಾ ವಾಕ್ಯ ಇದು.',
|
| 153 |
'lang': 'kannada',
|
| 154 |
+
'speaker_wav': AudioFile
|
| 155 |
}
|
| 156 |
|
| 157 |
# Send the GET request
|
|
|
|
| 167 |
# Print the error message
|
| 168 |
print(f"Request failed with status code {response.status_code}")
|
| 169 |
print("Response:", response.text)
|
| 170 |
+
```
|