tomiwa1a commited on
Commit
c8f6664
1 Parent(s): 6df6849

removed tokens array from transcripts

Browse files
Files changed (1) hide show
  1. handler.py +3 -1
handler.py CHANGED
@@ -48,9 +48,11 @@ class EndpointHandler():
48
  t0 = time.time()
49
  transcript = self.model.transcribe(path_to_audio, **decode_options)
50
  t1 = time.time()
51
-
52
  total = t1-t0
53
  print(f'Finished transcription in {total} seconds')
 
 
 
54
 
55
 
56
  # postprocess the prediction
 
48
  t0 = time.time()
49
  transcript = self.model.transcribe(path_to_audio, **decode_options)
50
  t1 = time.time()
 
51
  total = t1-t0
52
  print(f'Finished transcription in {total} seconds')
53
+ for segment in transcript['segments']:
54
+ # Remove the tokens array, it was making response too verbose
55
+ segment.pop('tokens', None)
56
 
57
 
58
  # postprocess the prediction