> For the complete documentation index, see [llms.txt](https://docs.datasaur.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datasaur.ai/api/custom-asr.md).

# Custom ASR

Custom ASR enables users to integrate and test their own Automatic Speech Recognition (ASR) APIs with Datasaur projects. To enable this feature in your workspace, contact us at **<support@datasaur.ai>**.

## Configuring Custom ASR

### **Step 1: Set Up the Sample API**

1. Open the provided CodeSandbox example API [here](https://codesandbox.io/p/sandbox/datasaur-sample-custom-api-yf8g6p).
   * To test this code, you can also create a live endpoint using [codesandbox.io](http://codesandbox.io/).
2. Save any changes to the codebase to automatically create a fork for further testing and modifications.
3. Copy the **base URL** of the API from the CodeSandbox preview panel (on the right-hand side). In addition, you may need to ensure the panel is expanded if it’s collapsed.

   <figure><img src="/files/Jybo65OXlDPDKJ33J3Dt" alt=""><figcaption></figcaption></figure>
4. In the sample API that we provided, you can use the following endpoints based on your needs:
   * <mark style="color:red;">`{baseUrl}/text-extraction/example-text`</mark> (returns plain text transcription).
   * <mark style="color:red;">`{baseUrl}/text-extraction/example-json`</mark> (returns Importable JSON transcription).

### **Step 2: Add Custom API in Project Creation Wizard**

1. Go to the **Active projects** page and click **“Create project".**

   <figure><img src="/files/gYW4yM2q8qOeysCEEBD5" alt=""><figcaption></figcaption></figure>
2. In **Step 1: Upload**, upload your image/PDF (for OCR) or audio file (for ASR) and click **Next.**
3. In **Step 2: Preview**, click the dropdown labeled **“Apply ASR Method”** (or **“Apply OCR Method”** for images/PDFs).

   <figure><img src="/files/DwvZK1HvArzL583CSunJ" alt=""><figcaption></figcaption></figure>
4. Select **“+ Add New API…”** to open a dialog box.

   <figure><img src="/files/4zugpQLIkps6kNyBeb8C" alt=""><figcaption></figcaption></figure>

   * Fill in the fields:

     * **Name:** Desired name for the API.
     * **Custom API URL:** Paste one of the two endpoints from our sample API.
     * **Secret:** Add any placeholder value (this can be ignored for now).

     <figure><img src="/files/0DICv6xvSRQjmSzyQvif" alt=""><figcaption></figcaption></figure>
5. Click **Save** to add and select the API.
6. Review the sample transcription on the right panel.

   <figure><img src="/files/ZkK54C6DPOtIQiOLzsyz" alt=""><figcaption></figcaption></figure>

### **Step 3: Create the Project**

Once the API is added, complete the remaining project configuration steps to create the project and use the transcription results.

<figure><img src="/files/E30ex9h0C9o8GgQ6ea5r" alt=""><figcaption></figcaption></figure>

## ASR Sample File

{% file src="/files/oh9X3kCQDbClNrQD64FF" %}

{% file src="/files/O4k4Z20NRHx5OB38ExeJ" %}

## Whisper ASR Limitations

<table data-full-width="false"><thead><tr><th width="263">Factor</th><th>Description</th></tr></thead><tbody><tr><td>Accepted file formats</td><td>.wav, .mp3, .m4a</td></tr><tr><td>Maximum individual file size</td><td>25 MB</td></tr><tr><td>Request limit (Azure)</td><td>100 RPM</td></tr><tr><td>Request timeout</td><td>10 minutes</td></tr><tr><td>Maximum API call retries</td><td>2 retries on request errors (e.g., rate limit reached, timeout).</td></tr></tbody></table>

## Amazon Transcribe ASR Limitations

<table><thead><tr><th width="272.546875">Factor</th><th>Description</th></tr></thead><tbody><tr><td>Accepted file formats</td><td>.flac, .m4a, .mp3, .wav</td></tr><tr><td>Maximum individual file size</td><td>130 MB</td></tr><tr><td>Maximum audio duration</td><td>14,400 seconds</td></tr></tbody></table>
