fix: voice interupt
This commit is contained in:
@ -13,6 +13,7 @@ static const char* const STATE_STRINGS[] = {
|
||||
"idle",
|
||||
"connecting",
|
||||
"listening",
|
||||
"thinking",
|
||||
"speaking",
|
||||
"upgrading",
|
||||
"activating",
|
||||
@ -69,9 +70,10 @@ bool DeviceStateMachine::IsValidTransition(DeviceState from, DeviceState to) con
|
||||
to == kDeviceStateActivating;
|
||||
|
||||
case kDeviceStateIdle:
|
||||
// Can go to connecting, listening (manual mode), speaking, activating, upgrading, or wifi configuring
|
||||
// Can go to connecting, listening (manual mode), thinking, speaking, activating, upgrading, or wifi configuring
|
||||
return to == kDeviceStateConnecting ||
|
||||
to == kDeviceStateListening ||
|
||||
to == kDeviceStateThinking ||
|
||||
to == kDeviceStateSpeaking ||
|
||||
to == kDeviceStateActivating ||
|
||||
to == kDeviceStateUpgrading ||
|
||||
@ -83,8 +85,15 @@ bool DeviceStateMachine::IsValidTransition(DeviceState from, DeviceState to) con
|
||||
to == kDeviceStateListening;
|
||||
|
||||
case kDeviceStateListening:
|
||||
// Can go to speaking or idle
|
||||
// Can go to thinking, speaking, or idle
|
||||
return to == kDeviceStateThinking ||
|
||||
to == kDeviceStateSpeaking ||
|
||||
to == kDeviceStateIdle;
|
||||
|
||||
case kDeviceStateThinking:
|
||||
// Can go to speaking, listening, or idle
|
||||
return to == kDeviceStateSpeaking ||
|
||||
to == kDeviceStateListening ||
|
||||
to == kDeviceStateIdle;
|
||||
|
||||
case kDeviceStateSpeaking:
|
||||
|
||||
Reference in New Issue
Block a user