Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

density-speaker-label

Customer Service Call Transcription and Speaker Diarization

This project provides an program to transcribe customer service call recordings and identify speakers (diarization), producing a structured, readable conversation text file.

Runtime Technical Requirements

  • 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.


Transcription Model: Whisper

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.

🗣 Speaker Diarization: Pyannote

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.


Setup Instructions

  1. Create a .env File

    In the root of the project folder, create a .env file and add your API keys:

    OPENAI_API_KEY=your_openai_api_key
    PYANNOTE_API_KEY=your_pyannote_api_key
    
  2. Run the Application via Docker Compose

    In the project directory, run:

    docker-compose up --build

    Docker will build and start the container automatically.

  3. Modify the Audio File (Optional)

    • If you wish to use a different audio file:
      • Open src/index.ts
      • Update the audioUrl variable with your own CDN-hosted audio link.

    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).


Output

  • 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.

Contact

For any questions or collaboration requests, feel free to reach out:

Email: obakunleoluseye@gmail.com

About

An an automated speech processing pipeline that transcribes customer service call recordings and performs speaker diarization answering 'who said what, and when' across multi-speaker audio

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages