Remove deprecated model param from FishAudioTTSService
This commit is contained in:
@@ -110,7 +110,6 @@ class FishAudioTTSService(InterruptibleTTSService):
|
||||
*,
|
||||
api_key: str,
|
||||
reference_id: Optional[str] = None, # This is the voice ID
|
||||
model: Optional[str] = None, # Deprecated
|
||||
model_id: Optional[str] = None,
|
||||
output_format: FishAudioOutputFormat = "pcm",
|
||||
sample_rate: Optional[int] = None,
|
||||
@@ -127,12 +126,6 @@ class FishAudioTTSService(InterruptibleTTSService):
|
||||
.. deprecated:: 0.0.105
|
||||
Use ``settings=FishAudioTTSService.Settings(voice=...)`` instead.
|
||||
|
||||
model: Deprecated. Reference ID of the voice model to use for synthesis.
|
||||
|
||||
.. deprecated:: 0.0.74
|
||||
The ``model`` parameter is deprecated and will be removed in version 0.1.0.
|
||||
Use ``reference_id`` instead to specify the voice model.
|
||||
|
||||
model_id: Specify which Fish Audio TTS model to use (e.g. "s1").
|
||||
|
||||
.. deprecated:: 0.0.105
|
||||
@@ -149,25 +142,6 @@ class FishAudioTTSService(InterruptibleTTSService):
|
||||
parameters, ``settings`` values take precedence.
|
||||
**kwargs: Additional arguments passed to the parent service.
|
||||
"""
|
||||
# Validation for model and reference_id parameters
|
||||
if model and reference_id:
|
||||
raise ValueError(
|
||||
"Cannot specify both 'model' and 'reference_id'. Use 'reference_id' only."
|
||||
)
|
||||
|
||||
if model:
|
||||
import warnings
|
||||
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter("always")
|
||||
warnings.warn(
|
||||
"Parameter 'model' is deprecated and will be removed in a future version. "
|
||||
"Use 'reference_id' instead.",
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
reference_id = model
|
||||
|
||||
# 1. Initialize default_settings with hardcoded defaults
|
||||
default_settings = self.Settings(
|
||||
model="s2-pro",
|
||||
|
||||
Reference in New Issue
Block a user