本系统可实现多个ESP32进行语音对讲,语音传输,采用udp,espnow协议设计,代码部分采用Arduino IDE开发。
展示视频
基于esp32语音门铃系统设计语音对讲机无线音频采集传输物联网定制设计语音呼叫_哔哩哔哩_bilibili
传输部分代码:
void EspNowTransport::send()
{
esp_err_t result = esp_now_send(broadcastAddress, m_buffer, m_index + m_header_size);
if (result != ESP_OK)
{
Serial.printf("Failed to send: %s\n", esp_err_to_name(result));
}
}
采集部分代码
#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
ADCSampler::ADCSampler(adc_unit_t adcUnit, adc1_channel_t adcChannel, const i2s_config_t &i2s_config) : I2SSampler(I2S_NUM_0, i2s_config)
{
m_adcUnit = adcUnit;
m_adcChannel = adcChannel;<