0
How to process voice and text in python at same time ?
I am developing a desktop chat assistant using Python. For speech output I use pyttsx3 library. For front end I am using tkinter. I have a problem that voice output comes first and after that I can get the text output. But I need output like the chat with Siri, Google assistant which process text & voice at a time. My Code uses two functions, one for getting user input and the another for providing output. def getUserInput(inp): #code to do provideVoiceOutput(inp) def provideVoiceOutput(txt): #voice output using pyttsx3 engine.speak(txt)
1 Answer
+ 1
Use threads