0

I am trying to create a streaming app on flask but i can figure out how to make sound to num py array.I have tried:

import sounddevice as sd
   # seconds

def callback(indata, outdata, frames, time, status):
    if status:
        print(status)
    outdata[:] = indata

while True:
    x=sd.Stream.read(frames=1)
    print(x)

and using some other libbrarys coneccted to audio but i cinda dont understand nothing conected to their codes so it will be cool to tell me some info about the code I know i should use sounddevice.Stream.read() but i cant figure out how

(sorry for bad grammar)

1 Answers1

0

Stream.read() returns two values. Try this

narr,x=sd.Stream.read(frames=1)
print(narr)
Omi
  • 111
  • 8