Python script which will segment an audio file locally or download from URL link and send the segment to OpenAI Whisper for Transcription
Ensure the following is installed:
- Python 3
- Pip (Python Package Installer)
- Clone the repository
-
git clone https://github.com/CodesInDarkness/OpenAI_AudioTranscription_Segment.git
-
- Navigate to the Project Directory
-
cd OpenAI_AudioTranscription_Segment
-
- Create a Python virtualenv
-
python -m venv env
-
- Use the current virtualenv (linux)
-
source env/bin/activate
-
- Install the required Python Libraries
-
pip install -r requirements.txt
-
- Add OpenAI API Key to .env file
-
nano .env
-
- In the file add the following Variable and include your OpenAI API Key
-
OPENAI_API_KEY=
-
Once the above requirements have been satisfied all you need to do is run the script. If you have a link or local file you will pass the full URL or full path to the file into the script when asked
To run the script all you need to do is call it:
python3 OpenAI_AudioTranscription_SegementAudio.py