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

# Get Audio Transcription

> Retrieve the transcription for an audio file

Retrieve the transcription data for a specific audio file, including word-level timestamps.

<CodeGroup>
  ```python Python theme={null}
  import videodb

  conn = videodb.connect(api_key="your_api_key")
  coll = conn.get_collection()
  audio = coll.get_audio("audio_id")

  # Get full transcript with timestamps
  transcript = audio.get_transcript()

  # Get transcript for a time range
  transcript = audio.get_transcript(start=10, end=60)

  # Segment by sentence
  transcript = audio.get_transcript(segmenter="sentence")

  # Get plain text transcript
  text = audio.get_transcript_text()
  ```

  ```javascript Node.js theme={null}
  import { connect } from 'videodb';

  const conn = connect({ apiKey: 'your_api_key' });
  const coll = await conn.getCollection();
  const audio = await coll.getAudio('audio_id');

  // Get full transcript with timestamps
  const transcript = await audio.getTranscript();

  // Get transcript for a time range
  const rangeTranscript = await audio.getTranscript({ start: 10, end: 60 });

  // Segment by sentence
  const sentenceTranscript = await audio.getTranscript({ segmenter: 'sentence' });

  // Get plain text transcript
  const text = await audio.getTranscriptText();
  ```
</CodeGroup>

<Note>
  * Use `start` and `end` parameters to retrieve a specific time range
  * Returns word-level timestamps for precise alignment
  * The `engine` parameter selects which transcription engine's output to retrieve
</Note>

<CardGroup cols={2}>
  <Card title="Create Transcription" icon="plus" href="/api-reference/audio/create_audio_transcription">
    Generate a new transcription
  </Card>

  <Card title="Get Audio" icon="music" href="/api-reference/audio/get_audio">
    Retrieve audio file details
  </Card>
</CardGroup>


## OpenAPI

````yaml GET /audio/{audio_id}/transcription/
openapi: 3.0.3
info:
  title: VideoDB Server API
  description: >
    VideoDB Server API for video, audio, and image processing with AI
    capabilities.

    This API provides comprehensive video management, search, indexing, and
    AI-powered features.
  version: 1.0.0
  contact:
    name: VideoDB Support
    url: https://videodb.io
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://api.videodb.io
    description: Production server
  - url: https://staging-api.videodb.io
    description: Staging server
security:
  - ApiKeyAuth: []
tags:
  - name: Authentication
    description: User authentication and API key management
  - name: Collections
    description: Collection management operations
  - name: Videos
    description: Video upload, processing, and management
  - name: Audio
    description: Audio management operations
  - name: Images
    description: Image management operations
  - name: Search
    description: Content search and indexing
  - name: AI Generation
    description: AI-powered content generation
  - name: Billing
    description: Billing and usage management
  - name: RTStream
    description: Real-time streaming operations
  - name: Utilities
    description: Utility endpoints
  - name: Meeting
    description: Meeting recording and management
  - name: Capture
    description: Capture session management for recording streams
  - name: Editor
    description: Timeline editor operations
  - name: Transcode
    description: Media transcoding operations
  - name: Assets
    description: Cross-collection asset listing
paths:
  /audio/{audio_id}/transcription/:
    get:
      tags:
        - Audio
      summary: Get audio transcription
      parameters:
        - name: audio_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^a-
            example: a-12345
        - name: engine
          in: query
          schema:
            type: string
            example: default
        - name: start
          in: query
          schema:
            type: number
            default: 0
            example: 0
        - name: end
          in: query
          schema:
            type: number
            default: -1
            example: 60
      responses:
        '200':
          description: Audio transcription data
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  status:
                    type: string
                    enum:
                      - completed
                      - processing
                      - failed
                    example: completed
                  data:
                    type: object
                    properties:
                      transcript:
                        type: array
                        items:
                          type: object
                          properties:
                            text:
                              type: string
                              example: Hello world
                            start:
                              type: number
                              example: 1.5
                            end:
                              type: number
                              example: 3.2
        '404':
          description: Transcription not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
          example: Error message
        error_code:
          type: string
          example: ERROR_CODE
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-access-token
      description: API key for authentication (sk-xxx format)

````