I am doing a project that uses sounddevice in order to record sound. I will also need to use the frequency and the volume of the sound for the project. I have figured out how to record sounds, but I am having trouble figure out how to manipulate the array that the recorded sound is stored as since I do not know what any of the values correspond to. I tried looking online to figure out how the arrays in sounddevice work, but the information either wasn't there or it did not make sense to me.
When I try printing the array I get this:
array([[ 0.0000000e+00, 0.0000000e+00],
[-3.0517578e-05, 0.0000000e+00],
[ 0.0000000e+00, 0.0000000e+00],
...,
[-2.0446777e-02, -2.0416260e-02],
[-1.3946533e-02, -1.3946533e-02],
[ 2.7465820e-04, 2.7465820e-04]], dtype=float32)
This is a link to the documentation of sounddevice: https://python-sounddevice.readthedocs.io/en/0.3.15/
This is what I am using to record the sound:
import sounddevice as sd
#from scipy.io.wavfile import write
#from derivatives import slope
import numpy as np
fs = 45000
seconds = 1
test = input()
if test == '':
myrecording = sd.rec(int(seconds * fs), samplerate=fs, channels=2)
print('recording')
sd.wait()
print('done recording')
#write('output.wav', fs, myrecording)