burada gui arayüzüne kullanıcıdan gelen sesi yazdırabilir miyiz bağlantısınız kuramadım
mikrofon ile yazıya çevrilen komutları gui arayüzüme de eklemek istiyorum kullanıcı ne sorduğunu bilmesi açısından ama label ile denedim yapamadım
def speak(string):
tts = gTTS(string, lang="tr")
rand = random.randint(1, 10000)
file = "audio-" + str(rand) + ".mp3"
tts.save(file)
playsound(file)
os.remove(file)
time.sleep(1)
while True:
voice = record()
voice = voice.lower()
print(voice)
response(voice)
play_sound()
time.sleep(1)
def gui(geometry, title):
root = Tk()
root.configure(background='white')
root.geometry(f"{geometry}")
root.title(f"{title}")
picture = PhotoImage(file='C:\\Users\\Ali Tabak\\Desktop\\jack2\\mikrofon.png')
speak = Button(root,image=picture,bg="white",borderwidth=0, command=lambda: Thread(target=mainCommands).start())
speak.image=picture
speak.pack()
isim1=tk.Label(root,text="JACK",fg="blue",bg="white",font="Times 20 italic")
isim1.pack()
root.resizable(0, 0)
if __name__ == "__main__":
gui("300x200", "Asistan")
mainloop()