Skip to main content

Official pyannoteAI Python SDK

Project description

Official pyannoteAI Python SDK

Installation

$ pip install pyannoteai-sdk

Then head over to dashboard.pyannote.ai and create an API key.

Speaker diarization

# instantiate client
from pyannoteai.sdk import Client
client = Client("your-api-key")

# upload conversation file
media_url = client.upload('/path/to/conversation.wav')

# submit a diarization job
job_id = client.diarize(media_url)

# retrieve diarization
diarization = client.retrieve(job_id)
# diarization['output']['diarization'] contains diarization output

Use help(client.diarize) to learn about options.

STT orchestration

# submit a diarization job with STT orchestration
job_id = client.diarize(
  media_url, 
  transcription=True,
  transcription_config={"model": "parakeet-tdt-0.6b-v3"})

# retrieve speaker-attributed transcription
orchestration = client.retrieve(job_id)
# orchestration['output']['turnLevelTranscription'] 
# orchestration['output']['wordLevelTranscription']

Speaker identification

# create a voiceprint from a sample of Lex's voice
lex_url = client.upload('/path/to/lex.wav')
job_id = client.voiceprint(lex_url)
lex = client.retrieve(job_id)
# lex['output']['voiceprint'] contains Lex's voiceprint

# create a voiceprint from a sample of Mark's voice
mark_url = client.upload('/path/to/mark.wav')
job_id = client.voiceprint(mark_url)
mark = client.retrieve(job_id)
# mark['output']['voiceprint'] contains Mark's voiceprint

# use those voiceprints to track Lex and Mark in the conversation
voiceprints = {'lex': lex['output']['voiceprint'], 'mark': mark['output']['voiceprint']}
job_id = client.identify('/path/to/conversation.wav', voiceprints)
identification = client.retrieve(job_id)
# identification['output']['identification'] contains identification output

Use help(client.identify) to learn about options.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyannoteai_sdk-0.4.0.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyannoteai_sdk-0.4.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file pyannoteai_sdk-0.4.0.tar.gz.

File metadata

  • Download URL: pyannoteai_sdk-0.4.0.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pyannoteai_sdk-0.4.0.tar.gz
Algorithm Hash digest
SHA256 fbdade06eb54347374acf10698b8c9c0bcdb592f8339c90c5a16fa441ea8cf9d
MD5 4a918d67281b91a180b49849ec87110a
BLAKE2b-256 f6533e3f14c1382cf14e1dfeb958c08282c44ac07e6965803608e1b748a38273

See more details on using hashes here.

File details

Details for the file pyannoteai_sdk-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: pyannoteai_sdk-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pyannoteai_sdk-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 36a0175978e0427f27843d690eb4d1e8ec839009ea540516d6dfcdce749cd883
MD5 461f6a0ffa1a2549cbead2d5b4f964f9
BLAKE2b-256 f98d16e62133ff748931e923c2d29a150a710c85283f533a4148adc42addb6a8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page