SpireLab commited on
Commit
1a2ae06
·
verified ·
1 Parent(s): 6b1e70c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +27 -26
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 predefined male and female speaker references.
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
- | `speaker` | string | Yes | The desired speaker's voice. Format: `<language>_<gender>`. For example: `hindi_male`, `english_female`. Refer to the available speakers below. |
21
-
22
- ### Available Speakers
23
-
24
- | Language | Language codes | Male Speaker | Female Speaker |
25
- | ------------- | -------- | ------------------- | --------------------- |
26
- | chhattisgarhi | hne | chhattisgarhi\_male | chhattisgarhi\_female |
27
- | kannada | kn | kannada\_male | kannada\_female |
28
- | maithili | mai | maithili\_male | maithili\_female |
29
- | telugu | te | telugu\_male | telugu\_female |
30
- | bengali | bn | bengali\_male | bengali\_female |
31
- | bhojpuri | bho | bhojpuri\_male | bhojpuri\_female |
32
- | marathi | mr | marathi\_male | marathi\_female |
33
- | gujarati | gu | gujarati\_male | gujarati\_female |
34
- | hindi | hi | hindi\_male | hindi\_female |
35
- | magahi | mag | magahi\_male | magahi\_female |
36
- | english | en | english\_male | english\_female |
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`, `speaker`) are missing.
44
  * The specified `lang` is not supported.
45
- * The specified `speaker` is not available.
46
 
47
 
48
 
@@ -150,7 +151,7 @@ base_url = 'http://localhost:8080/Get_Inference'
150
  params = {
151
  'text': 'ಮಾದರಿಯು ಸರಿಯಾಗಿ ಕಾರ್ಯನಿರ್ವಹಿಸುತ್ತಿದೆಯೇ ಎಂದು ಖಚಿತಪಡಿಸಿಕೊಳ್ಳಲು ಬಳಸಲಾಗುವ ಪರೀಕ್ಷಾ ವಾಕ್ಯ ಇದು.',
152
  'lang': 'kannada',
153
- 'speaker': 'bengali_female'
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
+ ```