# Transcribe — From audio file

```
POST 
/transcribe
```

Generate a transcript from an audio file. Only `audio/*` mime types are supported. The maximum duration is 10 minutes. If you have longer files, please use the [asynchronous equivalent](/core-api/reference/2024-04-22/server/transcribe-async.md).

## Request[​](#request "Direct link to Request")

* multipart/form-data

### Body**required**

* ******request\_parameters** objectrequired

  The object containing all the information needed along with the audio file to transcribe.

  **speech\_locale**speech\_locale (string)required

  The spoken or written locale of the transcript, representing both the language and its specific regional variant.

  **Possible values:** \[`ENGLISH_US`, `ENGLISH_UK`, `SPANISH_ES`, `SPANISH_MX`, `FRENCH_FR`, `ARABIC_EG`, `ARABIC_LB`, `ARABIC_MA`, `ARABIC_SA`, `ARMENIAN_AM`, `BENGALI_IN`, `CANTONESE_CN`, `CROATIAN_HR`, `FILIPINO_PH`, `GERMAN_DE`, `GREEK_GR`, `GUJARATI_IN`, `HEBREW_IL`, `HINDI_IN`, `ITALIAN_IT`, `JAPANESE_JP`, `KHMER_KH`, `KOREAN_KR`, `MANDARIN_CN`, `PERSIAN_IR`, `POLISH_PL`, `PORTUGUESE_PT`, `PUNJABI_IN`, `RUSSIAN_RU`, `SERBIAN_RS`, `TAMIL_IN`, `TELUGU_IN`, `THAI_TH`, `URDU_IN`, `VIETNAMESE_VN`]

  **Example:<!-- -->&#x20;**`ENGLISH_US`

  **split\_by\_sentence**boolean

  Indicates whether to segment transcription results at sentence boundaries. Default is false, meaning that a single transcript item may encompass multiple sentences, provided they are not delineated by pauses (silence) in the audio.

  **Default value:<!-- -->&#x20;**`false`

  **file**binaryrequired

## Responses[​](#responses "Direct link to Responses")

* 200

Results of processing the audio file.

* application/json

- Schema
- Example (from schema)

**Schema**

* ******transcript**object\[]required

  Array \[

* **text**stringrequired

  The transcribed text.

  **Example:<!-- -->&#x20;**`Also, I’m allergic to peanuts.`

  **speaker**copilot\_speaker (string)required

  Who said the text in this transcript item.

  **Possible values:** \[`doctor`, `patient`, `unspecified`]

  **Example:<!-- -->&#x20;**`doctor`

  **start\_offset\_ms**integerrequired

  Start time of this transcription item as the offset, in milliseconds, from the start of the audio file.

  **Example:<!-- -->&#x20;**`65100`

  **end\_offset\_ms**integerrequired

  End time of this transcription item as the offset, in milliseconds, from the start of the audio file. Equals the `start_time_ms` plus the duration of the related transcribed audio portion.

  **Example:<!-- -->&#x20;**`69300`

  ]

```
{

  "transcript": [

    {

      "text": "Also, I’m allergic to peanuts.",

      "speaker": "doctor",

      "start_offset_ms": 65100,

      "end_offset_ms": 69300

    }

  ]

}
```

## Operation spec

```json
{
  "method": "post",
  "path": "/transcribe",
  "operationId": "transcribe",
  "requestBody": {
    "required": true,
    "content": {
      "multipart/form-data": {
        "schema": {
          "type": "object",
          "properties": {
            "request_parameters": {
              "type": "object",
              "description": "The object containing all the information needed along with the audio file to transcribe.",
              "properties": {
                "speech_locale": {
                  "type": "string",
                  "description": "The spoken or written locale of the transcript, representing both the language and its specific regional variant.",
                  "enum": [
                    "ENGLISH_US",
                    "ENGLISH_UK",
                    "SPANISH_ES",
                    "SPANISH_MX",
                    "FRENCH_FR",
                    "ARABIC_EG",
                    "ARABIC_LB",
                    "ARABIC_MA",
                    "ARABIC_SA",
                    "ARMENIAN_AM",
                    "BENGALI_IN",
                    "CANTONESE_CN",
                    "CROATIAN_HR",
                    "FILIPINO_PH",
                    "GERMAN_DE",
                    "GREEK_GR",
                    "GUJARATI_IN",
                    "HEBREW_IL",
                    "HINDI_IN",
                    "ITALIAN_IT",
                    "JAPANESE_JP",
                    "KHMER_KH",
                    "KOREAN_KR",
                    "MANDARIN_CN",
                    "PERSIAN_IR",
                    "POLISH_PL",
                    "PORTUGUESE_PT",
                    "PUNJABI_IN",
                    "RUSSIAN_RU",
                    "SERBIAN_RS",
                    "TAMIL_IN",
                    "TELUGU_IN",
                    "THAI_TH",
                    "URDU_IN",
                    "VIETNAMESE_VN"
                  ],
                  "example": "ENGLISH_US",
                  "title": "speech_locale"
                },
                "split_by_sentence": {
                  "type": "boolean",
                  "default": false,
                  "description": "Indicates whether to segment transcription results at sentence boundaries. Default is false, meaning that a single transcript item may encompass multiple sentences, provided they are not delineated by pauses (silence) in the audio."
                }
              },
              "required": [
                "speech_locale"
              ],
              "title": "transcribe_request"
            },
            "file": {
              "type": "string",
              "format": "binary"
            }
          },
          "required": [
            "request_parameters",
            "file"
          ]
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Results of processing the audio file.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "transcript": {
                "type": "array",
                "description": "Transcript items from the audio file.",
                "items": {
                  "type": "object",
                  "description": "A portion of the transcribed consultation.",
                  "properties": {
                    "text": {
                      "type": "string",
                      "description": "The transcribed text.",
                      "example": "Also, I’m allergic to peanuts."
                    },
                    "speaker": {
                      "type": "string",
                      "enum": [
                        "doctor",
                        "patient",
                        "unspecified"
                      ],
                      "description": "Who said the text in this transcript item.",
                      "example": "doctor",
                      "title": "copilot_speaker"
                    },
                    "start_offset_ms": {
                      "type": "integer",
                      "description": "Start time of this transcription item as the offset, in milliseconds, from the start of the audio file.",
                      "example": 65100
                    },
                    "end_offset_ms": {
                      "type": "integer",
                      "description": "End time of this transcription item as the offset, in milliseconds, from the start of the audio file. Equals the `start_time_ms` plus the duration of the related transcribed audio portion.",
                      "example": 69300
                    }
                  },
                  "required": [
                    "text",
                    "speaker",
                    "start_offset_ms",
                    "end_offset_ms"
                  ],
                  "title": "copilot_transcript_item"
                },
                "title": "copilot_transcript"
              }
            },
            "required": [
              "transcript"
            ],
            "title": "transcribe_response"
          }
        }
      }
    }
  }
}
```
