pvc-voices

Retrieve Voice Sample Audio

Changed on

Retrieve the first 30 seconds of voice sample audio with or without noise removal.

get/v1/voices/pvc/{voice_id}/samples/{sample_id}/audio

Request

  • Base URL
    https://api.elevenlabs.io (the document declares no server; this is the origin it was published from)
  • URL
    https://api.elevenlabs.io/v1/voices/pvc/{voice_id}/samples/{sample_id}/audio
  • Auth
    none declared

Path parameters

voice_idstring required

Voice ID to be used, you can use https://api.elevenlabs.io/v1/voices to list all the available voices.

Example:21m00Tcm4TlvDq8ikWAM
sample_idstring required

Sample ID to be used

Example:VW7YKqPnjY4h39yTbx2L

Query parameters

remove_background_noiseboolean

If set will remove background noise for voice samples using our audio isolation model. If the samples do not include background noise, it can make the quality worse.

Example:true

Headers

xi-api-keystring nullable

Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.

Response

Successful Response

audio_base_64string required

The base64 encoded audio.

voice_idstring required

The ID of the voice.

sample_idstring required

The ID of the sample.

media_typestring required

The media type of the audio.

duration_secsnumber nullable

The duration of the audio in seconds.

Example response

{
  "audio_base_64": "audio_base_64",
  "duration_secs": 5,
  "media_type": "audio/mpeg",
  "sample_id": "DCwhRBWXzGAHq8TQ4Fs18",
  "voice_id": "DCwhRBWXzGAHq8TQ4Fs18"
}

Changes

    • breaking

      removed the request body

    • info

      api operation id Retrieve_voice_sample_audio_v1_voices_pvc__voice_id__samples__sample_id__audio_get removed and replaced with get_pvc_sample_audio

    • info

      added the new optional query request parameter remove_background_noise

    • info

      endpoint added