This Python script provides a simple interface to transcribe audio files using the OpenAI API's speech-to-text functionality, powered by the Whisper model. The result can be returned to the console as text or VTT (WebVTT) format.
Before using the script, make sure to install the OpenAI Python client library. You can install it using pip:
pip install openai
Clone this repository:
git clone https://github.com/ffm5113/python_openai_whisper.git
Navigate to the project directory:
cd your_repository
Run the script:
python whisper_local.py
Follow the prompts to enter the file path of the audio file and choose the desired response format (text or vtt).
Note: To access the OpenAI API, you will need an API key. File size is limited to 25 MB. Please refer to the OpenAI API documentation for instructions on how to obtain and use the API key.
- OpenAI API Reference - Refer to the official documentation for more details on the OpenAI audio API.
- Whisper Model Repository - Repository for the open source Whisper model that powers the OpenAI API.
- Introducing Whisper - Learn more about the Whisper model on the OpenAI website.
This project is licensed under the MIT License - see the LICENSE file for details.