AshDavid12 commited on
Commit
35b4964
·
1 Parent(s): 3321dc8
Files changed (1) hide show
  1. infer.py +2 -2
infer.py CHANGED
@@ -218,12 +218,12 @@ async def websocket_transcribe(websocket: WebSocket):
218
  accumulated_audio_time = 0 # Reset the accumulated audio time
219
 
220
  response = {
221
- "new_segments": partial_result,
222
  "processed_segments": processed_segments
223
  }
224
  logging.info(f"Sending {len(partial_result['new_segments'])} new segments to the client.")
225
- processed_segments.extend(partial_result['new_segments'])
226
  await websocket.send_json(response)
 
227
 
228
  except WebSocketDisconnect:
229
  logging.info("WebSocket connection closed by the client.")
 
218
  accumulated_audio_time = 0 # Reset the accumulated audio time
219
 
220
  response = {
221
+ "new_segments": partial_result['new_segments'],
222
  "processed_segments": processed_segments
223
  }
224
  logging.info(f"Sending {len(partial_result['new_segments'])} new segments to the client.")
 
225
  await websocket.send_json(response)
226
+ processed_segments.extend(partial_result['new_segments'])
227
 
228
  except WebSocketDisconnect:
229
  logging.info("WebSocket connection closed by the client.")