mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
test fix TTS
This commit is contained in:
parent
5498a8b099
commit
8e65f99ebb
1 changed files with 13 additions and 10 deletions
|
|
@ -369,12 +369,13 @@ def test_map_openai_params_style(azure_tts_config: AzureAVATextToSpeechConfig):
|
|||
"""
|
||||
Test passing through Azure style parameter
|
||||
"""
|
||||
optional_params = {"style": "cheerful"}
|
||||
optional_params = {}
|
||||
|
||||
mapped_voice, mapped_params = azure_tts_config.map_openai_params(
|
||||
model="azure-tts",
|
||||
optional_params=optional_params,
|
||||
drop_params=False
|
||||
drop_params=False,
|
||||
kwargs={"style": "cheerful"}
|
||||
)
|
||||
|
||||
assert mapped_params["style"] == "cheerful"
|
||||
|
|
@ -384,16 +385,17 @@ def test_map_openai_params_style_and_role(azure_tts_config: AzureAVATextToSpeech
|
|||
"""
|
||||
Test passing through Azure style, styledegree, and role parameters
|
||||
"""
|
||||
optional_params = {
|
||||
"style": "cheerful",
|
||||
"styledegree": "2",
|
||||
"role": "SeniorFemale"
|
||||
}
|
||||
optional_params = {}
|
||||
|
||||
mapped_voice, mapped_params = azure_tts_config.map_openai_params(
|
||||
model="azure-tts",
|
||||
optional_params=optional_params,
|
||||
drop_params=False
|
||||
drop_params=False,
|
||||
kwargs={
|
||||
"style": "cheerful",
|
||||
"styledegree": "2",
|
||||
"role": "SeniorFemale"
|
||||
}
|
||||
)
|
||||
|
||||
assert mapped_params["style"] == "cheerful"
|
||||
|
|
@ -405,12 +407,13 @@ def test_map_openai_params_lang(azure_tts_config: AzureAVATextToSpeechConfig):
|
|||
"""
|
||||
Test passing through Azure lang parameter for multilingual voices
|
||||
"""
|
||||
optional_params = {"lang": "es-ES"}
|
||||
optional_params = {}
|
||||
|
||||
mapped_voice, mapped_params = azure_tts_config.map_openai_params(
|
||||
model="azure-tts",
|
||||
optional_params=optional_params,
|
||||
drop_params=False
|
||||
drop_params=False,
|
||||
kwargs={"lang": "es-ES"}
|
||||
)
|
||||
|
||||
assert mapped_params["lang"] == "es-ES"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue