My app IboChat is an AI voice chat. You make a character, record a voice sample, and the app clones that voice for the character. Then one day a character I created spoke in a plain default voice. No crash. No error on screen. Here's the bug, why it hid so well, and the three small changes that fixed it.
What Went Wrong: A Failed Step Saved as NULL
A separate voice service does the cloning, and it wasn't always running when someone created a character. The commit that fixed this is titled Surface failed voice clones + wire re-clone recovery into chat (was silent voice_id=None). The title says it all. Here's the part of the create endpoint that decides what happens when the clone fails:
voice_id = None if audio_file and audio_file . filename : normalized_path = _normalize_voice_sample_to_wav ( audio_file ) try : if normalized_path : . . .…