mirror of
https://github.com/esphome/esphome.git
synced 2026-10-05 02:21:30 +00:00
[resampler] Add resampler microphone platform (#19953)
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
microphone:
|
||||
- platform: i2s_audio
|
||||
id: resampler_i2s_mic_id
|
||||
i2s_audio_id: i2s_audio_bus
|
||||
adc_type: external
|
||||
i2s_din_pin: ${din_pin}
|
||||
sample_rate: 48000
|
||||
bits_per_sample: 32bit
|
||||
channel: stereo
|
||||
- platform: resampler
|
||||
id: resampler_mic_id
|
||||
microphone:
|
||||
microphone: resampler_i2s_mic_id
|
||||
channels: 0
|
||||
bits_per_sample: 16
|
||||
sample_rate: 16000
|
||||
on_data:
|
||||
- logger.log:
|
||||
format: "Received %u bytes"
|
||||
args: [x.size()]
|
||||
- platform: resampler
|
||||
id: resampler_mic_stereo_id
|
||||
microphone:
|
||||
microphone: resampler_i2s_mic_id
|
||||
channels: [0, 1]
|
||||
bits_per_sample: 32
|
||||
sample_rate: 44100
|
||||
filters: 32
|
||||
taps: 32
|
||||
@@ -0,0 +1,6 @@
|
||||
substitutions:
|
||||
din_pin: GPIO21
|
||||
|
||||
packages:
|
||||
i2s_audio: !include ../../test_build_components/common/i2s_audio/esp32-idf.yaml
|
||||
resampler: !include common-microphone.yaml
|
||||
@@ -0,0 +1,6 @@
|
||||
substitutions:
|
||||
din_pin: GPIO16
|
||||
|
||||
packages:
|
||||
i2s_audio: !include ../../test_build_components/common/i2s_audio/esp32-s3-idf.yaml
|
||||
resampler: !include common-microphone.yaml
|
||||
Reference in New Issue
Block a user