This project creates a web application for transcribing audio and video files using OpenAI's Whisper API. It is built with Streamlit, allowing users to upload files and receive transcriptions.
The aim of this project is to provide an easy-to-use interface for transcribing various audio and video file formats. It splits larger audio files into chunks to manage size constraints and delivers the transcription in both on-screen and downloadable text formats.
-
Clone the Repository
git clone [repository URL] cd [repository directory] -
Install Dependencies
This project requires Python 3. Ensure it is installed on your system. Then install the required packages using:
pip install -r requirements.txt
The
requirements.txtshould includestreamlit,python-dotenv,requests,pydub, and any other necessary packages. -
Set Up Environment Variables
You need to set up the Whisper API key. Create a
.envfile in the project root and add the following line:WHISPER_API_KEY=your_api_key_hereReplace
your_api_key_herewith your actual OpenAI API key.
-
Start the Streamlit App
Run the following command in the terminal:
streamlit run app.py
Replace
app.pywith the name of the main Python file, if different. -
Using the App
- The app will open in your default web browser.
- Upload an audio or video file (.wav, .mp3, .mp4, .avi, .mkv, .flv, .m4a).
- The app processes the file and displays the transcription on the screen.
- You can download the transcription as a text file.
Contributions are welcome. Please open an issue first to discuss what you would like to change or add.