Kokoro-FastAPI
Kokoro-FastAPI copied to clipboard
Add weighted voice blending support to combine endpoint
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.