Turn audio into text effortlessly.
Audio transcription powered by OpenAI's Whisper API.
Click to collapse/expand
Whisper_Transcriber
is a Python CLI tool designed to transcribe audio files using OpenAI's Whisper API. It handles the entire transcription process, from audio validation to output generation.
Whisper_Transcriber
was originally developed to work alongsideaudio_splitter
, which splits large audio files into smaller parts before transcription. Together, they provide a complete and efficient workflow โ split & transcribe โ ideal for long recordings and managing Whisper API limitations and costs.
- โ Transcribe audio files using OpenAI's Whisper API.
- โ Automatic language detection or manual selection (French / English).
- โ Export transcriptions as JSON files (optional).
Before getting started, make sure you meet the following prerequisites.
- Python 3: Ensure Python 3 is installed on your system.
โ ๏ธ Note:Whisper_Transcriber
has been tested on Python 3.11.10 under Linux. While it might work on other versions or operating systems, compatibility is officially guaranteed only for this specific setup.
- Dependencies: Install the required Python dependencies using pip:
pip install -r requirements.txt
โ ๏ธ Note:Whisper_Transcriber
requires a valid OpenAI API Key to function.
- Clone the repository via Git:
git clone https://github.com/franckferman/Whisper_Transcriber.git
- Go to GitHub repo.
- Click
<> Code
โDownload ZIP
. - Extract the archive to your desired location.
Below you'll find common commands and usage examples for Whisper_Transcriber
.
To quickly view all available commands and options:
python3 src/Whisper_Transcriber.py --help
- transcribe: Transcribes an audio file using OpenAI's Whisper API.
- clean: Cleans temporary and unwanted files (e.g., .pyc, pycache, logs).
Use the transcribe command to transcribe audio files via Whisper API.
Transcribe an audio file with automatic language detection:
python3 src/Whisper_Transcriber.py transcribe -f ./audio/my_audio.mp3 -k sk-APIKEY
Transcribe an audio file with a specified language (English or French) and save output to a JSON file:
python3 src/Whisper_Transcriber.py transcribe -f ./audio/my_audio.mp3 -k sk-APIKEY -l en -o ./output/transcription.json
Option | Description | Example |
---|---|---|
-f, --file |
Path to the audio file to transcribe | ./audio/my_audio.mp3 |
-k, --key |
OpenAI API key for authentication | sk-APIKEY |
-l, --lang, --language |
(Optional) Language for transcription: fr or en | -l fr |
-o, --output |
(Optional) Path to save the transcription in JSON format | -o ./output/transcription.json |
--debug |
(Optional) Enable verbose debug logging | --debug |
Use the clean
command to remove temporary files from your project (e.g., .pyc, pycache, log files).
Clean temporary files in the current directory:
python3 src/Whisper_Transcriber.py clean
We truly appreciate and welcome community involvement. Your contributions, feedback, and suggestions play a crucial role in improving the project for everyone. If you're interested in contributing or have ideas for enhancements, please feel free to open an issue or submit a pull request on our GitHub repository. Every contribution, no matter how big or small, is highly valued and greatly appreciated!
Explore the star history of this project and see how it has evolved over time:
Your support is greatly appreciated. We're grateful for every star! Your backing fuels our passion. โจ
This project is licensed under the GNU Affero General Public License, Version 3.0. For more details, please refer to the LICENSE file in the repository: Read the license on GitHub