From 13259f76f773017bcd20c17764f585af24c6833e Mon Sep 17 00:00:00 2001 From: pstruebi Date: Wed, 21 May 2025 12:19:39 +0200 Subject: [PATCH] make audiostream 16kHz --- network_audio_streaming/audio_sink.py | 2 +- network_audio_streaming/audio_source.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/network_audio_streaming/audio_sink.py b/network_audio_streaming/audio_sink.py index 418b883..fef735b 100644 --- a/network_audio_streaming/audio_sink.py +++ b/network_audio_streaming/audio_sink.py @@ -4,7 +4,7 @@ import numpy as np import asyncio PORT = 50007 -SAMPLERATE = 44100 +SAMPLERATE = 16000 CHANNELS = 1 CHUNK = 1024 diff --git a/network_audio_streaming/audio_source.py b/network_audio_streaming/audio_source.py index 50abad6..7fe4bd4 100644 --- a/network_audio_streaming/audio_source.py +++ b/network_audio_streaming/audio_source.py @@ -3,9 +3,11 @@ 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 = '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 + PORT = 50007 -SAMPLERATE = 44100 +SAMPLERATE = 16000 CHANNELS = 1 CHUNK = 1024