From 4653b49a0ced5c90a876b6abaf1f1e280f3ec500 Mon Sep 17 00:00:00 2001 From: tzhouam Date: Tue, 8 Sep 2026 10:47:13 +0800 Subject: [PATCH] test: measure dots TTS PCM quality at its native 48 kHz rate The response preserves the native sample rate when none is requested. The HNR helper assumed 24 kHz, halving the perceived pitch of dots.tts-soar output and using the wrong autocorrelation window. Let PCM tests declare the native rate, honor requested resampling rates first, and retain the quality thresholds. Cover the failure with a 120 Hz synthetic voice and rate-selection tests. Signed-off-by: tzhouam --- tests/e2e/online_serving/test_dots_tts_expansion.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/e2e/online_serving/test_dots_tts_expansion.py b/tests/e2e/online_serving/test_dots_tts_expansion.py index 34bc54b8e..e5df55a33 100644 --- a/tests/e2e/online_serving/test_dots_tts_expansion.py +++ b/tests/e2e/online_serving/test_dots_tts_expansion.py @@ -85,5 +85,7 @@ def test_text_only_nonstreaming_pcm_001(omni_server, openai_client) -> None: "voice": "default", "min_audio_bytes": _MIN_AUDIO_BYTES, "min_hnr_db": -2.0, + # dots.tts-soar emits native 48 kHz PCM, which has no rate header. + "expected_sample_rate": 48_000, } openai_client.send_audio_speech_request(request_config)