modify chunk size

This commit is contained in:
2025-05-22 15:26:13 +02:00
parent 13259f76f7
commit c6b5e4cef9
2 changed files with 3 additions and 4 deletions

View File

@@ -6,7 +6,7 @@ import asyncio
PORT = 50007
SAMPLERATE = 16000
CHANNELS = 1
CHUNK = 1024
CHUNK = 160
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind(('0.0.0.0', PORT))

View File

@@ -1,15 +1,14 @@
import socket
import sounddevice as sd
import numpy as np
# Settings
#IP = '10.42.0.231' # when rpi is connected to the ethernet socket of the laptop
IP = '0.0.0.0' # same as the laptop for local testing
IP = '127.0.0.1' # for local testing
PORT = 50007
SAMPLERATE = 16000
CHANNELS = 1
CHUNK = 1024
CHUNK = 160 # TODO: find the right chunk size
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)