Update Uptated-Prototype/PiperTTS-GUI-Test.py

This commit is contained in:
2025-12-11 12:51:44 -08:00
parent 788b8cc22b
commit cb0586743b

View File

@@ -226,12 +226,18 @@ except:
print("Mkay did not work.")
#
def OnKeyPress(event):
start_time = time.time()
Test_var.set("There are {}, lines".format(len(Input_Box.get("1.0","end-1c").splitlines())))
print("The Binding Function Was Called!")
end_time = time.time()
print(f'Elapsed Time: {end_time - start_time} seconds')
#
def OnKeyPress2nd(event):
start_time = time.time()
print("displaylines:", Input_Box.count("1.0", "end", "displaylines"))
print("lines:", Input_Box.count("1.0", "end", "lines"))
end_time = time.time()
print(f'Elapsed Time: {end_time - start_time} seconds')
#
Input_Box.bind("<Return>", OnKeyPress2nd)
Input_Box.bind("<Alt-KeyPress-Return>", OnKeyPress)