easydel.inference.vwhisper.server#
- class easydel.inference.vwhisper.server.ResponseFormat(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
str,Enum- json = 'json'#
- srt = 'srt'#
- text = 'text'#
- verbose_json = 'verbose_json'#
- vtt = 'vtt'#
- class easydel.inference.vwhisper.server.TranscriptionResponse(*, text: str, segments: Optional[List[Dict[str, Any]]] = None)[source]#
Bases:
BaseModel- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- segments: Optional[List[Dict[str, Any]]]#
- text: str#
- class easydel.inference.vwhisper.server.WhisperModel(model_name=None, dtype=<class 'jax.numpy.bfloat16'>)[source]#
Bases:
objectSingleton wrapper for the Whisper model to avoid reloading.
- easydel.inference.vwhisper.server.create_whisper_app(model_name: str = 'openai/whisper-large-v3-turbo', dtype=<class 'jax.numpy.bfloat16'>)[source]#
Create a FastAPI app for Whisper transcription.
- easydel.inference.vwhisper.server.run_server(model_name: str = 'openai/whisper-large-v3-turbo', host: str = '0.0.0.0', port: int = 8000, dtype=<class 'jax.numpy.bfloat16'>)[source]#
Run the Whisper FastAPI server.
- Parameters
model_name – Name of the Whisper model to use (from HuggingFace)
host – Host to bind the server
port – Port to bind the server
dtype – Data type for the model (default: bfloat16)