mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-09-29 15:15:27 -07:00
Update README to reflect API endpoint changes and enhance profile creation example
- Updated API endpoints from `/api/...` to `/...` for consistency. - Modified the speech generation example to include a language parameter. - Revised the profile creation example to use JSON format instead of form data.
This commit is contained in:
@@ -147,17 +147,17 @@ Voicebox exposes a full REST API, so you can integrate voice synthesis into your
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Generate speech
|
# Generate speech
|
||||||
curl -X POST http://localhost:8000/api/generate \
|
curl -X POST http://localhost:8000/generate \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{"text": "Hello world", "profile_id": "abc123"}'
|
-d '{"text": "Hello world", "profile_id": "abc123", "language": "en"}'
|
||||||
|
|
||||||
# List voice profiles
|
# List voice profiles
|
||||||
curl http://localhost:8000/api/profiles
|
curl http://localhost:8000/profiles
|
||||||
|
|
||||||
# Create a profile from audio
|
# Create a profile
|
||||||
curl -X POST http://localhost:8000/api/profiles \
|
curl -X POST http://localhost:8000/profiles \
|
||||||
-F "[email protected]" \
|
-H "Content-Type: application/json" \
|
||||||
-F "name=My Voice"
|
-d '{"name": "My Voice", "language": "en"}'
|
||||||
```
|
```
|
||||||
|
|
||||||
**Use cases:**
|
**Use cases:**
|
||||||
|
|||||||
Reference in New Issue
Block a user