> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cekura.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Correct Scenario Condition Audio

> Correct an audio clip's transcript and word timings



## OpenAPI

````yaml patch /test_framework/v1/scenarios/{id}/condition-audio/{audio_id}/
openapi: 3.1.0
info:
  title: Cekura API
  version: v1
  description: >-
    Complete API documentation for the Cekura platform. This API provides
    endpoints for testing, observing, and evaluating AI voice agents — including
    managing agents, running evaluators, defining metrics, and analyzing call
    quality.
servers:
  - url: https://api.cekura.ai
security: []
paths:
  /test_framework/v1/scenarios/{id}/condition-audio/{audio_id}/:
    patch:
      tags:
        - test_framework
      summary: Correct an audio clip's transcript and word timings
      description: Correct an audio clip's transcript and word timings
      operationId: scenarios-v1-condition-audio-partial-update
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          description: A unique integer value identifying this scenario.
          required: true
        - in: path
          name: audio_id
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedConditionAudioTranscript'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedConditionAudioTranscript'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedConditionAudioTranscript'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConditionAudioEntry'
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  field_name:
                    type: array
                    items:
                      type: string
          description: ''
        '404':
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
          description: ''
        '409':
          content:
            application/json:
              schema:
                type: object
                properties:
                  field_name:
                    type: array
                    items:
                      type: string
          description: ''
      security:
        - api_key: []
        - oauth2: []
        - supabase_session: []
components:
  schemas:
    PatchedConditionAudioTranscript:
      type: object
      description: Validates a hand-corrected transcript for one clip.
      properties:
        transcript:
          type: string
          description: >-
            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.
          maxLength: 16384
        words:
          type: array
          items:
            $ref: '#/components/schemas/ConditionAudioWord'
          description: >-
            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.
    ConditionAudioEntry:
      type: object
      description: |-
        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).
      properties:
        audio_id:
          type:
            - string
            - 'null'
        action:
          type:
            - string
            - 'null'
        condition_id:
          type: string
          readOnly: true
          description: >-
            First condition referencing this clip, or null when no action
            references it. Kept for compatibility - prefer condition_ids.
        condition_ids:
          type: array
          items:
            type: integer
          description: >-
            Every condition referencing this clip, in authored order. Empty when
            the clip is uploaded but not referenced by any action yet.
        steps:
          type: string
          readOnly: true
          description: >-
            Every step referencing this clip, as paths into the conditional
            actions (e.g. `first_message`, `conditions[1].then[0]`).
        tag:
          type: string
          readOnly: true
          description: The reference to paste into an action, e.g. <audio id="greeting"/>
        status:
          type:
            - string
            - 'null'
        transcript:
          type:
            - string
            - 'null'
        words:
          type: array
          items:
            $ref: '#/components/schemas/ConditionAudioWord'
          description: >-
            The transcript's words with the time each is spoken in the clip.
            Absent until the clip has been transcribed.
        duration:
          type:
            - number
            - 'null'
          format: double
        filename:
          type:
            - string
            - 'null'
        timing_source:
          type:
            - string
            - 'null'
          description: >-
            Where the word timings came from: `deepgram` (measured),
            `interpolated` (spread evenly), or `manual` (sent with a transcript
            edit).
        error:
          type:
            - string
            - 'null'
        updated_at:
          type:
            - string
            - 'null'
        playback_url:
          type: string
          readOnly: true
          description: S3 URL of the recorded audio clip
    ConditionAudioWord:
      type: object
      description: One timed word of a clip.
      properties:
        word:
          type: string
          maxLength: 100
        start:
          type: number
          format: double
          minimum: 0
          description: Seconds from the start of the clip.
        end:
          type: number
          format: double
          minimum: 0
          description: Seconds from the start of the clip.
      required:
        - end
        - start
        - word
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: X-CEKURA-API-KEY
      description: >-
        API Key Authentication. It should be included in the header of each
        request.
    oauth2:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth access token issued by Cekura for connected apps.
    supabase_session:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Cekura dashboard session token. Not a customer API credential.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.