[Model] Add native full-duplex Nemotron VoiceChat serving (#6089)
Signed-off-by: Sysy <1370724210@qq.com> Signed-off-by: sy03 <137072421@qq.com> Co-authored-by: sy03 <137072421@qq.com>
This commit is contained in:
1 parent
c2723979c0
commit
432b2c6ca3
40 files changed
+3560
-154
No files matched your search
@@ -121,12 +121,15 @@ class DuplexSessionTasks:
|
||||
]
|
||||
if not tasks:
|
||||
return False
|
||||
cancelled_tail = self.native_append_tail if self.native_append_tail in tasks else None
|
||||
for task in tasks:
|
||||
task.cancel()
|
||||
try:
|
||||
await asyncio.wait_for(asyncio.gather(*tasks, return_exceptions=True), timeout=timeout_s)
|
||||
except TimeoutError:
|
||||
pass
|
||||
if cancelled_tail is not None and self.native_append_tail is cancelled_tail:
|
||||
self.native_append_tail = None
|
||||
return True
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user