Skip to content

Support cartesia TTS volume - #1101

Merged
toubatbrian merged 2 commits into
mainfrom
brian/cartesia-volume
Mar 6, 2026
Merged

Support cartesia TTS volume#1101
toubatbrian merged 2 commits into
mainfrom
brian/cartesia-volume

Conversation

@toubatbrian

@toubatbrian toubatbrian commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-bot Bot commented Mar 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 01c62e9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 21 packages
Name Type
@livekit/agents-plugin-cartesia Patch
@livekit/agents Patch
@livekit/agents-plugin-anam Patch
@livekit/agents-plugin-baseten Patch
@livekit/agents-plugin-bey Patch
@livekit/agents-plugin-deepgram Patch
@livekit/agents-plugin-elevenlabs Patch
@livekit/agents-plugin-google Patch
@livekit/agents-plugin-hedra Patch
@livekit/agents-plugin-inworld Patch
@livekit/agents-plugin-lemonslice Patch
@livekit/agents-plugin-livekit Patch
@livekit/agents-plugin-neuphonic Patch
@livekit/agents-plugin-openai Patch
@livekit/agents-plugin-phonic Patch
@livekit/agents-plugin-resemble Patch
@livekit/agents-plugin-rime Patch
@livekit/agents-plugin-sarvam Patch
@livekit/agents-plugin-silero Patch
@livekit/agents-plugin-xai Patch
@livekit/agents-plugins-test Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 4 additional findings in Devin Review.

Open in Devin Review

opts.apiVersion !== API_VERSION_WITH_EXPERIMENTAL_CONTROLS ||
opts.model !== MODEL_WITH_EXPERIMENTAL_CONTROLS
) {
if (opts.speed || opts.emotion) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 checkGenerationConfig does not warn when volume is set on a non-sonic-3 model

In checkGenerationConfig (line 106), the else-if branch for non-sonic-3 models only checks opts.speed || opts.emotion but does not check opts.volume. This means a user who sets volume on a non-sonic-3 model (e.g., sonic-2) receives no warning, yet the volume is silently ignored in toCartesiaOptions because volume is only included in the generation_config block gated by isSonic3(opts.model) at plugins/cartesia/src/tts.ts:741. The warning condition should include opts.volume to be consistent with how the option is actually handled.

Suggested change
if (opts.speed || opts.emotion) {
if (opts.speed || opts.emotion || opts.volume) {
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f238cd71e8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +743 to +744
if (opts.speed) {
generationConfig.speed = opts.speed;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Validate sonic-3 speed before sending generation config

The new sonic-3 path forwards opts.speed directly into generation_config.speed, but speed still accepts string presets ('fast', 'slow', etc.) and the sonic-3 validation only runs for numeric values. With sonic-3 now the default model, existing callers that pass string speeds can now send invalid payloads (sonic-3 expects numeric speed in the 0.6–2.0 range), causing synthesis requests to fail without a warning.

Useful? React with 👍 / 👎.

opts.apiVersion !== API_VERSION_WITH_EXPERIMENTAL_CONTROLS ||
opts.model !== MODEL_WITH_EXPERIMENTAL_CONTROLS
) {
if (opts.speed || opts.emotion) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Warn when volume is ignored on non-sonic-3 models

checkGenerationConfig is called when volume is provided, but in the non-sonic-3 branch it only warns for speed/emotion; meanwhile toCartesiaOptions only emits generation_config.volume for sonic-3. This means setting volume on other models is silently dropped, so users get no indication that their configuration has no effect.

Useful? React with 👍 / 👎.

@toubatbrian
toubatbrian merged commit dcd370d into main Mar 6, 2026
8 checks passed
@toubatbrian
toubatbrian deleted the brian/cartesia-volume branch March 6, 2026 22:31
This was referenced Mar 6, 2026
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.

2 participants