Mbonea commited on
Commit
5e865c5
1 Parent(s): efe2320

added duration

Browse files
App/Transcription/Schemas.py CHANGED
@@ -9,6 +9,7 @@ class TranscriptionMetadata(BaseModel):
9
  language: str = "0"
10
  logs: str = 0
11
  percentage: str = "0"
 
12
  state: str = "PENDING"
13
 
14
 
 
9
  language: str = "0"
10
  logs: str = 0
11
  percentage: str = "0"
12
+ transcription: dict = {}
13
  state: str = "PENDING"
14
 
15
 
App/Transcription/Utils/audio_transcription.py CHANGED
@@ -23,7 +23,7 @@ def transcribe_file(state, file_path, model_size="tiny"):
23
  % (info.language, info.language_probability),
24
  )
25
  metadata.language = info.language
26
-
27
  state.update_state(
28
  state="PROGRESS",
29
  meta=metadata.dict(),
 
23
  % (info.language, info.language_probability),
24
  )
25
  metadata.language = info.language
26
+ metadata.duration = int(total_duration)
27
  state.update_state(
28
  state="PROGRESS",
29
  meta=metadata.dict(),