buffer is now transcript.text

This commit is contained in:
Quentin Fuxa 2025-02-07 12:25:05 +01:00
parent b82cc3b613
commit f7f1f259c1

View file

@ -213,16 +213,12 @@ async def websocket_endpoint(websocket: WebSocket):
full_transcription += trans full_transcription += trans
if args.vac: if args.vac:
buffer = online.online.concatenate_tsw( transcript = online.online.concatenate_tokens(online.online.transcript_buffer.buffer)
online.online.transcript_buffer.buffer
)[
2
] # We need to access the underlying online object to get the buffer
else: else:
buffer = online.concatenate_tsw(online.transcript_buffer.buffer)[2] transcript = online.concatenate_tokens(online.transcript_buffer.buffer)
if (
buffer in full_transcription buffer = transcript.text
): # With VAC, the buffer is not updated until the next chunk is processed if buffer in full_transcription: # With VAC, the buffer is not updated until the next chunk is processed
buffer = "" buffer = ""
lines = [ lines = [