I need a detect sound in audio output

Viewed 20

I listen audio from game, if in audio stream detected specific sound, code click mouse. How to detect sound in audio stream?

Audio stream generates with VoiceMeeter - pyaudio.

Example of code with graph of game audio (19 sec) with desired sound in catch: Audio: https://drive.google.com/file/d/1lXZVxSsMX7tzHzwRjgEqLydGGBCw95gC/view?usp=sharing

import numpy as np
from scipy.io.wavfile import read
import matplotlib.pyplot as plt

# read audio samples
input_data = read("recorded.wav")
audio = input_data[1]
catch = audio[730000:750000]
plt.plot(audio)
# label the axes
plt.ylabel("Amplitude")
plt.xlabel("Time")
# set the title
plt.title("Sample Wav")
# display the plot
plt.show()


print('Finished')
0 Answers
Related