qfuxa commited on
Commit
6ad63d0
·
1 Parent(s): 69bd3cb

solve https://github.com/QuentinFuxa/whisper_streaming_web/issues/60#issuecomment-2692191781

Browse files
Files changed (1) hide show
  1. whisper_fastapi_online_server.py +2 -2
whisper_fastapi_online_server.py CHANGED
@@ -49,7 +49,7 @@ parser.add_argument(
49
  parser.add_argument(
50
  "--diarization",
51
  type=bool,
52
- default=True,
53
  help="Whether to enable speaker diarization.",
54
  )
55
 
@@ -329,7 +329,7 @@ async def results_formatter(shared_state, websocket):
329
  "speaker": 1,
330
  "text": "",
331
  "beg": format_time(0),
332
- "end": format_time(token.end) if token else format_time(0),
333
  "diff": 0
334
  }],
335
  "buffer_transcription": buffer_transcription,
 
49
  parser.add_argument(
50
  "--diarization",
51
  type=bool,
52
+ default=False,
53
  help="Whether to enable speaker diarization.",
54
  )
55
 
 
329
  "speaker": 1,
330
  "text": "",
331
  "beg": format_time(0),
332
+ "end": format_time(tokens[-1].end) if tokens else format_time(0),
333
  "diff": 0
334
  }],
335
  "buffer_transcription": buffer_transcription,