From d9ce63ee39bc5ccf584910a38c0f3772736dddd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sp=C3=B6ttel?= <1682504+fspoettel@users.noreply.github.com> Date: Wed, 8 Feb 2023 16:29:21 +0100 Subject: [PATCH] feat: type whisper transcripts --- app/shared/db/schemas.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/app/shared/db/schemas.py b/app/shared/db/schemas.py index 8bd5197..dc2e2d7 100644 --- a/app/shared/db/schemas.py +++ b/app/shared/db/schemas.py @@ -49,8 +49,20 @@ class Job(WithDbFields): config: Optional[JobConfig] +class RawTranscript(BaseModel): + id: int + seek: int + start: float + end: float + text: str + tokens: List[int] + temperature: float + avg_logprob: float + compression_ratio: float + no_speech_prob: float + + class Artifact(WithDbFields): - # TODO: narrow type - data: Optional[List[Any]] + data: Optional[List[RawTranscript]] job_id: UUID type: ArtifactType