Skip to main content
POST /v3/models/audio/sts takes a recording of someone speaking and returns the same speech in a voice from your workspace. The words and timing stay the same. You get one WAV, as long as the recording. voice_id must be an ACTIVE instant voice in your workspace. Professional voice clones are not supported yet. API keys need the voices:write permission. Each workspace member can send 30 requests per minute.

Request fields

About the recording:
  • It can be up to 300 seconds long.
  • It can be up to 100 MB as an uploaded asset, 32 MB by URL, or 16 MB as inline base64.
  • WAV, MP3, FLAC, OGG, M4A, and AAC work. For inline base64, set media_type, such as audio/wav or audio/mpeg.
  • A URL must be public HTTPS, point at the file itself, and download within 60 seconds.
  • Send clear speech. A recording that can’t be read or converted returns 400 with param set to audio.
Unknown fields and invalid values return 400 invalid_parameter, with param set to that field.

Convert speech

Response
The request stays open until the WAV is ready, for up to 150 seconds, so no polling is needed. Set your client timeout to at least 160 seconds. duration is in seconds and matches the recording. Successful responses include an X-Request-Id header; use it to match usage records. The first conversion with a voice can take longer while HeyGen prepares the voice for speech to speech. If that runs long, the request returns 409 voice_not_ready with a Retry-After header. Send the same request again after that delay. You are charged by the length of the output audio, per second. A request that fails, or that you close before the audio is ready, is not charged.

Errors