Skip to content

Commit 5ce9f93

Browse files
authored
Merge pull request #2 from joshbuker/patch-1
Add curl examples to README.md
2 parents fd61433 + 707a723 commit 5ce9f93

File tree

1 file changed

+36
-9
lines changed

1 file changed

+36
-9
lines changed

README.md

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,47 @@ Assuming you have docker installed and setup
5252

5353
##### Use Environment Defaults
5454

55-
{
56-
"text": "Put input here"
57-
}
55+
###### Post body:
56+
```
57+
{
58+
"text": "Put input here"
59+
}
60+
```
61+
62+
###### Example curl command:
63+
```sh
64+
curl http://localhost:8888/convert/tts \
65+
--header "Content-Type: application/json" \
66+
-d '{ "text": "Put input here" }' \
67+
--output "example.wav"
68+
```
5869

5970
Response: .wav
6071

6172
##### Customize (Everything except for "text" is optional)
6273

63-
{
64-
"text": "input",
65-
"speed": "speed",
66-
"language": "language",
67-
"speaker_id": "speaker_id"
68-
}
74+
###### Post body:
75+
```
76+
{
77+
"text": "input",
78+
"speed": "speed",
79+
"language": "language",
80+
"speaker_id": "speaker_id"
81+
}
82+
```
83+
84+
###### Example curl command:
85+
```sh
86+
curl http://localhost:8888/convert/tts \
87+
--header "Content-Type: application/json" \
88+
-d '{
89+
"text": "Put input here",
90+
"speed": "0.5",
91+
"language": "EN",
92+
"speaker_id": "EN-BR"
93+
}' \
94+
--output "example.wav"
95+
```
6996

7097
Response: .wav
7198

0 commit comments

Comments
 (0)