vllm.entrypoints.openai.speech_to_text.serving ¶
OpenAIServingTranscription ¶
Bases: OpenAISpeechToText
Handles transcription requests.
Source code in vllm/entrypoints/openai/speech_to_text/serving.py
create_transcription async ¶
create_transcription(
audio_data: bytes,
request: TranscriptionRequest,
raw_request: Request | None = None,
) -> (
TranscriptionResponse
| TranscriptionResponseVerbose
| AsyncGenerator[str, None]
| ErrorResponse
)
Transcription API similar to OpenAI's API.
See https://platform.openai.com/docs/api-reference/audio/createTranscription for the API specification. This API mimics the OpenAI transcription API.
Source code in vllm/entrypoints/openai/speech_to_text/serving.py
OpenAIServingTranslation ¶
Bases: OpenAISpeechToText
Handles translation requests.
Source code in vllm/entrypoints/openai/speech_to_text/serving.py
create_translation async ¶
create_translation(
audio_data: bytes,
request: TranslationRequest,
raw_request: Request | None = None,
) -> (
TranslationResponse
| TranslationResponseVerbose
| AsyncGenerator[str, None]
| ErrorResponse
)
Translation API similar to OpenAI's API.
See https://platform.openai.com/docs/api-reference/audio/createTranslation for the API specification. This API mimics the OpenAI translation API.