• Stefy Lanza (nextime / spora )'s avatar
    ask a backend for its voices the way backends actually expose them · c33f92ba
    Stefy Lanza (nextime / spora ) authored
    XTTS reported no voices after seventeen successful syntheses, and the reason was
    that the loaded and remembered paths had never worked for any engine since they
    were written. Every backend declares `voices` as a METHOD; both callers read it
    as a sequence:
    
        [str(v) for v in (getattr(backend, "voices", None) or [])]
    
    A bound method is truthy, so the `or []` never fired, iterating it raised
    TypeError, and both callers caught that and fell back to "nothing known". No
    voice was ever recorded or returned, and the cache file had never been written
    once. Kokoro and bark hid it behind their static lists; XTTS and parler, having
    none, published zero for ever.
    
    The tests passed because their fake sets `voices` as a list attribute — a shape
    no real backend has. A new test asserts the contract against the real classes
    through inspect rather than against a fixture, which is the only version of this
    test that could have failed.
    
    With that fixed, 58 XTTS voices were recorded and the listing still showed none:
    they were written under "XTTS-v2", the id the request used, and looked up under
    "coqui/XTTS-v2", the id the listing publishes. The lookup now falls back to
    matching the last path segment — the idiom the coqui speaker lookup already uses
    — with an exact key still winning and distinct models still distinct.
    
    The existing never-breaks-synthesis test then caught a gap in the first fix: a
    backend may expose `voices` as a PROPERTY, so merely reading the attribute runs
    its code and can raise. The getattr is inside the guard for that reason.
    
    Live after this: XTTS-v2 58 voices, Kokoro 54, bark 130, parler 0 with
    voice_selection "described", which is the honest answer for an engine steered by
    a text description.
    Co-Authored-By: 's avatarClaude Opus 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_014T3rZozi1Ehk96NG1WesgC
    c33f92ba
Name
Last commit
Last update
codai Loading commit data...
docs Loading commit data...
packaging Loading commit data...
samples Loading commit data...
tests Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.dockerignore Loading commit data...
.gitignore Loading commit data...
AI.PROMPT Loading commit data...
CODERAI_API_DOCUMENTATION.md Loading commit data...
CoderAI.gif Loading commit data...
DISTRIBUTION.md Loading commit data...
LICENSE.md Loading commit data...
MULTIMODAL_CAPABILITIES.md Loading commit data...
MULTIMODAL_UI_EXAMPLES.md Loading commit data...
README.md Loading commit data...
REQUEST-geoclip-embeddings.md Loading commit data...
REQUEST-vpr-embeddings.md Loading commit data...
amdgpu-coredump-05000.bin Loading commit data...
build-oci.sh Loading commit data...
build.ps1 Loading commit data...
build.sh Loading commit data...
coderai Loading commit data...
coderai-broker-implementation-reference.md Loading commit data...
coderai-integration.md Loading commit data...
commands Loading commit data...
osxbuild.sh Loading commit data...
package-oci.sh Loading commit data...
package-tarball.sh Loading commit data...
requirements-acestep.txt Loading commit data...
requirements-crisperwhisper.txt Loading commit data...
requirements-h3.txt Loading commit data...
requirements-latentsync.txt Loading commit data...
requirements-longcat-train.txt Loading commit data...
requirements-longcat.txt Loading commit data...
requirements-melotts.txt Loading commit data...
requirements-musetalk.txt Loading commit data...
requirements-nemo.txt Loading commit data...
requirements-nvidia.txt Loading commit data...
requirements-ocr-paddle.txt Loading commit data...
requirements-ocr.txt Loading commit data...
requirements-parler.txt Loading commit data...
requirements-pyannote.txt Loading commit data...
requirements-surya.txt Loading commit data...
requirements-vllm.txt Loading commit data...
requirements-vulkan.txt Loading commit data...
requirements-xtts.txt Loading commit data...
requirements.txt Loading commit data...
run-oci.sh Loading commit data...
smoke-test-oci.sh Loading commit data...
todo.md Loading commit data...