aldan.creo commited on
Commit
23ca0a6
·
1 Parent(s): 94f0c4f
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -73,7 +73,7 @@ def transcribe_live(state, words_list, new_chunk):
73
  {
74
  "timestamp": (
75
  chunk["timestamp"][0] + start_of_the_stream,
76
- chunk["timestamp"][1] + start_of_the_stream,
77
  ),
78
  "text": chunk["text"],
79
  }
@@ -110,7 +110,7 @@ def transcribe_live(state, words_list, new_chunk):
110
  previous_chunks = state.get("transcription_chunks", [])
111
 
112
  merged_chunks = [
113
- chunk for chunk in previous_chunks if chunk["timestamp"][1] < start_time_cutoff
114
  ] + new_chunks_remapped
115
 
116
  full_transcription_text = reduce(
 
73
  {
74
  "timestamp": (
75
  chunk["timestamp"][0] + start_of_the_stream,
76
+ chunk["timestamp"][1] + start_of_the_stream if chunk["timestamp"][1] else end_time_cutoff,
77
  ),
78
  "text": chunk["text"],
79
  }
 
110
  previous_chunks = state.get("transcription_chunks", [])
111
 
112
  merged_chunks = [
113
+ chunk for chunk in previous_chunks if chunk["timestamp"][1] <= start_time_cutoff
114
  ] + new_chunks_remapped
115
 
116
  full_transcription_text = reduce(