This is a Python Azure Function that transcribes audio files using the Whisper speech recognition library.
- Clone this repository locally.
- Install the Azure Functions Core Tools if you haven't already.
- Install the Whisper library by running
pip install whisper
. - Open a terminal and navigate to the cloned repository.
- Run
func start
to start the function locally.
You can make a GET or POST request to the function URL with the following parameters:
file
(required): The URL of the audio file to transcribe.test_func
: A test parameter that can be set to any value to check that the function is running.
The function will return a plain text transcription of the audio file.
GET https://your-function-url.azurewebsites.net/api/transcribe?file=https://your-audio-file-url.mp3
This is the transcription text.
To deploy the function to Azure, follow these steps:
- Create an Azure Function App in the Azure Portal.
- Open the function app and navigate to Functions > Add.
- Select Python as the language and HTTP trigger as the template.
- Enter a name for the function and click Create.
- In the function settings, set the Runtime stack to Python and the Function app settings > Python version to 3.8.
- In the Platform features tab, select Deployment Center and choose a deployment method.
- Follow the instructions for your chosen deployment method.
This project is licensed under the MIT License - see the LICENSE file for details.