Skip to content

feat: add --volume flag for audio gain control#55

Merged
pszymkowiak merged 1 commit intortk-ai:mainfrom
felix021:feat/volume-control
Apr 16, 2026
Merged

feat: add --volume flag for audio gain control#55
pszymkowiak merged 1 commit intortk-ai:mainfrom
felix021:feat/volume-control

Conversation

@felix021
Copy link
Copy Markdown
Contributor

@felix021 felix021 commented Apr 9, 2026

Summary

  • Add --volume multiplier (0.0–5.0) across CLI, MCP, and daemon
  • Fix WAV spec mismatch in apply_wav_gain (always write 16-bit int)
  • Fix SpeakOptions::default() volume from 0.0 to 1.0
  • Validate volume range at all entry points (CLI rejects, MCP/daemon clamp)
  • Update all 6 README translations with volume example

Test plan

  • cargo build passes
  • --volume 6.0 rejected by CLI
  • GPU test: 1.0x vs 2.5x gain verified (exact 2.5x scaling, no clipping)
  • WAV output format correct (Int 16bit) after gain

🤖 Generated with Claude Code

@pszymkowiak
Copy link
Copy Markdown
Contributor

wshm · Automated triage by AI

📊 Automated PR Analysis

Type feature
🟡 Risk medium

Summary

Adds a --volume flag (0.0–5.0) for audio gain control across CLI, MCP, and daemon entry points. Fixes WAV spec handling in apply_wav_gain to always output 16-bit int, corrects SpeakOptions default volume from 0.0 to 1.0, and updates all 6 README translations with volume examples.

Review Checklist

  • Tests present
  • Breaking change
  • Docs updated

Analyzed automatically by wshm · This is an automated analysis, not a human review.

Add volume multiplier (0.0–5.0) across CLI, MCP, and daemon.
Fix WAV spec mismatch in apply_wav_gain, default volume to 1.0.
Update all 6 README translations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@pszymkowiak pszymkowiak force-pushed the feat/volume-control branch from b084ce3 to fed3d40 Compare April 16, 2026 10:06
@pszymkowiak
Copy link
Copy Markdown
Contributor

Thanks for the clean implementation @felix021!

I rebased on main (resolved merge conflicts with the kokoro backend rewrite), and added a Volume selector to the TUI (vox setup) with presets from 0.5x to 3.0x -- wired to your --volume flag.

Changes I made during rebase:

  • Resolved conflict in kokoro.rs (backend was rewritten from Python subprocess to native Rust)
  • Added Volume screen to TUI with presets (0.5, 0.75, 1.0, 1.25, 1.5, 2.0, 3.0)
  • Integrated selected_volume() into test_speak() so TUI test respects volume

LGTM, merging.

@pszymkowiak pszymkowiak merged commit 6831a0a into rtk-ai:main Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants