diff --git a/vllm/entrypoints/speech_to_text/base/serving.py b/vllm/entrypoints/speech_to_text/base/serving.py index c646f53383..40f4cb25b1 100644 --- a/vllm/entrypoints/speech_to_text/base/serving.py +++ b/vllm/entrypoints/speech_to_text/base/serving.py @@ -644,7 +644,7 @@ class SpeechToTextBaseServing(GenerateBaseServing): TranscriptionResponseVerbose( text=text, language=request.language, - duration=str(duration_s), + duration=duration_s, segments=total_segments, ), ) @@ -658,7 +658,7 @@ class SpeechToTextBaseServing(GenerateBaseServing): TranslationResponseVerbose( text=text, language=request.language, - duration=str(duration_s), + duration=duration_s, segments=total_segments, ), ) diff --git a/vllm/entrypoints/speech_to_text/transcription/protocol.py b/vllm/entrypoints/speech_to_text/transcription/protocol.py index 3d6600fe36..dba68abe7a 100644 --- a/vllm/entrypoints/speech_to_text/transcription/protocol.py +++ b/vllm/entrypoints/speech_to_text/transcription/protocol.py @@ -384,7 +384,7 @@ class TranscriptionSegment(OpenAIBaseModel): class TranscriptionResponseVerbose(OpenAIBaseModel): - duration: str + duration: float """The duration of the input audio.""" language: str diff --git a/vllm/entrypoints/speech_to_text/translation/protocol.py b/vllm/entrypoints/speech_to_text/translation/protocol.py index 684138568e..d8836554c5 100644 --- a/vllm/entrypoints/speech_to_text/translation/protocol.py +++ b/vllm/entrypoints/speech_to_text/translation/protocol.py @@ -357,7 +357,7 @@ class TranslationSegment(OpenAIBaseModel): class TranslationResponseVerbose(OpenAIBaseModel): - duration: str + duration: float """The duration of the input audio.""" language: str