[Full Duplex] Feat: Support Full-Duplex realtime runtime & add MiniCPM-o 4.5 demo (#3907)
Signed-off-by: Sy03 <1370724210@qq.com> Signed-off-by: lishunyang12 <lishunyang03@gmail.com> Signed-off-by: Yueqian Lin <linyueqian@outlook.com> Co-authored-by: lishunyang12 <lishunyang03@gmail.com> Co-authored-by: Yueqian Lin <linyueqian@outlook.com> Co-authored-by: StormMelody <22371184@zju.edu.cn> Co-authored-by: Gao Han <hgaoaf@connect.ust.hk> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
This commit is contained in:
142 files changed
+48389
-1013
No files matched your search
@@ -1,7 +1,10 @@
|
||||
import pytest
|
||||
import torch
|
||||
|
||||
from vllm_omni.utils.mm_outputs import partition_flat_payload, partition_payload_list
|
||||
|
||||
pytestmark = [pytest.mark.core_model, pytest.mark.cpu]
|
||||
|
||||
|
||||
def test_partition_thinker_latent_payload():
|
||||
payload = {
|
||||
@@ -42,3 +45,27 @@ def test_partition_payload_list_preserves_request_alignment():
|
||||
inter_list, client_list = partition_payload_list(payloads)
|
||||
assert inter_list == [payloads[0], None]
|
||||
assert client_list == [None, payloads[1]]
|
||||
|
||||
|
||||
def test_partition_duplex_audio_transcript_metadata_to_client_mm():
|
||||
payload = {
|
||||
"model_outputs": torch.zeros(1, 2400),
|
||||
"meta.duplex_epoch": torch.tensor([3], dtype=torch.int32),
|
||||
"meta.duplex_turn_id": torch.tensor([2], dtype=torch.int32),
|
||||
"meta.llm_output_text_utf8": torch.tensor([104, 105], dtype=torch.uint8),
|
||||
"meta.audio_text_total_chars": torch.tensor([2], dtype=torch.int32),
|
||||
"meta.tts_is_last_chunk": torch.tensor([1], dtype=torch.int32),
|
||||
"meta.turn_end": torch.tensor([1], dtype=torch.int32),
|
||||
"meta.native_duplex_segment_text": "hi",
|
||||
}
|
||||
|
||||
inter, client = partition_flat_payload(payload)
|
||||
|
||||
assert "meta.llm_output_text_utf8" in client
|
||||
assert "meta.audio_text_total_chars" in client
|
||||
assert "meta.duplex_epoch" in client
|
||||
assert "meta.duplex_turn_id" in client
|
||||
assert "meta.tts_is_last_chunk" in client
|
||||
assert "meta.turn_end" in client
|
||||
assert "meta.native_duplex_segment_text" not in client
|
||||
assert "meta.native_duplex_segment_text" in inter
|
||||
Reference in new issue
Block a user