主权项 |
1. A method comprising:
receiving, by an electronic device operating in a sleep mode, an audio signal; detecting, by the electronic device, a trigger phrase in the audio signal; determining, by the electronic device, an average energy of the trigger phrase over a duration of the trigger phrase; determining, by the electronic device, a maximum energy of the trigger phrase; determining, by the electronic device, a ratio of the maximum energy of the trigger phrase to the average energy of the trigger phrase; determining, by the electronic device, whether the ratio is greater than a threshold value; responsive to determining that the ratio is greater than the threshold value, rejecting the trigger phrase as being invalid; responsive to determining that the ratio is not greater than the threshold value, determining, by the electronic device, that the trigger phrase is valid; and responsive to determining that the trigger phrase is valid:
transitioning, by the electronic device, from operating in the sleep mode to operating in a wake mode;receiving, by the electronic device, at least one voice command; andprocessing, by the electronic device, the at least one voice command. |