> ## Documentation Index
> Fetch the complete documentation index at: https://vastai-80aa3a82-auto-openapi-update-666a1d71.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Whisper ASR Guide

**Whisper** is a general-purpose speech recognition model trained on a large dataset of diverse audio. Go through the [Readme](https://cloud.vast.ai/template/readme/0c0c7d65cd4ebb2b340fbce39879703b) first before using.&#x20;

**Connecting to the Instance**

1. Go to the templates tab and search for “*Whisper*” or click the provided link to the template [here](https://cloud.vast.ai/?ref_id=62897\&creator_id=62897\&name=Whisper%20ASR%20Webservice) .&#x20;
2. After you select the template by pressing the triangle button the next step is to choose a gpu.

<img src="https://mintcdn.com/vastai-80aa3a82-auto-openapi-update-666a1d71/8IqlWaGzZl7O495v/images/use-cases-audio-to-text.png?fit=max&auto=format&n=8IqlWaGzZl7O495v&q=85&s=b28cc41973a22c81b0d9a88cc9e11c64" alt="" width="1166" height="1088" data-path="images/use-cases-audio-to-text.png" />

3\. **Select a GPU Offering **

<img src="https://mintcdn.com/vastai-80aa3a82-auto-openapi-update-666a1d71/8IqlWaGzZl7O495v/images/use-cases-audio-to-text-2.png?fit=max&auto=format&n=8IqlWaGzZl7O495v&q=85&s=f06d7b3dafe9eae763810451d959b532" alt="" width="1265" height="670" data-path="images/use-cases-audio-to-text-2.png" />

The template you selected will give your instance access to both Jupyter and SSH. Additionally the Open button will connect you to the instance portal web interface.&#x20;

4\. HTTP and token-based auth are both enabled by default. To avoid certificate errors in your browser, please follow the instructions for installing the TLS certificate [here](/guides/instances/jupyter#1SmCz) to allow secure HTTPS connections to your instance via its IP.&#x20;

<img src="https://mintcdn.com/vastai-80aa3a82-auto-openapi-update-666a1d71/8IqlWaGzZl7O495v/images/use-cases-audio-to-text-3.png?fit=max&auto=format&n=8IqlWaGzZl7O495v&q=85&s=130d475b55c2452c8fba1e00ae88f140" alt="" width="896" height="216" data-path="images/use-cases-audio-to-text-3.png" />

5\. Use the open button to open up the instance, if you are not using the open button the default username will be: vastai , and the password will be the value of the environment variable:* OPEN\_BUTTON\_TOKEN*. You can also find the token value by accessing the terminal and executing this command: *echo \$OPEN\_BUTTON\_TOKEN*

<img src="https://mintcdn.com/vastai-80aa3a82-auto-openapi-update-666a1d71/8IqlWaGzZl7O495v/images/use-cases-audio-to-text-4.png?fit=max&auto=format&n=8IqlWaGzZl7O495v&q=85&s=5115c6022cbff23ede5f448e197ec874" alt="" width="1280" height="489" data-path="images/use-cases-audio-to-text-4.png" />

6\. After accessing the SwaggerUi by clicking the triangle button first then waiting for the page to load, then clicking into the link aligning with SwaggerUI you should see the page below. (note: usually loads fast but can take 5-10 minutes)&#x20;

<img src="https://mintcdn.com/vastai-80aa3a82-auto-openapi-update-666a1d71/8IqlWaGzZl7O495v/images/use-cases-audio-to-text-5.png?fit=max&auto=format&n=8IqlWaGzZl7O495v&q=85&s=b9e147efffdcef52aabe1d8855715a42" alt="" width="1154" height="601" data-path="images/use-cases-audio-to-text-5.png" />

**Usage**

Two POST endpoints are exposed in this template:

**/detect-language**

Use this endpoint to automatically detect the spoken language in a given audio file.

<img src="https://mintcdn.com/vastai-80aa3a82-auto-openapi-update-666a1d71/8IqlWaGzZl7O495v/images/use-cases-audio-to-text-6.png?fit=max&auto=format&n=8IqlWaGzZl7O495v&q=85&s=ef2e557fe14f7ff3284a809c69098f83" alt="" width="1109" height="942" data-path="images/use-cases-audio-to-text-6.png" />

**/asr**

Use this endpoint for both transcription and translation of audio files.

*Both of these endpoints are documented using the OpenAPI standard and can be tested in a web browser. *

<img src="https://mintcdn.com/vastai-80aa3a82-auto-openapi-update-666a1d71/8IqlWaGzZl7O495v/images/use-cases-audio-to-text-7.png?fit=max&auto=format&n=8IqlWaGzZl7O495v&q=85&s=6f5ccc31fe02592cee810bd292afd808" alt="" width="1111" height="1048" data-path="images/use-cases-audio-to-text-7.png" />

7\. *Select the detect language endpoint*

8\. *Then click try it out. *

<img src="https://mintcdn.com/vastai-80aa3a82-auto-openapi-update-666a1d71/8IqlWaGzZl7O495v/images/use-cases-audio-to-text-8.png?fit=max&auto=format&n=8IqlWaGzZl7O495v&q=85&s=765afc0a1409f81f561664967e0112ef" alt="" width="1099" height="105" data-path="images/use-cases-audio-to-text-8.png" />

9.* From here upload an audio clip*&#x20;

10\. *Then press the execute button. *

<img src="https://mintcdn.com/vastai-80aa3a82-auto-openapi-update-666a1d71/8IqlWaGzZl7O495v/images/use-cases-audio-to-text-9.png?fit=max&auto=format&n=8IqlWaGzZl7O495v&q=85&s=6a473ab54189430483ac7443ee1bfba4" alt="" width="1109" height="385" data-path="images/use-cases-audio-to-text-9.png" />

11.* If you look in the response body (see below) you can see it was able to detect the language was English.*&#x20;

*Note: If you are getting an internal 500 error its most likely the file you selected to upload is to large. *

<img src="https://mintcdn.com/vastai-80aa3a82-auto-openapi-update-666a1d71/8IqlWaGzZl7O495v/images/use-cases-audio-to-text-10.png?fit=max&auto=format&n=8IqlWaGzZl7O495v&q=85&s=40f853dd70f1e9e16acc006bea567556" alt="" width="800" height="601" data-path="images/use-cases-audio-to-text-10.png" />

*For more information and specifics on things such as but not limited to Configuration, Additional Functionality, Instance Logs, Cloudflared, Api request, ssh tunnels and port reference mapping, and Caddy you can visit the*[ Readme linked here to learn more. ](https://cloud.vast.ai/template/readme/0c0c7d65cd4ebb2b340fbce39879703b)

**Links**

* [GitHub Repository](https://github.com/ahmetoner/whisper-asr-webservice/)
* [Docker Image](https://hub.docker.com/r/onerahmet/openai-whisper-asr-webservice)
