Skip to content

Conversation

hbredin
Copy link
Member

@hbredin hbredin commented Sep 5, 2025

No description provided.

@hbredin hbredin changed the title feat: add support for Precision-2 feat: add support for Precision-2 (PYA-964) Sep 5, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for Precision-2 model by introducing the new model as the default for diarization, voiceprint, and identification operations. The changes also enable previously unsupported speaker count constraints and add new confidence and exclusivity options.

  • Updates type annotations from Optional[int] to int | None for modern Python syntax
  • Adds support for min_speakers and max_speakers parameters that were previously disabled
  • Introduces new parameters: turn_level_confidence, exclusive, and model with "precision-2" as default

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

media://{...} URL created with the `upload` method or
any other public URL pointing to an audio file.
model : str, optional
Defaults to "precision-2"
Copy link
Preview

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation format is inconsistent. The model parameter should include a period at the end to match the format of other parameter descriptions in the docstring.

Suggested change
Defaults to "precision-2"
Defaults to "precision-2".

Copilot uses AI. Check for mistakes.

any other public URL pointing to an audio file.
voiceprints : dict
model : str, optional
Defaults to "precision-2".
Copy link
Preview

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The model parameter documentation is incomplete - it's missing a description of what the model parameter does, unlike other parameters that have descriptive text explaining their purpose.

Suggested change
Defaults to "precision-2".
Name of the model to use for speaker identification. Defaults to "precision-2".

Copilot uses AI. Check for mistakes.

Comment on lines 355 to 357
Defaults to False
exclusive: bool, optional
Defaults to False
Copy link
Preview

Copilot AI Sep 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new parameters turn_level_confidence and exclusive lack descriptions explaining their purpose and functionality, making the API unclear to users.

Suggested change
Defaults to False
exclusive: bool, optional
Defaults to False
If True, includes confidence scores for each detected speech turn in the diarization output.
Defaults to False.
exclusive: bool, optional
If True, ensures that speech turns do not overlap between speakers, enforcing exclusivity in speaker assignment.
Defaults to False.

Copilot uses AI. Check for mistakes.

@hbredin hbredin merged commit 5e72b39 into develop Sep 8, 2025
3 checks passed
@hbredin hbredin deleted the feat/precision-2 branch September 8, 2025 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants