CoolFace
Apppublic

Tomcatom/speaker-diarization-api

sourceHugging Facecc-by-4.0updated 9mo agoView on Hugging Face
0likes
App README

Speaker Diarization API

Simple REST API for speaker diarization using pyannote.audio 3.1.

API Usage

bash
curl -X POST "https://tomcatom-speaker-diarization-api.hf.space/diarize" \
  -F "file=@audio.wav" \
  -F "max_speakers=6" \
  -F "min_speakers=1"

Response Format

json
{
  "num_speakers": 3,
  "speakers": ["SPEAKER_00", "SPEAKER_01", "SPEAKER_02"],
  "segments": [
    {"speaker": "SPEAKER_00", "start": 0.0, "end": 5.2, "duration": 5.2},
    {"speaker": "SPEAKER_01", "start": 5.5, "end": 12.1, "duration": 6.6}
  ],
  "total_segments": 45
}

Endpoints

  • GET / - Web interface
  • POST /diarize - Diarize audio file
  • GET /health - Health check