From cbc2c3e423db8bbd3f501aa2f2d7320f4a85d3dd Mon Sep 17 00:00:00 2001 From: Kevin Ahrendt Date: Thu, 17 Oct 2024 11:31:02 -0400 Subject: [PATCH] Bugfix: Send the configured sample rate to the speaker (#165) --- esphome/components/nabu/nabu_media_player.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/nabu/nabu_media_player.cpp b/esphome/components/nabu/nabu_media_player.cpp index 3acbfc6..ebb9ba2 100644 --- a/esphome/components/nabu/nabu_media_player.cpp +++ b/esphome/components/nabu/nabu_media_player.cpp @@ -127,7 +127,7 @@ esp_err_t NabuMediaPlayer::start_pipeline_(AudioPipelineType type, bool url) { audio::AudioStreamInfo audio_stream_info; audio_stream_info.channels = 2; audio_stream_info.bits_per_sample = 16; - audio_stream_info.sample_rate = 48000; + audio_stream_info.sample_rate = this->sample_rate_; this->speaker_->set_audio_stream_info(audio_stream_info); }