A comprehensive audio call auditing system that provides speaker diarization and transcription capabilities using two different approaches:
- OpenAI Pipeline: Uses OpenAI's Whisper model for both transcription and diarization
- PyAnnote + OpenAI Pipeline: Uses PyAnnote for speaker diarization and OpenAI Whisper for transcription
- Speaker Diarization: Identify and separate different speakers in audio recordings
- High-Quality Transcription: Convert speech to text with timestamp accuracy
- Two Implementation Approaches: Choose between OpenAI-only or hybrid PyAnnote+OpenAI solutions
- Audio Preprocessing: Noise reduction, VAD (Voice Activity Detection), and audio cleanup
- Batch Processing: Handle multiple audio files efficiently
- Detailed Analytics: Generate comprehensive meeting summaries and insights
- Export Capabilities: Multiple output formats (JSON, CSV, TXT)
openai-diarize/
├── openai/ # OpenAI-based pipeline
│ ├── OpenAI_Diarized_Pipeline.ipynb
│ ├── openai_pipeline.py # Converted Python script
│ └── pyproject.toml
├── pyannote/ # PyAnnote + OpenAI pipeline
│ ├── Diarize.ipynb
│ ├── transcribe.ipynb
│ ├── diarize.py # Converted Python script
│ ├── transcribe.py # Converted Python script
│ └── pyproject.toml
├── requirements.txt # Combined dependencies
├── .env.example # Environment variables template
├── .gitignore
└── README.md
- Python 3.11 or higher
- FFmpeg (for audio processing)
- OpenAI API key
- Hugging Face API key (for PyAnnote approach)
-
Clone the repository
git clone https://github.com/your-username/openai-diarize.git cd openai-diarize -
Install dependencies
Option A: Using pip
pip install -r requirements.txt
Option B: Using Poetry (recommended)
# For OpenAI pipeline cd openai && poetry install # For PyAnnote pipeline cd ../pyannote && poetry install
-
Set up environment variables
cp .env.example .env
Edit
.envand add your API keys:OPENAI_API_KEY=your_openai_api_key_here HUGGINGFACE_API_KEY=your_huggingface_api_key_here -
Install FFmpeg
- Windows: Download from https://ffmpeg.org/download.html
- macOS:
brew install ffmpeg - Ubuntu/Debian:
sudo apt install ffmpeg
The OpenAI pipeline uses OpenAI's Whisper model for both diarization and transcription:
Using Python Script:
cd openai
python openai_pipeline.py --input path/to/your/audio.mp4 --output results/Using Jupyter Notebook:
cd openai
jupyter notebook OpenAI_Diarized_Pipeline.ipynbThis approach uses PyAnnote for more accurate speaker diarization and OpenAI for transcription:
Step 1: Diarization
cd pyannote
python diarize.py --input path/to/your/audio.mp4Step 2: Transcription
python transcribe.pyUsing Jupyter Notebooks:
cd pyannote
jupyter notebook Diarize.ipynb
# Then run transcribe.ipynbThe application generates multiple output formats:
- JSON: Detailed transcription with timestamps and speaker information
- CSV: Structured data for analysis
- TXT: Clean, readable meeting summary
- Analytics: Speaker insights, conversation metrics, and summaries
| Feature | OpenAI Pipeline | PyAnnote + OpenAI |
|---|---|---|
| Diarization Accuracy | Good | Excellent |
| Setup Complexity | Simple | Moderate |
| Processing Speed | Fast | Slower |
| Cost | Lower | Higher |
| Best For | Quick processing | High accuracy needs |
- Uses OpenAI Whisper for end-to-end processing
- Includes audio preprocessing (noise reduction, VAD)
- Supports multiple audio formats
- Generates comprehensive meeting summaries
- Advanced speaker diarization using PyAnnote.audio
- Voice Activity Detection (VAD) for precise segmentation
- OpenAI Whisper for accurate transcription
- Word-level timestamp precision
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI Whisper for transcription capabilities
- PyAnnote.audio for speaker diarization
- Hugging Face for model hosting and APIs
If you encounter any issues or have questions, please open an issue on GitHub.