[Feature] Flush the speech WebSocket on input.done without closing it (#5517)
Signed-off-by: iancarrasco-b10 <ian.carrasco@baseten.co>
This commit is contained in:
1 parent
0feb92bdfa
commit
23bb4395bb
8 files changed
+688
-302
No files matched your search
@@ -1572,8 +1572,9 @@ async def delete_voice(name: str, raw_request: Request):
|
||||
async def streaming_speech(websocket: WebSocket):
|
||||
"""WebSocket endpoint for streaming text input TTS.
|
||||
|
||||
Accepts text incrementally, splits at sentence boundaries, and
|
||||
returns audio per sentence. See serving_speech_stream.py for protocol.
|
||||
Accepts text incrementally and returns audio for the buffered text on
|
||||
input.done, which flushes without closing the connection. See
|
||||
serving_speech_stream.py for protocol.
|
||||
"""
|
||||
handler = getattr(websocket.app.state, "openai_streaming_speech", None)
|
||||
if handler is None:
|
||||
|
||||
Reference in new issue
Block a user