This project provides an program to transcribe customer service call recordings and identify speakers (diarization), producing a structured, readable conversation text file.
- Programming Language: TypeScript
- Runtime Environment: Node.js (Dockerized for consistency)
- Host Machine: MacOS (but Docker ensures cross-platform compatibility)
Note:
Docker is used to eliminate dependency issues across different Node.js versions. Running inside containers guarantees consistent behavior on any machin or chip.
The transcription is powered by Whisper, OpenAI’s state-of-the-art speech-to-text model for.
-
Why Whisper?
I've consistently found Whisper to deliver decent accuracy over time, However you can try other models if you so desire it. -
Requirements:
An OpenAI account and API key are needed. You can obtain one through the OpenAI Developer Portal. -
Additional Notes:
- A 100% transcription success rate was achieved in testing.
- Whisper offers multiple models; for larger or self-hosted setups, see the official GitHub repository.
Since Whisper does not currently support diarization, Pyannote is used to assign transcribed text to individual speakers.
-
About Pyannote:
An open-source Python toolkit for speaker diarization, built on PyTorch. It provides highly accurate diarization services both through self-hosting and SaaS offerings. -
API Access:
To use the hosted Pyannote service, create an API key following their documentation and pricing page. -
Self-Hosting Option:
If needed, Pyannote models can be self-hosted by following the instructions on their GitHub repository.
-
Create a
.envFileIn the root of the project folder, create a
.envfile and add your API keys:OPENAI_API_KEY=your_openai_api_key PYANNOTE_API_KEY=your_pyannote_api_key -
Run the Application via Docker Compose
In the project directory, run:
docker-compose up --build
Docker will build and start the container automatically.
-
Modify the Audio File (Optional)
- If you wish to use a different audio file:
- Open
src/index.ts - Update the
audioUrlvariable with your own CDN-hosted audio link.
- Open
Important:
Ensure the audio URL is a publicly accessible CDN link (such as Cloudinary or AWS S3) and not a private storage link (like Dropbox or Google Drive). - If you wish to use a different audio file:
- A plain text file containing the full conversation is generated after processing.
- Speakers are clearly identified (e.g., Agent, Caller) and mapped to each transcription segment.
For any questions or collaboration requests, feel free to reach out:
Email: obakunleoluseye@gmail.com