From e1612a0151ef28c4e02c0f1843dd725a92d4c268 Mon Sep 17 00:00:00 2001
From: cai <cai@nbcai.cc>
Date: Wed, 08 Jul 2026 12:35:21 +0800
Subject: [PATCH] feat: default combrabo voice bot audio to 16k
---
tools/validate-turn-stream-fixture.mjs | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/validate-turn-stream-fixture.mjs b/tools/validate-turn-stream-fixture.mjs
index 710365f..bcdd77f 100755
--- a/tools/validate-turn-stream-fixture.mjs
+++ b/tools/validate-turn-stream-fixture.mjs
@@ -30,6 +30,7 @@
let traceId = null
let turnId = null
const supportedAudioFormats = new Set(['pcm_s16le', 'mp3', 'mpeg', 'wav'])
+const supportedPcmSampleRates = new Set([16000, 48000])
function fail(message) {
console.error(`turn stream fixture invalid: ${message}`)
@@ -100,8 +101,8 @@
fail(`${chunk.format} payload must be non-empty`)
}
if (chunk.format === 'pcm_s16le') {
- if (chunk.sampleRate !== 48000 || chunk.channels !== 1) {
- fail('pcm_s16le chunk must be 48000Hz mono')
+ if (!supportedPcmSampleRates.has(chunk.sampleRate) || chunk.channels !== 1) {
+ fail('pcm_s16le chunk must be 16000Hz or 48000Hz mono')
}
if (payload.length % 2 !== 0) {
fail('pcm_s16le payload must be 16-bit aligned')
--
Gitblit v1.9.3