Unverified Commit 5458eb83 authored by Junseo Park's avatar Junseo Park Committed by GitHub
Browse files

[Bugfix] send None sentinel on final commit so server properly sends transcription.done (#33963)


Signed-off-by: default avatarpjs102793 <pjs102793@naver.com>
Co-authored-by: default avatarNick Hill <nickhill123@gmail.com>
parent 144d9b7c
......@@ -129,5 +129,5 @@ async def test_multi_chunk_streaming(
" First words I spoke in the original phonograph."
" A little piece of practical poetry. Mary had a little lamb,"
" it sleeps with quite a flow, and everywhere that Mary went,"
" the lamb was sure to go"
" the lamb was sure to go."
)
......@@ -48,7 +48,6 @@ class RealtimeConnection:
self.generation_task: asyncio.Task | None = None
self._is_connected = False
self._is_input_finished = False
self._is_model_validated = False
self._max_audio_filesize_mb = envs.VLLM_MAX_AUDIO_CLIP_FILESIZE_MB
......@@ -145,7 +144,7 @@ class RealtimeConnection:
commit_event = InputAudioBufferCommit(**event)
# final signals that the audio is finished
if commit_event.final:
self._is_input_finished = True
self.audio_queue.put_nowait(None)
else:
await self.start_generation()
else:
......@@ -239,11 +238,6 @@ class RealtimeConnection:
# finish because websocket connection was killed
break
if self.audio_queue.empty() and self._is_input_finished:
# finish because client signals that audio input
# is finished
break
usage = UsageInfo(
prompt_tokens=prompt_token_ids_len,
completion_tokens=completion_tokens_len,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment