From 0c49d9a0861a84235d4ba607c70a060d6c51a4ff Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 28 Dec 2025 19:31:05 -0800 Subject: [PATCH] ... --- lib/gradio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gradio.py b/lib/gradio.py index d94ddfbe..21c31738 100644 --- a/lib/gradio.py +++ b/lib/gradio.py @@ -1162,7 +1162,7 @@ def build_interface(args:dict)->gr.Blocks: voice_options = [('Default', None)] + sorted(voice_options, key=lambda x: x[0].lower()) else: voice_options = sorted(voice_options, key=lambda x: x[0].lower()) - if session['voice'] is not None: + if session['voice'] is not None and isinstance(session.get('voice'), str): if session['voice_dir'] not in session['voice']: if not any(v[1] == session['voice'] for v in voice_options): voice_path = Path(session['voice'])