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.

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.2.2.tar.gz (14.1 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.2.2-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyannoteai_sdk-0.2.2.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.22

File hashes

Hashes for pyannoteai_sdk-0.2.2.tar.gz
Algorithm Hash digest
SHA256 fd8f5cc25a615ff58fb2dfc0e415a02d44246ebb15d466708a19698205e3111f
MD5 ed873530bb473770e005de1c571c3c3a
BLAKE2b-256 f4a7530fdabc4ba4f2109c14269fb5f26b65508528749a07f3034c71d16e7902

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyannoteai_sdk-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a44bc4b4428da9e262ed784d1586803450fa9c72a7265f092cb6ab0e8afac89d
MD5 d378480452eba0f1142764a6e263aa62
BLAKE2b-256 35edf8986f33b3d19188bc392146e27e45cc97676f5dbbd4ecd255f944a19aa3

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