docs: align voice studio upload contract
This commit is contained in:
parent
44962e70c6
commit
96412f7629
2 changed files with 14 additions and 6 deletions
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
|
|
@ -33,9 +33,9 @@ Voice files continue to live exclusively under `VOICES_DIR`.
|
|||
- `GET /v1/voices` returns safe metadata for each managed file: relative name,
|
||||
byte size, duration, sample rate, and channel count.
|
||||
- `POST /v1/voices` accepts a multipart `file` upload. The server sanitizes
|
||||
the filename, rejects paths and collisions, accepts WAV only in this first
|
||||
release, validates that the decoded audio is nonempty, and saves inside
|
||||
`VOICES_DIR` only.
|
||||
the filename for storage and display, rejects paths and collisions, accepts
|
||||
WAV only in this first release, validates that the decoded audio is nonempty,
|
||||
and saves inside `VOICES_DIR` only.
|
||||
- `DELETE /v1/voices/{name}` deletes one validated, regular file below
|
||||
`VOICES_DIR`; it rejects traversal, absolute paths, symlink escapes, and
|
||||
missing files.
|
||||
|
|
@ -51,9 +51,17 @@ before handing it to the model manager.
|
|||
## Error handling and safety
|
||||
|
||||
All API failures are JSON with a clear 4xx/5xx detail. The UI renders these as
|
||||
inline messages. Deletion requires a confirmation click but no login. The
|
||||
upload limit is 20 MiB. Uploaded audio is never committed to Git; the existing
|
||||
`voices/*` ignore rule remains in place.
|
||||
inline messages. Deletion requires a confirmation click but no login. Uploads
|
||||
are WAV only and capped at 20 MiB. Uploaded audio is never committed to Git;
|
||||
the existing `voices/*` ignore rule remains in place.
|
||||
|
||||
## Rollout order
|
||||
|
||||
1. Implement the voice-management API and its path-safety, validation, and
|
||||
deletion tests.
|
||||
2. Update the speech endpoint only as needed to consume the stored relative
|
||||
filename selected by the UI, retaining its OpenAI-compatible response.
|
||||
3. Add the two-column studio and wire it to the tested API.
|
||||
|
||||
## Verification
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue