Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion common/audio_lm_family_codebook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ class codebook_family : public alm_family {
out->takes_ref_audio = audio_lm_codec_can_speaker_from_audio(alm_);
out->takes_ref_text = out->takes_ref_audio && audio_lm_talker_has_projection(alm_);
out->takes_instruct = meta_true("codec.lm.qwen3tts.takes_instruct");
out->needs_voice = audio_lm_talker_has_projection(alm_) && !talker_voice(audio_lm_decode_speaker(alm_));
// The model's default voice, not the last request's (decode_speaker).
out->needs_voice = audio_lm_talker_has_projection(alm_) && !talker_voice(audio_lm_resolve_speaker(alm_, nullptr));
const char * sr = audio_lm_meta_str(alm_, "codec.sample_rate");
out->sample_rate = sr ? std::atoi(sr) : 24000;
}
Expand Down
3 changes: 3 additions & 0 deletions tests/e2e/audio_lm_host_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ def main() -> int:
alm = codec_cpp.AudioLM(case["codec"], backbone_path=case["backbone"] if case.get("backbone_path") else None)
bb = Backbone(case["backbone"], alm, max_frames=400)
try:
caps = alm.caps
req = {}
if "ref" in case: # a cloned voice: create, save, reload
wav, txt = case["ref"]
Expand All @@ -229,6 +230,8 @@ def main() -> int:
voice = alm.load_voice(Path(d) / "voice.gguf")
req["voice"] = voice
audio, sr, frames, stop = synthesize(alm, bb, case["text"], case["sampling"], **req)
# Caps describe the model, not the last request's voice.
assert alm.caps == caps, f"caps changed after a generation: {caps} -> {alm.caps}"
except Exception as e:
print(f"[FAIL] {name}: {e}")
failed += 1
Expand Down
Loading