diarization
Community-1 Speaker Diarization
Open-source speaker diarization model by pyannoteAI featuring improved counting, offline use, and exclusive single-speaker mode.
Model details
Example usage
Community-1 is an open-source speaker diarization model from pyannote, designed for local, offline inference. It offers improved accuracy over previous community models and is ideal for teams building customizable diarization workflows without relying on a commercial API. It’s released under the CC BY 4.0 license.
Input
1import os
2
3import requests
4
5MODEL_ID = "" # Add Model ID from Baseten Dashbaord
6
7endpoint_url = f"https://model-{MODEL_ID}.api.baseten.co/environments/production/predict"
8headers = {"Authorization": f"Api-Key {os.getenv('BASETEN_API_KEY')}"}
9payload = {
10 "audio": {
11 "url": "https://test-audios-public.s3.us-west-2.amazonaws.com/10-sec-01-podcast.m4a"
12 }
13}
14
15response = requests.post(
16 endpoint_url, headers=headers, json=payload, timeout=60
17)
18response.raise_for_status()
19print(response.json())JSON output
1{
2 "diarization_result": [
3 [
4 {
5 "speaker": "SPEAKER_00",
6 "start": 0.004968750000000001,
7 "end": 10.244968750000002
8 }
9 ],
10 [
11 "SPEAKER_00"
12 ],
13 [
14 0.004968750000000001
15 ],
16 [
17 10.244968750000002
18 ]
19 ]
20}