ver0.1
This commit is contained in:
@@ -111,6 +111,10 @@ class SurgeryPipeline:
|
||||
pending = self._sessions.next_pending_confirmation(surgery_id)
|
||||
if pending is None:
|
||||
return None
|
||||
queue_len = self._sessions.pending_queue_pending_count(surgery_id)
|
||||
qpos = self._sessions.pending_queue_position_1based(surgery_id, pending.id)
|
||||
if qpos is None or qpos < 1:
|
||||
qpos = 1
|
||||
mp3 = await run_in_threadpool(
|
||||
self._voice.synthesize_prompt_to_mp3,
|
||||
pending.prompt_text,
|
||||
@@ -119,6 +123,9 @@ class SurgeryPipeline:
|
||||
return SurgeryPendingConfirmationResponse(
|
||||
surgery_id=surgery_id,
|
||||
confirmation_id=pending.id,
|
||||
pending_queue_length=max(1, queue_len),
|
||||
pending_queue_position=qpos,
|
||||
pending_cumulative_ordinal=max(1, pending.enqueue_ordinal),
|
||||
prompt_text=pending.prompt_text,
|
||||
prompt_audio_mp3_base64=b64,
|
||||
options=[
|
||||
|
||||
Reference in New Issue
Block a user