mirror of
https://github.com/esphome/esphome.git
synced 2025-10-07 04:13:47 +01:00
[i2s_audio, microphone, micro_wake_word, voice_assistant] Use microphone source to process incoming audio (#8645)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
@@ -36,7 +36,7 @@ StopCaptureAction = microphone_ns.class_(
|
||||
|
||||
DataTrigger = microphone_ns.class_(
|
||||
"DataTrigger",
|
||||
automation.Trigger.template(cg.std_vector.template(cg.int16).operator("ref")),
|
||||
automation.Trigger.template(cg.std_vector.template(cg.uint8).operator("ref")),
|
||||
)
|
||||
|
||||
IsCapturingCondition = microphone_ns.class_(
|
||||
@@ -98,10 +98,11 @@ def microphone_source_schema(
|
||||
return config
|
||||
|
||||
return cv.All(
|
||||
cv.maybe_simple_value(
|
||||
automation.maybe_conf(
|
||||
CONF_MICROPHONE,
|
||||
{
|
||||
cv.GenerateID(CONF_ID): cv.declare_id(MicrophoneSource),
|
||||
cv.Required(CONF_MICROPHONE): cv.use_id(Microphone),
|
||||
cv.GenerateID(CONF_MICROPHONE): cv.use_id(Microphone),
|
||||
cv.Optional(CONF_BITS_PER_SAMPLE, default=16): cv.int_range(
|
||||
min_bits_per_sample, max_bits_per_sample
|
||||
),
|
||||
@@ -112,7 +113,6 @@ def microphone_source_schema(
|
||||
),
|
||||
cv.Optional(CONF_GAIN_FACTOR, default="1"): cv.int_range(1, 64),
|
||||
},
|
||||
key=CONF_MICROPHONE,
|
||||
),
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user