Upload a recording

Uploads audio and stores it as a recording on your account, converting it to WAV. For an ordinary upload the audio is also transcribed automatically: the transcript is stored in tts_text and becomes the description when you do not supply one. Sending tts_ssml instead marks the recording as text-to-speech and skips that transcription.

The file name decides whether this creates or replaces. The audio is stored under a file name made from the upload's name (file.name, or name when file is a plain string), cleaned up to a safe .wav name.

  • If the upload's name is already that clean .wav name and your account has a recording stored under it, this replaces that recording's audio and keeps its id, so everything that uses it plays the new audio (200).
  • Otherwise it creates a new recording (201). If the clean name is taken, the new recording gets the next free numbered name, such as greeting_2.wav: an upload never overwrites a different recording.
  • Send reject_duplicate: true to be refused (409) instead when your account already has a recording with that file name, or one whose name is the same ignoring case.

To replace a known recording's audio, use Update a recording.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required

Recording name; it is cleaned up before storage, and a name that cleans down to nothing is rejected with 400.

string
required

The audio, either as a base64 string (optionally a data:<mime>;base64, URI) or as an object with base64 data plus optional name and type; it is converted to WAV on the server.

string

Domain name — not an identifier — of the account to store the recording under; it is resolved by name, so send your own domain or omit the field to use your current account.

string

Description, truncated to 200 characters on a word boundary; defaults to the transcript, the text-to-speech text, or the name.

string | null

Speech markup; sending it marks the recording as text-to-speech and skips the automatic transcription.

string | null

Full spoken text, stored for text-to-speech recordings; for ordinary uploads the automatic transcript is stored here instead.

string | null

Label for the text-to-speech provider used.

string | null

Label for the text-to-speech voice used.

tts_editor_state
object | null

Opaque Speech Studio editor state, stored as-is.

boolean

When true, nothing is created or replaced if your account already has a recording stored under this file name, or one whose name is the same ignoring case: the answer is 409 Duplicate Recording. Defaults to false.

Responses

401

Missing or invalid API key.

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json