Append full transcription in websocket processing
Browse files
whisper_fastapi_online_server.py
CHANGED
@@ -90,6 +90,7 @@ async def websocket_endpoint(websocket: WebSocket):
|
|
90 |
pcm_buffer = bytearray()
|
91 |
online.insert_audio_chunk(pcm_array)
|
92 |
transcription = online.process_iter()[2]
|
|
|
93 |
if args.vac:
|
94 |
buffer = online.online.to_flush(online.online.transcript_buffer.buffer)[2] # We need to access the underlying online object to get the buffer
|
95 |
else:
|
|
|
90 |
pcm_buffer = bytearray()
|
91 |
online.insert_audio_chunk(pcm_array)
|
92 |
transcription = online.process_iter()[2]
|
93 |
+
full_transcription += transcription
|
94 |
if args.vac:
|
95 |
buffer = online.online.to_flush(online.online.transcript_buffer.buffer)[2] # We need to access the underlying online object to get the buffer
|
96 |
else:
|