diarizationPartner Model
Precision 2
Higher accuracy, advanced controls, and enterprise-grade tooling for production teams.
Model details
Example usage
Precision-2 is a speaker diarization model built for production use, offering higher accuracy, advanced controls, and enterprise-grade tooling over to the community version. It's designed for teams that need reliable, production-ready performance rather than just research/experimentation. It's released under a commercial 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}