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

# Audio Transcribe

> Processes an audio file to generate a transcription of the spoken content with support for language detection, translation, and multiple output formats.



## OpenAPI

````yaml POST /v1/audio_transcribe
openapi: 3.1.0
info:
  title: WAV API
  version: 1.0.0
  description: API for retrieving conversion details by ID.
servers:
  - url: https://api.wav.com/api/public
    description: Production server
security: []
paths:
  /v1/audio_transcribe:
    post:
      summary: Transcribe Audio to Text
      description: >-
        Processes an audio file to generate a transcription of the spoken
        content with support for language detection, translation, and multiple
        output formats.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                audio_url:
                  type: string
                  description: 'Input audio URL (supported format: YouTube URL).'
                  example: https://example.com/audio.mp3
                audio_file:
                  type: string
                  format: binary
                  description: Audio file to upload and process directly.
                language:
                  type: string
                  description: Language spoken in the audio (empty for auto-detection).
                  example: en
                translate:
                  type: boolean
                  description: Whether to translate the transcription to English.
                  example: false
                transcription_format:
                  type: string
                  description: Format of the transcribed output.
                  enum:
                    - plain_text
                    - formatted_text
                    - srt
                    - vtt
                  example: plain_text
                translation_format:
                  type: string
                  description: Format of the translated output (currently unused).
                  enum:
                    - plain_text
                    - formatted_text
                    - srt
                    - vtt
                  example: plain_text
                word_timestamps:
                  type: boolean
                  description: Whether to include word-level timestamps.
                  example: false
                webhook_url:
                  type: string
                  description: Callback URL for async processing results.
                  example: http://your-webhook-url.com/callback
              anyOf:
                - required:
                    - audio_url
                - required:
                    - audio_file
      responses:
        '200':
          description: Successfully initiated task
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  task_id:
                    type: string
                  conversion_id:
                    type: string
                  eta:
                    type: integer
                  credit_estimate:
                    type: number
                  message:
                    type: string
                  status:
                    type: string
                example:
                  success: true
                  task_id: cade1dea-a9fb-49d3-a5b2-52f786ea5ad3
                  conversion_id: 1c5a2543-5b99-499c-8bb4-28424497e60f
                  eta: 46
                  credit_estimate: 0.04
                  message: ''
                  status: IN_QUEUE
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Internal Server Error
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: Python
          source: >-
            import requests


            url = "https://api.wav.com/api/public/v1/audio_transcribe"

            headers = {"Authorization": "<API_KEY>"}


            payload = {
                "language": "en",
                "translate": True,
                "transcription_format": "plain_text",
                "word_timestamps": True
            }


            # Option 1: audio_url

            payload["audio_url"] = "<YOUR_AUDIO_URL>"

            response = requests.post(url, headers=headers, data=payload)


            # Option 2: File Upload

            # with open("audio.mp3", "rb") as f:

            #     files = {"audio_file": f}

            #     response = requests.post(url, headers=headers, data=payload,
            files=files)


            print(response.json())
        - lang: PHP
          source: |-
            <?php
            $url = 'https://api.wav.com/api/public/v1/audio_transcribe';
            $headers = ['Authorization: <API_KEY>'];

            $data = [
                'language' => 'en',
                'translate' => true,
                'transcription_format' => 'srt',
                'word_timestamps' => true
            ];

            // Option 1: audio_url
            $data['audio_url'] = '<YOUR_AUDIO_URL>';

            // Option 2: File Upload
            // $data['audio_file'] = new CURLFile('audio.mp3');

            $ch = curl_init($url);
            curl_setopt($ch, CURLOPT_POST, true);
            curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
            curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            $response = curl_exec($ch);
            curl_close($ch);
            echo $response;
        - lang: Go
          source: "package main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"mime/multipart\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\turl := \"https://api.wav.com/api/public/v1/audio_transcribe\"\n\tapiKey := \"<API_KEY>\"\n\n\tbody := &bytes.Buffer{}\n\twriter := multipart.NewWriter(body)\n\n\twriter.WriteField(\"language\", \"en\")\n\twriter.WriteField(\"translate\", \"true\")\n\twriter.WriteField(\"transcription_format\", \"srt\")\n\twriter.WriteField(\"word_timestamps\", \"true\")\n\n\t// Option 1: audio_url\n\twriter.WriteField(\"audio_url\", \"<YOUR_AUDIO_URL>\")\n\n\t// Option 2: File Upload\n\t// file, _ := os.Open(\"audio.mp3\")\n\t// defer file.Close()\n\t// part, _ := writer.CreateFormFile(\"audio_file\", \"audio.mp3\")\n\t// io.Copy(part, file)\n\n\twriter.Close()\n\n\treq, _ := http.NewRequest(\"POST\", url, body)\n\treq.Header.Add(\"Authorization\", apiKey)\n\treq.Header.Add(\"Content-Type\", writer.FormDataContentType())\n\n\tresp, _ := http.DefaultClient.Do(req)\n\tdefer resp.Body.Close()\n\n\tresponse, _ := io.ReadAll(resp.Body)\n\tfmt.Println(string(response))\n}"
        - lang: Java
          source: // Java example omitted for brevity. Request if needed.
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````