I have a Python code which listens and detects environmental sounds. It is not my project, I found it on web (SoPaRe). With the ./sopare.py -l command, it starts recording sounds but in infinite loop. When youI want to stop it, youI have to press CTRL+CCtrl+C.
My purpose is to stop this program automatically after 10 seconds, but when I talked with the author and he said, that the program does not have a time limiter. My purpose is to stop this program automatically after 10 seconds etc.
I tried to kill it via kill PID, but PIDPID changes every time when program workedruns. How can stop it after a time interval via bashbash?
Alternatively, I can execute this command from python with os.system() command.