Kokoro-FastAPI icon indicating copy to clipboard operation
Kokoro-FastAPI copied to clipboard

Add weighted voice blending support to combine endpoint

Open RaphaelRemond opened this issue 2 months ago • 0 comments

Add weighted voice blending support to combine endpoint

This update introduces the ability to assign custom weights to each voice when generating a combined voice tensor. Previously, all voices were implicitly treated as having equal weight, limiting control over the blending process.

The new implementation:

  • Parses voice entries with optional weight values (e.g. "emma:0.7+isabella:0.3")
  • Validates and normalizes weights to ensure consistent mixing
  • Loads tensors efficiently and applies weighted blending
  • Produces a properly named output file reflecting the applied ratios

This change enables more flexible and accurate voice composition.

RaphaelRemond avatar Nov 14 '25 17:11 RaphaelRemond