Schemas
Pydantic models for transcript requests and responses.
- class lingua_loop.schemas.transcript.ScoreRequest(*, video_id: Annotated[str, MinLen(min_length=1)], segment_indices: Annotated[List[int], MinLen(min_length=1)], user_text: Annotated[str, MinLen(min_length=1)], language_code: SupportedLanguageCodes)[source]
Bases:
BaseModelRequest model for scoring a transcription.
- language_code: SupportedLanguageCodes
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- segment_indices: List[int]
- user_text: str
- video_id: str
- class lingua_loop.schemas.transcript.ScoreResponse(*, score: Annotated[float, Ge(ge=0.0), Le(le=1.0)], reference_text: Annotated[str, MinLen(min_length=1)])[source]
Bases:
BaseModelResponse model for a scored transcription.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- reference_text: str
- score: float
- class lingua_loop.schemas.transcript.SegmentSchema(*, start: Annotated[float, Ge(ge=0.0)], duration: Annotated[float, Gt(gt=0.0)], text: Annotated[str, MinLen(min_length=1)])[source]
Bases:
BaseModelSchema for a transcript segment.
- duration: float
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- start: float
- text: str
- class lingua_loop.schemas.transcript.TranscriptResponse(*, video_id: Annotated[str, MinLen(min_length=1)], segments: List[SegmentSchema], is_generated: bool)[source]
Bases:
BaseModelResponse model for a transcript request.
- is_generated: bool
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- segments: List[SegmentSchema]
- video_id: str