Open gnumpi opened 2 months ago
From what i get from the above this is the route's
Why not show it in a chain structure like:
audio:
- platform: i2s_audio
id: adf_i2s_out
i2s_audio_id: i2s_out
i2s_dout_pin: GPIO10
- platform: i2s_audio
id: adf_i2s_in
i2s_audio_id: i2s_in
i2s_din_pin: GPIO4
channel: left
sample_rate: 16000
bits_per_sample: 16bit
- platform: audio_processing
type: resample-filter
id: downsample
microphone:
- platform: adf_audio
id: adf_microphone
source:
element: downsample
source:
element: adf_i2s_in
speaker:
- platform: adf_audio
id: adf_speaker
destiny:
element: downsample
destiny:
element: adf_i2s_out
media_player:
- platform: adf_pipeline_element
id: adf_media_player
name: s3-dev_media_player
internal: false
speaker: adf_speaker
voice_assistant:
id: va
mic: adf_microphone
speaker: adf_speaker
...
As you can see i changed sink in destiny, i think that fits more together with source. An other option is to change source into faucet but i do not thing de common person get what is mend with those.
Maybe it can simpler (basically what you already have. without the self):
microphone:
- platform: adf_audio
id: adf_microphone
source:
- downsample
- adf_i2s_in
speaker:
- platform: adf_audio
id: adf_speaker
destiny:
- downsample
- adf_i2s_out
From what i get from the above this is the route's
That's not completely correct. The media player does not use the speaker component it outputs directly to the pipeline and the VA can be configured to use either, the MP or the speaker as an output.
Maybe it can simpler (basically what you already have. without the self):
microphone: - platform: adf_audio id: adf_microphone source: - downsample - adf_i2s_in speaker: - platform: adf_audio id: adf_speaker destiny: - downsample - adf_i2s_out
I like this suggestions!!!
I like this suggestions!!!
The only pro of the other solution would be that we could add extra component specific options as well
hat's not completely correct. The media player does not use the speaker component it outputs directly to the pipeline and the VA can be configured to use either, the MP or the speaker as an output.
It would be a better idea to remove the I2S stuff from the MP and use the Speaker component for the I2S
hat's not completely correct. The media player does not use the speaker component it outputs directly to the pipeline and the VA can be configured to use either, the MP or the speaker as an output.
It would be a better idea to remove the I2S stuff from the MP and use the Speaker component for the I2S
The I2S stuff is not part of the MP. The MP, Speaker and Microphone as well as I2SIn and I2SOut are all individual elements that can 'talk' to each other via the adf_pipeline. The speaker component can be used to provide a pipeline interface for esphome components which don't have an adf_pipeline implementation. It is more efficient to connect the MP directly to I2S or any other output like the pipeline implementation of matrixio voice.
The current configuration schema for ADF pipeline components is not intuitive and primarily focuses on the developer's perspective rather than the user's perspective.
I am planing the following changes:
old config:
new config:
Any comments or suggestions on this?