From fe6d6ef7a45feb13a13a89da865f605dd4528693 Mon Sep 17 00:00:00 2001 From: dmsuehir Date: Mon, 17 Mar 2025 13:41:16 -0700 Subject: [PATCH] Fix spoken audio responses on Gaudi and add tests Signed-off-by: dmsuehir --- MultimodalQnA/docker_compose/intel/hpu/gaudi/compose.yaml | 2 ++ MultimodalQnA/tests/test_compose_on_gaudi.sh | 8 ++++++++ MultimodalQnA/tests/test_compose_on_xeon.sh | 8 ++++++++ 3 files changed, 18 insertions(+) diff --git a/MultimodalQnA/docker_compose/intel/hpu/gaudi/compose.yaml b/MultimodalQnA/docker_compose/intel/hpu/gaudi/compose.yaml index b31c3b59cb..d3509e7683 100644 --- a/MultimodalQnA/docker_compose/intel/hpu/gaudi/compose.yaml +++ b/MultimodalQnA/docker_compose/intel/hpu/gaudi/compose.yaml @@ -195,6 +195,8 @@ services: LVM_MODEL_ID: ${LVM_MODEL_ID} WHISPER_PORT: ${WHISPER_PORT} WHISPER_SERVER_ENDPOINT: ${WHISPER_SERVER_ENDPOINT} + TTS_PORT: ${TTS_PORT} + TTS_ENDPOINT: ${TTS_ENDPOINT} ipc: host restart: always multimodalqna-ui: diff --git a/MultimodalQnA/tests/test_compose_on_gaudi.sh b/MultimodalQnA/tests/test_compose_on_gaudi.sh index 8d3b3da6b8..08366f10db 100644 --- a/MultimodalQnA/tests/test_compose_on_gaudi.sh +++ b/MultimodalQnA/tests/test_compose_on_gaudi.sh @@ -330,6 +330,14 @@ function validate_megaservice() { "multimodalqna-backend-server" \ '{"messages": "Find an apple. What color is it?"}' + echo "Validating megaservice with audio response" + validate_service \ + "http://${host_ip}:${MEGA_SERVICE_PORT}/v1/multimodalqna" \ + '"audio":{"data"' \ + "multimodalqna" \ + "multimodalqna-backend-server" \ + '{"messages": "Find an apple. What color is it?", "modalities": ["text", "audio"]}' + echo "Validating megaservice with first audio query" validate_service \ "http://${host_ip}:${MEGA_SERVICE_PORT}/v1/multimodalqna" \ diff --git a/MultimodalQnA/tests/test_compose_on_xeon.sh b/MultimodalQnA/tests/test_compose_on_xeon.sh index ce37fd056e..d02a016303 100644 --- a/MultimodalQnA/tests/test_compose_on_xeon.sh +++ b/MultimodalQnA/tests/test_compose_on_xeon.sh @@ -328,6 +328,14 @@ function validate_megaservice() { "multimodalqna-backend-server" \ '{"messages": "Find an apple. What color is it?"}' + echo "Validating megaservice with audio response" + validate_service \ + "http://${host_ip}:${MEGA_SERVICE_PORT}/v1/multimodalqna" \ + '"audio":{"data"' \ + "multimodalqna" \ + "multimodalqna-backend-server" \ + '{"messages": "Find an apple. What color is it?", "modalities": ["text", "audio"]}' + echo "Validating megaservice with first audio query" validate_service \ "http://${host_ip}:${MEGA_SERVICE_PORT}/v1/multimodalqna" \