From edfdd12d377553a476a34c0e94cc818d0cde66c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E7=8C=AB=E5=AD=90?= Date: Fri, 13 Feb 2026 21:54:00 +0800 Subject: [PATCH] TTS: add missing OpenAI voices (ballad, cedar, juniper, marin, verse) (openclaw#11020) thanks @lailoo Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test Co-authored-by: ${pr_author_login} <${coauthor_email}> Co-authored-by: ${tak_name} <${tak_email}> --- CHANGELOG.md | 1 + src/tts/tts.test.ts | 8 ++++++++ src/tts/tts.ts | 5 +++++ 3 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b44a1a111a7..2fd76c619bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -221,6 +221,7 @@ Docs: https://docs.openclaw.ai ### Fixes +- TTS: add missing OpenAI voices (ballad, cedar, juniper, marin, verse) to the allowlist so they are recognized instead of silently falling back to Edge TTS. (#2393) - Cron: scheduler reliability (timer drift, restart catch-up, lock contention, stale running markers). (#10776) Thanks @tyler6204. - Cron: store migration hardening (legacy field migration, parse error handling, explicit delivery mode persistence). (#10776) Thanks @tyler6204. - Memory: set Voyage embeddings `input_type` for improved retrieval. (#10818) Thanks @mcinteerj. diff --git a/src/tts/tts.test.ts b/src/tts/tts.test.ts index c759298577b..43389724b8a 100644 --- a/src/tts/tts.test.ts +++ b/src/tts/tts.test.ts @@ -97,6 +97,14 @@ describe("tts", () => { } }); + it("includes newer OpenAI voices (ballad, cedar, juniper, marin, verse) (#2393)", () => { + expect(isValidOpenAIVoice("ballad")).toBe(true); + expect(isValidOpenAIVoice("cedar")).toBe(true); + expect(isValidOpenAIVoice("juniper")).toBe(true); + expect(isValidOpenAIVoice("marin")).toBe(true); + expect(isValidOpenAIVoice("verse")).toBe(true); + }); + it("rejects invalid voice names", () => { expect(isValidOpenAIVoice("invalid")).toBe(false); expect(isValidOpenAIVoice("")).toBe(false); diff --git a/src/tts/tts.ts b/src/tts/tts.ts index 800ef9b743d..39405d2c3be 100644 --- a/src/tts/tts.ts +++ b/src/tts/tts.ts @@ -842,13 +842,18 @@ function isCustomOpenAIEndpoint(): boolean { export const OPENAI_TTS_VOICES = [ "alloy", "ash", + "ballad", + "cedar", "coral", "echo", "fable", + "juniper", + "marin", "onyx", "nova", "sage", "shimmer", + "verse", ] as const; type OpenAiTtsVoice = (typeof OPENAI_TTS_VOICES)[number];