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.1.0.tar.gz (13.7 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.1.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pyannoteai_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a43457574b128f570a4899d27995099b3e34185bf380a4c20cdc3e26ad623907
MD5 e02cbe97736d2dd0000870ce07737f53
BLAKE2b-256 2f14c9fcef3f76cb4137234bb058ca8079951325d815c2c3af56a8c30be57a11

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyannoteai_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 26cb6541f448baad351d69f81a36abac75b8366e4fe9d6eeade47c70f4bc459a
MD5 5c22debbc304f90222823b588ada1041
BLAKE2b-256 1119ac42327801ec858a03ff4d935782b1b7a9dc808f844b2c027354954a218c

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