diff --git a/litellm/utils.py b/litellm/utils.py index 2d441823bc..be26405b43 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -2437,6 +2437,7 @@ def get_optional_params_transcription( "prompt": None, "response_format": None, "temperature": None, # openai defaults this to 0 + "timestamp_granularities": None } non_default_params = { diff --git a/tests/llm_translation/test_openai.py b/tests/llm_translation/test_openai.py index 285a406b3f..e069afe69f 100644 --- a/tests/llm_translation/test_openai.py +++ b/tests/llm_translation/test_openai.py @@ -451,6 +451,8 @@ class TestOpenAIGPT4OAudioTranscription(BaseLLMAudioTranscriptionTest): def get_base_audio_transcription_call_args(self) -> dict: return { "model": "openai/gpt-4o-transcribe", + "response_format": "verbose_json", + "timestamp_granularities": ["word"], } def get_custom_llm_provider(self) -> litellm.LlmProviders: diff --git a/tests/local_testing/test_whisper.py b/tests/local_testing/test_whisper.py index 54bbcaa93d..022af6d1cf 100644 --- a/tests/local_testing/test_whisper.py +++ b/tests/local_testing/test_whisper.py @@ -66,6 +66,7 @@ async def test_transcription( api_key=api_key, api_base=api_base, response_format=response_format, + timestamp_granularities=timestamp_granularities, drop_params=True, ) print(f"transcript: {transcript.model_dump()}")