Remove deprecated english_normalization param from MiniMax TTS InputParams
This commit is contained in:
@@ -157,12 +157,6 @@ class MiniMaxHttpTTSService(TTSService):
|
|||||||
pitch: Pitch adjustment (range: -12 to 12).
|
pitch: Pitch adjustment (range: -12 to 12).
|
||||||
emotion: Emotional tone (options: "happy", "sad", "angry", "fearful",
|
emotion: Emotional tone (options: "happy", "sad", "angry", "fearful",
|
||||||
"disgusted", "surprised", "calm", "fluent").
|
"disgusted", "surprised", "calm", "fluent").
|
||||||
english_normalization: Deprecated; use `text_normalization` instead
|
|
||||||
|
|
||||||
.. deprecated:: 0.0.96
|
|
||||||
The `english_normalization` parameter is deprecated and will be removed in a future version.
|
|
||||||
Use the `text_normalization` parameter instead.
|
|
||||||
|
|
||||||
text_normalization: Enable text normalization (Chinese/English).
|
text_normalization: Enable text normalization (Chinese/English).
|
||||||
latex_read: Enable LaTeX formula reading.
|
latex_read: Enable LaTeX formula reading.
|
||||||
exclude_aggregated_audio: Whether to exclude aggregated audio in final chunk.
|
exclude_aggregated_audio: Whether to exclude aggregated audio in final chunk.
|
||||||
@@ -173,7 +167,6 @@ class MiniMaxHttpTTSService(TTSService):
|
|||||||
volume: Optional[float] = 1.0
|
volume: Optional[float] = 1.0
|
||||||
pitch: Optional[int] = 0
|
pitch: Optional[int] = 0
|
||||||
emotion: Optional[str] = None
|
emotion: Optional[str] = None
|
||||||
english_normalization: Optional[bool] = None # Deprecated
|
|
||||||
text_normalization: Optional[bool] = None
|
text_normalization: Optional[bool] = None
|
||||||
latex_read: Optional[bool] = None
|
latex_read: Optional[bool] = None
|
||||||
exclude_aggregated_audio: Optional[bool] = None
|
exclude_aggregated_audio: Optional[bool] = None
|
||||||
@@ -284,16 +277,6 @@ class MiniMaxHttpTTSService(TTSService):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Resolve text_normalization
|
# Resolve text_normalization
|
||||||
if params.english_normalization is not None:
|
|
||||||
import warnings
|
|
||||||
|
|
||||||
with warnings.catch_warnings():
|
|
||||||
warnings.simplefilter("always")
|
|
||||||
warnings.warn(
|
|
||||||
"Parameter `english_normalization` is deprecated and will be removed in a future version. Use `text_normalization` instead.",
|
|
||||||
DeprecationWarning,
|
|
||||||
)
|
|
||||||
default_settings.text_normalization = params.english_normalization
|
|
||||||
if params.text_normalization is not None:
|
if params.text_normalization is not None:
|
||||||
default_settings.text_normalization = params.text_normalization
|
default_settings.text_normalization = params.text_normalization
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user