设备呼叫功能允许两个已配置设备之间通过语音/数据通道进行双向通信。设备A呼叫设备B时,系统通过以下流程实现:
设备A → 授权校验 → MQTT网关 → 设备B远程唤醒 → 建立连接 → 通话建立
ESP32-S3,因为只有ESP32-S3才支持远程唤醒功能。两个麦克风。但是如果你的设备只有单个麦克风,你只是想体验一下这个功能,也是可以的,但是会有强烈的卡顿感。智控台来管理设备的权限和通信。2026年5月27日以后的MQTT网关服务,如果你已经部署了MQTT网关服务,请确认代码的版本是2026年5月27日之后的版本。以上是使用这个功能的硬性条件,接下来会详细介绍。
0.9.4或以上版本。双向授权说明: 如需设备A和设备B互相通信,必须在两侧智控台分别配置对方权限。例如:
cpp void RemoteWakeup(const std::string& reason); 在application.cc文件中添加远程唤醒函数
```cpp
void Application::RemoteWakeup(const std::string& reason){
if (!protocol_) {
return;
}
auto state = GetDeviceState();
if (state == kDeviceStateIdle) {
audio_service_.EncodeWakeWord();
if (!protocol_->IsAudioChannelOpened()) {
SetDeviceState(kDeviceStateConnecting);
if (!protocol_->OpenAudioChannel()) {
audio_service_.EnableWakeWordDetection(true);
return;
}
}
std::string wake_word = reason;
// Encode and send the wake word data to the server
while (auto packet = audio_service_.PopWakeWordPacket()) {
protocol_->SendAudio(std::move(packet));
}
// Set the chat state to wake word detected
protocol_->SendWakeWordDetected(wake_word);
SetListeningMode(aec_mode_ == kAecOff ? kListeningModeAutoStop : kListeningModeRealtime);
// Set flag to play popup sound after state changes to listening
// (PlaySound here would be cleared by ResetDecoder in EnableVoiceProcessing)
play_popup_on_listening_ = true;
SetListeningMode(aec_mode_ == kAecOff ? kListeningModeAutoStop : kListeningModeRealtime);
} else if (state == kDeviceStateSpeaking) {
AbortSpeaking(kAbortReasonWakeWordDetected);
SetDeviceState(kDeviceStateIdle);
} else if (state == kDeviceStateActivating) {
SetDeviceState(kDeviceStateIdle);
}
}cpp AddUserOnlyTool("self.remote_wakeup", "Remote wakeup function with configurable parameters", PropertyList({ Property("reason", kPropertyTypeString, "Wakeup reason"), }), [this](const PropertyList& properties) -> ReturnValue { std::string reason = properties["reason"].value<std::string>(); ESP_LOGI(TAG, "Wakeup reason=%s", reason.c_str()); auto& app = Application::GetInstance(); app.RemoteWakeup(reason); return true; 准备两个设备,在智控台上面配置好通讯权限和在智能体中添加呼叫工具之后,在其中一个小智对话那里对他说:”呼叫XXX“,观察设备B是否响应。
FunASRServer,可以在容器里的热词文件里添加"张山",然后重启容器。火山引擎的服务,可以在火山引擎的控制台里添加热词文件,然后回到智控台的模型配置页面,把热词文件名称配置在火山引擎的tts上去。