---
title: "Correct an audio clip's transcript and word timings"
method: PATCH
path: "/test_framework/v1/scenarios-external/{id}/condition-audio/{audio_id}/"
tags: ["test_framework"]
---

# Correct an audio clip's transcript and word timings

`PATCH /test_framework/v1/scenarios-external/{id}/condition-audio/{audio_id}/`

## Request

- Base URL: `https://api.cekura.ai`
- URL: `https://api.cekura.ai/test_framework/v1/scenarios-external/{id}/condition-audio/{audio_id}/`
- Auth: one of:
  - API key in header `X-CEKURA-API-KEY`
  - HTTP bearer
  - HTTP bearer

Correct an audio clip's transcript and word timings

## Path parameters

- `id` integer, required
- `audio_id` string, required

## Request body

- PatchedConditionAudioTranscript: Validates a hand-corrected transcript for one clip.
  - `transcript` string: What the clip actually says, as plain text. The testing agent records these words as what it said when the clip plays, and speaks them if the audio cannot be loaded. Only a clip whose status is `ready` can be edited; replacing its audio transcribes it again and discards the edit.
  - `words` ConditionAudioWord[]: Optional timings for the transcript, one entry per word in playback order, ending within the clip. Together the words must spell out the transcript, ignoring case, spacing and punctuation. Omit them to keep the clip's current timings when the word count is unchanged, or to spread the new words over the span the old ones covered.
    - `word` string, required
    - `start` number, double, required: Seconds from the start of the clip.
    - `end` number, double, required: Seconds from the start of the clip.

## Response `200`

- ConditionAudioEntry: Read serializer for one Scenario.condition_audio entry (a plain dict). The caller passes each entry dict with `audio_id` injected; fields are tolerant of missing keys. `previous_action` is intentionally not exposed (internal undo state for a clip that replaced a whole action).
  - `audio_id` string, nullable
  - `action` string, nullable
  - `condition_id` string: First condition referencing this clip, or null when no action references it. Kept for compatibility - prefer condition_ids.
  - `condition_ids` integer[]: Every condition referencing this clip, in authored order. Empty when the clip is uploaded but not referenced by any action yet.
  - `steps` string: Every step referencing this clip, as paths into the conditional actions (e.g. `first_message`, `conditions[1].then[0]`).
  - `tag` string: The reference to paste into an action, e.g. <audio id="greeting"/>
  - `status` string, nullable
  - `transcript` string, nullable
  - `words` ConditionAudioWord[]: The transcript's words with the time each is spoken in the clip. Absent until the clip has been transcribed.
    - `word` string, required
    - `start` number, double, required: Seconds from the start of the clip.
    - `end` number, double, required: Seconds from the start of the clip.
  - `duration` number, double, nullable
  - `filename` string, nullable
  - `timing_source` string, nullable: Where the word timings came from: `deepgram` (measured), `interpolated` (spread evenly), or `manual` (sent with a transcript edit).
  - `error` string, nullable
  - `updated_at` string, nullable
  - `playback_url` string: S3 URL of the recorded audio clip

## Other responses

- `400`
- `404`
- `409`

## Changes

- **2026-11-03** `a6fb6a739212`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/cekura/apis/cekura-api/changes/test_framework/v1/scenarios-external/:id/condition-audio/:audio_id/patch.md)

---

[API](https://skmtc.dev/cekura/apis/cekura-api.md) - [All operations](https://skmtc.dev/cekura/apis/cekura-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cekura/apis/cekura-api/revisions/a6fb6a739212?raw)
