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)

15th Feb 2020, 2:23 AM
Siva
Siva - avatar
1 Odpowiedź
+ 1
Use threads
15th Feb 2020, 4:17 AM
M Loren
M Loren - avatar