feat: introduce parameters to improve DX#31
Conversation
Signed-off-by: James Ding <jamesding365@gmail.com>
|
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
Signed-off-by: James Ding <jamesding365@gmail.com>
There was a problem hiding this comment.
Pull Request Overview
This pull request adds reference_id and references parameters directly to TTS conversion methods (convert and stream_websocket in both sync and async clients), providing a more convenient API for common use cases while maintaining backward compatibility with the existing TTSConfig-based approach.
Key Changes:
- Added
reference_idandreferencesas direct parameters to all four TTS methods (sync/async convert and stream_websocket) - Parameters are overridden by config values when both are specified, ensuring config takes precedence
- Comprehensive test coverage for the new parameters and precedence behavior
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/fishaudio/resources/tts.py | Added reference_id and references parameters to all TTS methods with logic to prioritize config values over parameters; updated documentation examples |
| tests/unit/test_tts.py | Added comprehensive tests for new parameters in both sync and async clients, including precedence tests to verify config overrides parameter values |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ces parameters Signed-off-by: James Ding <jamesding365@gmail.com>
Signed-off-by: James Ding <jamesding365@gmail.com>
…atency, speed) Signed-off-by: James Ding <jamesding365@gmail.com>
bb3b988 to
e31b4c9
Compare
Signed-off-by: James Ding <jamesding365@gmail.com>
Signed-off-by: James Ding <jamesding365@gmail.com>
…n TTS models Signed-off-by: James Ding <jamesding365@gmail.com>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.