"""Python 3.10+ and oruk SDK 0.2.4. Run: python diarize.py recording.wav."""
import json
import os
import sys
from oruk import Oruk

with Oruk(api_key=os.environ["ORUK_API_KEY"]) as client:
    result = client.analyze(
        sys.argv[1], model="oruk-resonance", diarize=True,
        # Set num_speakers=2 only when you know there are exactly two speakers.
    )

print(json.dumps(result, indent=2))
# Each result["segments"] entry has start/end, speaker, text, emotions and styles.
# speaker_0 and speaker_1 are local labels, not persistent identities or roles.
