File size: 944 Bytes
b8952b7
852de8c
b8952b7
252d749
 
f55cf0b
 
b8952b7
 
5e865c5
f55cf0b
 
 
e666955
 
 
 
29bc2ef
49b4ffb
 
c69d482
49b4ffb
0278926
901a7de
e666955
 
b8952b7
 
 
 
 
 
 
 
 
 
 
 
252d749
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from pydantic import BaseModel, Field
from typing import Optional
from datetime import datetime


class TranscriptionMetadata(BaseModel):
    duration: int = 0
    language: str = "-"
    percentage: str = "-"
    transcription: dict = {}
    state: str = "PENDING"


class BaseTranscription(BaseModel):
    created_at: datetime = Field(default_factory=datetime.utcnow)
    duration: int = 0
    language: str = "-"
    file_name: str = "-"
    tl_file_id: str = "-"
    youtubeLink: str = "-"
    task_id: str

    transcription_state: str = Field(default="SUCCESS", alias="state")
    # content: list = []


class TranscriptionResult(BaseModel):
    created_at: datetime = Field(default_factory=datetime.utcnow)
    duration: int = 0
    language: str = "-"
    transcription_state: str = "SUCCESS"
    transcript: list = []

    @property
    def content(self):
        return self.transcript


class UserDetails(BaseModel):
    userId: str