Add server AEC option

This commit is contained in:
Xiaoxia
2025-05-09 14:00:26 +08:00
parent 7ea67146d5
commit be18c1aa04
11 changed files with 47 additions and 26 deletions

View File

@@ -189,6 +189,9 @@ bool WebsocketProtocol::OpenAudioChannel() {
std::string message = "{";
message += "\"type\":\"hello\",";
message += "\"version\": " + std::to_string(version_) + ",";
#if CONFIG_USE_SERVER_AEC
message += "\"features\":{\"aec\":true},";
#endif
message += "\"transport\":\"websocket\",";
message += "\"audio_params\":{";
message += "\"format\":\"opus\", \"sample_rate\":16000, \"channels\":1, \"frame_duration\":" + std::to_string(OPUS_FRAME_DURATION_MS);