mirror of
https://github.com/mudler/LocalAI.git
synced 2026-09-12 22:33:54 -04:00
feat(tts): support multi-reference personalities
Saved profiles previously resolved to one audio path and transcript, so cloning backends could not use several examples of one personality. Store ordered audio and transcript pairs while preserving the legacy first-reference fields. Fish Speech and audio.cpp receive all pairs, including on distributed workers. Other backends retain their single-reference behavior. Assisted-by: Codex:gpt-5 Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
1 parent
ddda0436a3
commit
db09452d54
19 files changed
+463
-118
No files matched your search
@@ -22,7 +22,8 @@ bool voice_is_reference_file(const std::string &voice) {
|
||||
|
||||
RequestShape build_tts_shape(const backend::TTSRequest &request) {
|
||||
RequestShape shape;
|
||||
shape.has_voice_reference = voice_is_reference_file(request.voice());
|
||||
shape.has_voice_reference = voice_is_reference_file(request.voice()) ||
|
||||
request.params().find("multi_reference_cond") != request.params().end();
|
||||
// !empty() as well as has_instructions(), and it must match the guard in
|
||||
// build_tts_request: a request whose instructions are an empty string
|
||||
// carries no style condition, so telling routing to prefer VoiceDesign for
|
||||
|
||||
Reference in new issue
Block a user