Add wake word to xmini-c3 (#730)

* esp-hi: MCP protocol is not ready yet

* Add wake word to xmini-c3
This commit is contained in:
Xiaoxia
2025-05-31 22:21:03 +08:00
committed by GitHub
parent 6cb025859f
commit ae57131c15
27 changed files with 399 additions and 155 deletions

View File

@@ -227,6 +227,8 @@ bool MqttProtocol::OpenAudioChannel() {
auto nonce = (uint8_t*)data.data();
auto encrypted = (uint8_t*)data.data() + aes_nonce_.size();
AudioStreamPacket packet;
packet.sample_rate = server_sample_rate_;
packet.frame_duration = server_frame_duration_;
packet.timestamp = timestamp;
packet.payload.resize(decrypted_size);
int ret = mbedtls_aes_crypt_ctr(&aes_ctx_, decrypted_size, &nc_off, nonce, stream_block, encrypted, (uint8_t*)packet.payload.data());