initial audiostreaming over the network works
This commit is contained in:
@@ -14,6 +14,6 @@ sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
|||||||
def callback(indata, frames, time, status):
|
def callback(indata, frames, time, status):
|
||||||
sock.sendto(indata.tobytes(), (IP, PORT))
|
sock.sendto(indata.tobytes(), (IP, PORT))
|
||||||
|
|
||||||
with sd.InputStream(samplerate=SAMPLERATE, channels=CHANNELS, blocksize=CHUNK, callback=callback):
|
with sd.InputStream(samplerate=SAMPLERATE, channels=CHANNELS, dtype='int16', blocksize=CHUNK, callback=callback):
|
||||||
print("Streaming audio...")
|
print("Streaming audio...")
|
||||||
input() # Press Enter to stop
|
input() # Press Enter to stop
|
||||||
Reference in New Issue
Block a user