From cb54d3b8d930b69cee4b9f60419cbb550a03bd49 Mon Sep 17 00:00:00 2001 From: "DHR.Mike" Date: Sat, 13 Dec 2025 13:44:21 -0800 Subject: [PATCH] Update Uptated-Prototype/PiperTTS-GUI-Test.py --- Uptated-Prototype/PiperTTS-GUI-Test.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Uptated-Prototype/PiperTTS-GUI-Test.py b/Uptated-Prototype/PiperTTS-GUI-Test.py index ac34efc..ef434bc 100644 --- a/Uptated-Prototype/PiperTTS-GUI-Test.py +++ b/Uptated-Prototype/PiperTTS-GUI-Test.py @@ -228,6 +228,16 @@ def PiperTTS_GUI_Set_Prefrences(): print(e, type(e)) print("An exception occurred - when Setting prefrences.") +# +def Select_Voice_For_Language(Mylanguages): + mylist2 = [] + for voice_id, info in data.items(): + if info["language"]["name_native"] == Mylanguages: + mylist2.append(f"{info["name"]}") + + mylist2 = list(dict.fromkeys(mylist2)) + print(mylist2) + ''' # @@ -321,7 +331,9 @@ GUI_Combobox_1_Label = Label(Prefrences_Frame, text="Language?") GUI_Combobox_1 = ttk.Combobox(Prefrences_Frame, textvariable = mylist_String) # GUI_Combobox_1["values"] = mylist -GUI_Combobox_1.bind("<>", lambda event: print(mylist_String.get().split(" ", 1)[0])) +#GUI_Combobox_1.bind("<>", lambda event: print(mylist_String.get().split(" ", 1)[0])) +GUI_Combobox_1.bind("<>", lambda event: Select_Voice_For_Language(mylist_String.get().split(" ", 1)[0])) + # GUI_Combobox_2_Label = Label(Prefrences_Frame, text="Voice?") GUI_Combobox_2 = ttk.Combobox(Prefrences_Frame)