-
-
Notifications
You must be signed in to change notification settings - Fork 1
feat:Add speaker_options object to TranscriptOptionalParams in OpenAPI spec #88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughA new Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant API
Client->>API: Submit transcript request with speaker_options (min_speakers_expected, max_speakers_expected)
API-->>Client: Process request using provided speaker_options for diarization
API-->>Client: Return transcript with speaker diarization based on options
Poem
✨ Finishing Touches🧪 Generate Unit Tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/libs/AssemblyAI/openapi.yaml (1)
1422-1440: Clarify precedence and behavior of newspeaker_optionsvs. existingspeakers_expected
Introducingspeaker_optionsis a solid additive for fine-grained diarization, but the schema should explicitly document how it interacts with the existingspeakers_expectedproperty. For example, note whetherspeaker_optionsoverridesspeakers_expectedwhen both are provided, or if they are mutually exclusive.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (4)
src/libs/AssemblyAI/Generated/AssemblyAI.JsonSerializerContextTypes.g.csis excluded by!**/generated/**src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptOptionalParams.g.csis excluded by!**/generated/**src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptOptionalParamsSpeakerOptions.Json.g.csis excluded by!**/generated/**src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptOptionalParamsSpeakerOptions.g.csis excluded by!**/generated/**
📒 Files selected for processing (1)
src/libs/AssemblyAI/openapi.yaml(1 hunks)
| min_speakers_expected: | ||
| x-label: Minimum speakers expected | ||
| description: The minimum number of speakers expected in the audio file. | ||
| type: integer | ||
| default: 1 | ||
| max_speakers_expected: | ||
| x-label: Maximum speakers expected | ||
| description: | | ||
| <Warning>Setting this parameter too high may hurt model accuracy</Warning> | ||
| The maximum number of speakers expected in the audio file. | ||
| type: integer | ||
| default: 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add validation constraints to min_speakers_expected and max_speakers_expected
To prevent invalid input ranges, enforce numeric bounds on these fields. For example:
min_speakers_expected:
x-label: Minimum speakers expected
description: The minimum number of speakers expected in the audio file.
type: integer
- default: 1
+ default: 1
+ minimum: 1
max_speakers_expected:
x-label: Maximum speakers expected
description: |
<Warning>Setting this parameter too high may hurt model accuracy</Warning>
The maximum number of speakers expected in the audio file.
type: integer
- default: 10
+ default: 10
+ minimum: 1
+ maximum: 10📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| min_speakers_expected: | |
| x-label: Minimum speakers expected | |
| description: The minimum number of speakers expected in the audio file. | |
| type: integer | |
| default: 1 | |
| max_speakers_expected: | |
| x-label: Maximum speakers expected | |
| description: | | |
| <Warning>Setting this parameter too high may hurt model accuracy</Warning> | |
| The maximum number of speakers expected in the audio file. | |
| type: integer | |
| default: 10 | |
| min_speakers_expected: | |
| x-label: Minimum speakers expected | |
| description: The minimum number of speakers expected in the audio file. | |
| type: integer | |
| default: 1 | |
| minimum: 1 | |
| max_speakers_expected: | |
| x-label: Maximum speakers expected | |
| description: | | |
| <Warning>Setting this parameter too high may hurt model accuracy</Warning> | |
| The maximum number of speakers expected in the audio file. | |
| type: integer | |
| default: 10 | |
| minimum: 1 | |
| maximum: 10 |
🤖 Prompt for AI Agents
In src/libs/AssemblyAI/openapi.yaml around lines 1428 to 1439, the
min_speakers_expected and max_speakers_expected fields lack validation
constraints. Add minimum and maximum numeric bounds to these integer fields to
enforce valid input ranges, such as setting minimum to 1 for
min_speakers_expected and appropriate maximum values for both fields to prevent
invalid or out-of-range inputs.
Summary by CodeRabbit