test_framework

Upload an audio clip to an evaluator

Changed on

Add an audio clip to this scenario. The clip is transcoded to 24kHz mono PCM WAV, stored, and transcribed asynchronously. Give it a name to reference it as <audio id="name"/> from any number of verbatim steps; omit it and a readable name is derived from the filename, the same convention the editor uses. Pass condition_id to also insert that tag into one condition, with action_template choosing the insertion point. Send the file as multipart/form-data, or as application/json with file_name and base64 content_base64.

post/test_framework/v2/scenarios/{id}/condition-audio/

Request

  • Base URL
    https://api.cekura.ai
  • URL
    https://api.cekura.ai/test_framework/v2/scenarios/{id}/condition-audio/
  • Auth
    • API key in header X-CEKURA-API-KEY
    • or HTTP bearer
    • or HTTP bearer

Path parameters

idinteger required

A unique integer value identifying this scenario.

Request body

file_namestring required

Filename including its extension: wav, mp3, m4a, ogg, webm or flac.

content_base64string byte required

Base64-encoded audio, max 25 MB decoded. Accepts a raw base64 string or a data:<mime>;base64,... data URI.

namestring
condition_idinteger
action_templatestring
replace_audio_idstring

Response

audio_idstring nullable
actionstring nullable
condition_idstring

First condition referencing this clip, or null when no action references it. Kept for compatibility - prefer condition_ids.

condition_idsinteger[]

Every condition referencing this clip, in authored order. Empty when the clip is uploaded but not referenced by any action yet.

stepsstring

Every step referencing this clip, as paths into the conditional actions (e.g. first_message, conditions[1].then[0]).

tagstring

The reference to paste into an action, e.g. <audio id="greeting"/>

statusstring nullable
transcriptstring nullable
durationnumber double nullable
filenamestring nullable
timing_sourcestring nullable

Where the word timings came from: deepgram (measured), interpolated (spread evenly), or manual (sent with a transcript edit).

errorstring nullable
updated_atstring nullable
playback_urlstring

S3 URL of the recorded audio clip

Changes