esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
293 stars 36 forks source link

Issue with error while compiling i2s mic #6064

Open plplaaa2 opened 4 months ago

plplaaa2 commented 4 months ago

The problem

An error occurs while compiling i2s mic, which causes the mic to not function properly

Which version of ESPHome has the issue?

2024.7.0 Jul 21 2024,

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2024.7.2

What platform are you using?

ESP32-IDF

Board

ESP32 S3

Component causing the issue

microphone

Example YAML snippet

improv_serial:

i2s_audio:
  - id: i2s_audio_in
    i2s_lrclk_pin: GPIO5
    i2s_bclk_pin: GPIO7

microphone:
  - platform: i2s_audio
    id: echo_microphone
    i2s_din_pin: GPIO9
    i2s_audio_id: i2s_audio_in
    adc_type: external
    channel: left
    bits_per_sample: 16bit
    pdm: false

micro_wake_word:
  models:
    - model: okay_nabu
  on_wake_word_detected:
    then:
      - voice_assistant.start:
          wake_word: !lambda return wake_word;

voice_assistant:
  id: va
  microphone: echo_microphone
  #media_player: 
  noise_suppression_level: 2
  auto_gain: 15dBFS
  volume_multiplier: 2.0
  #vad_threshold: 3

Anything in the logs that might be useful for us?

Compiling .pioenvs/zigbee-living-sensor/src/esphome/components/i2s_audio/microphone/i2s_audio_microphone.o
src/esphome/components/i2s_audio/microphone/i2s_audio_microphone.cpp: In member function 'void esphome::i2s_audio::I2SAudioMicrophone::start_()':
src/esphome/components/i2s_audio/microphone/i2s_audio_microphone.cpp:62:3: warning: missing initializer for member 'i2s_driver_config_t::chan_mask' [-Wmissing-field-initializers]
   };
   ^
src/esphome/components/i2s_audio/microphone/i2s_audio_microphone.cpp:62:3: warning: missing initializer for member 'i2s_driver_config_t::total_chan' [-Wmissing-field-initializers]
src/esphome/components/i2s_audio/microphone/i2s_audio_microphone.cpp:62:3: warning: missing initializer for member 'i2s_driver_config_t::left_align' [-Wmissing-field-initializers]
src/esphome/components/i2s_audio/microphone/i2s_audio_microphone.cpp:62:3: warning: missing initializer for member 'i2s_driver_config_t::big_edin' [-Wmissing-field-initializers]
src/esphome/components/i2s_audio/microphone/i2s_audio_microphone.cpp:62:3: warning: missing initializer for member 'i2s_driver_config_t::bit_order_msb' [-Wmissing-field-initializers]
src/esphome/components/i2s_audio/microphone/i2s_audio_microphone.cpp:62:3: warning: missing initializer for member 'i2s_driver_config_t::skip_msk' [-Wmissing-field-initializers]
Compiling

Additional information

I didn't have any problems when I first compiled it, but I'm having problems after several compilations for modifications.

Even now, I accidentally managed to compile once or so, and the microphone works, and I tried to compile again afterwards, but it didn't work again.

Things I've tried

  1. Build File Clean (X)
  2. esphome add on remove and re install (X)
  3. changed pin number (O, Just once)

My microphone is currently working with 3 attempts and the issue is happening again when I re-compile it afterwards.

github-actions[bot] commented 1 week ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.