Skip to content

feat: add the scene3 text-to-speech model - #85

Merged
LingXuanYin merged 2 commits into
mainfrom
feat/scene3
Oct 28, 2026
Merged

LingXuanYin merged 2 commits into
mainfrom
feat/scene3

Conversation

@LingXuanYin

@LingXuanYin LingXuanYin commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds scene3 ("Scene 3"), a text-to-speech model with inline delivery cues and one-reference cloning. Rebased onto main after #56 / #83 / #84; qwen-audio-3.1-tts-flash keeps its validation and request body.

 built-in models / models/*.yaml
+  scene3 (category audio, adapter openai.audioSpeech)
 openai.audioSpeech adapter
   qwen-audio-3.1-tts-flash: unchanged
+  scene3: one text block; at most one HTTP(S) reference; audio meta.text = that reference's transcript
 README
+  scene3 in the model list, a note in the model-choice bullets (used when named), one example

Request body sent to /v1/audio/speech:

no reference   { model: "scene3", input }
one reference  { model: "scene3", input, metadata: { references: [{ url, text? }] } }

input is the text block as given; [bracketed] cues such as [sighs] stay in it. The URL and transcript are trimmed, and text is sent only when a transcript was given. Request-level meta (for example voice_prompt) and any audio meta other than text are rejected before the request is sent.

Evidence

  • Before: on 1e3b000 with only the new tests, 15 fail: the model does not exist. With the declaration but no adapter branch, 9 fail with Unsupported audio speech model: scene3: the three request tests, the four adapter-only rules (request meta, audio meta key, blank or non-string meta.text), the overridden-declaration limit, and the built-in example check.
    After: rebased onto 4b728ac as aabe5a4, exported without line-ending conversion, in node:24-slim: pnpm lint checks 72 files with no errors, typecheck passes, vitest 411 passed (19 files; main alone has 397), build completes.
  • Rebase conflicts were only the neighbouring qwen lines (README model list and choice notes, the adapter's model constants, the built-in speech model array); the scene3 lines are unchanged.
  • Live tests: none added and none run. The gateway does not serve scene3 yet; live cases come with the end-to-end check once it does.
  • Added lines, file names and commit messages were scanned for internal names: clean.

Merge Danger

Door: two-way for the code; a published version stays.

Blast Radius: none for existing callers. The change only adds a model id; the qwen path is untouched.

The version bump comes in a separate PR (0.2.2), as usual. Dependents still on ^0.1.x get the same change from release/0.1 (#86).

scene3 speaks one text block, where inline [bracketed] cues such as [sighs] or [laughs] direct the delivery, and can clone one HTTP(S) reference recording. The audio block's meta.text may carry that recording's transcript; the request goes to /v1/audio/speech with the reference in metadata.references.
scene3 is used when the user or an external policy names it; the Qwen defaults are unchanged. The rejection tests already pin each message exactly, so the extra pattern check is dropped.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant