I'm doing a python program that runs within an infinite loop ..
Under certain conditions I need to play an audio, but I can not wait for the audio to finish to continue the process. I thought of something async, that is, while I'm running the process (loop) a thread is created to play the audio while everything else continues. Well I'm talking about thinking of my development language (C #) in Python I do not know how to do
I tried with subprocess but it basically just opens an AVL of life and plays it, and even then it is not an unattended play
while True:
time.sleep(1)
if condicao1 > condicao2:
PlayAudio ##toca o audio e continua
#Gravalog()