Realtime TTS-2 is live. Built for realtime conversation that feels human. Learn more

PvcVoiceService

Upload PVC voice samples

Uploads one or more audio samples to a draft PVC voice. The request is all-or-nothing: if any file is rejected, none of the files in that request are saved. Only allowed while the voice is in state PVC_VOICE_STATE_DRAFT or PVC_VOICE_STATE_FAILED.

POST/voices/v1/pvcVoices/{voiceId}/samples

Call this endpoint as many times as you need. Samples accumulate on the voice until you train it.

A rejection (unsupported format, too large, etc.) drops the entire batch, including the valid files. Split it and retry with just the accepted files.

Format is detected from the file's byte content, not its declared MIME type or extension — renaming a file to .wav does not make it a WAV file.

Accepted audio

FormatNotes
WAVPCM (8/16/24/32-bit), 32-bit float, or WAVE_FORMAT_EXTENSIBLE
MP3
WEBMMust include a Duration element in its metadata

Rejected: A-law WAV, 12-bit WAV, .m4a, zero-byte files, truncated WAV files, and WEBM files missing Duration metadata.

Limits

LimitValue
Files per request10
Size per file1 GB
Combined sample storage per voice1 GB (1,000,000,000 bytes)
Samples per voice50
Concurrent uploads per accountplan-dependent

Uploading beyond these limits returns HTTP error code 400 (per-request/per-file/per-voice limits) or 429 (too many concurrent uploads).

For recording and preparation tips, see Voice Cloning best practices.

Authorizations

Authorizationstringrequired

Your API key. Read permissions are required for GET endpoints. Write permissions are required for POST, PATCH, and DELETE endpoints.

For Basic authentication, please populate Basic $INWORLD_API_KEY. You can create a key in one command with the Inworld CLI: inworld workspace add-key.

Path Parameters

voiceIdstringrequired

Voice ID of the draft PVC voice to add samples to.

Body

multipart/form-data

files[]string[]required

Audio files to upload, up to 10 per request. Repeat the files[] form field once per file (e.g. files[]=@"sample-01.wav", files[]=@"sample-02.wav"). It is not a single field containing a list. Accepted formats: WAV, WEBM, MP3. The actual byte content is sniffed to determine format, not the declared MIME type or file extension. Each file is capped at 1,000,000,000 bytes (1 GB); the voice's combined sample storage is capped at 1,000,000,000 bytes (1 GB) and 50 samples total.

remove_background_noiseboolean

Whether to run an audio isolation model over the uploaded samples to remove background noise before training. Can degrade quality on already-clean recordings. Defaults to false.

Response

200 - application/json

samplesobject[]

The samples accepted by this request, in the order they were uploaded.

Show child attributes

sampleIdstring

Sample ID. Use this value as {sampleId} when trimming or deleting the sample.

namestring

Resource name. Format: workspaces/{workspace}/pvcVoices/{voice}/samples/{sample}.

sizeBytesinteger

Size of the uploaded file, in bytes.

durationSecsnumber

Analyzed duration of the sample, in seconds, before any trim is applied.

mimeTypeenum<string>

Detected audio format, sniffed from the file's byte content.

Available options:audio/wavaudio/webmaudio/mpeg

hashstring

Base64-encoded MD5 of the stored object, for verifying upload integrity against the source file.

trimStartMsinteger

Trim start offset in milliseconds, if set.

trimEndMsinteger

Trim end offset in milliseconds, if set.