-
Notifications
You must be signed in to change notification settings - Fork 53
feat: Support voice_state/model_type for audio.voices.list #269
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 User
participant VoicesClient
participant API
User->>VoicesClient: list(voice_state, **kwargs)
VoicesClient->>API: GET /voices?voice_state=... + extra options
API-->>VoicesClient: Response (filtered voices)
VoicesClient-->>User: List of Voice objects (with state and model_type)
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
🔇 Additional comments (4)
✨ Finishing Touches
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 (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
@@ Coverage Diff @@
## main #269 +/- ##
==========================================
+ Coverage 89.58% 89.59% +0.01%
==========================================
Files 74 74
Lines 6959 6971 +12
==========================================
+ Hits 6234 6246 +12
Misses 725 725
🚀 New features to boost your workflow:
|
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: 2
🧹 Nitpick comments (1)
cozepy/audio/voices/__init__.py (1)
11-15
: Consider the semantic meaning of theALL
enum valueThe
VoiceState
enum is well-defined, but theALL
value seems to represent a filter option rather than an actual voice state. Consider whether this belongs in the enum or should be handled differently in the filtering logic.Alternatively, you could handle the "all states" case by passing
None
as thevoice_state
parameter, which would be more semantically accurate.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
cozepy/__init__.py
(2 hunks)cozepy/audio/voices/__init__.py
(7 hunks)
🔇 Additional comments (6)
cozepy/__init__.py (2)
19-19
: LGTM: Clean import additionThe import correctly adds
VoiceState
alongside the existingVoice
import, maintaining consistency with the module's structure.
226-226
: LGTM: Proper public API exportThe addition of
VoiceState
to the__all__
list is correctly placed and follows the established pattern for audio voice-related exports.cozepy/audio/voices/__init__.py (4)
1-1
: LGTM: Proper enum importThe enum import is correctly added to support the new
VoiceState
enumeration.
48-50
: LGTM: Backwards-compatible model extensionThe optional
state
field addition is properly typed and maintains backwards compatibility with existing code.
146-153
: LGTM: Proper parameter handlingThe
voice_state
parameter is correctly included in the request params and properly handled withremove_none_values
to avoid sending unnecessary parameters.
248-255
: LGTM: Consistent parameter handlingThe async method properly handles the
voice_state
parameter consistently with the sync version, usingremove_none_values
to filter out None values.
Summary by CodeRabbit