Wake-up method of electronic equipment, equipment, storage medium and computer program product
By using voice wake-up recognition to adjust the processor frequency in wearable devices such as smart glasses, the problem of prolonged response time in sleep state is solved, a balance between quick wake-up and battery life is achieved, and the user experience is improved.
Patent Information
- Application Number
- CN202410772842.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2024-08-23
AI Technical Summary
Wearable devices such as smart glasses reduce the operating frequency of the processor in the sleep state to save power, resulting in prolonged voice wake-up response time and affecting the user experience.
When the electronic device is in a sleep state, voice wake-up recognition is performed by obtaining the audio stream to be recognized, and the processor operating frequency is adjusted according to the wake-up value to ensure that the device is woken up in time when the wake-up word is recognized to avoid delays.
It effectively shortens the response delay of voice wake-up, extends the battery life of the device, and improves the user experience.
Smart Images

Figure CN118538217A
Abstract
Description
Technical Field
[0001] The present application relates to the field of voice processing technology, and in particular to a method, device, storage medium and computer program product for waking up an electronic device. Background Art
[0002] In the related art, wearable devices such as smart glasses will shut down most modules in the dormant state to save power and extend the standby time. For example, when the smart glasses are off screen, the speaker module and Bluetooth module can be turned off, and the processor frequency can be reduced. However, since the processor runs slower in the frequency reduction state, the response time in the voice wake-up process is prolonged, which affects the user experience. Summary of the invention
[0003] In a first aspect, an embodiment of the present application provides a method for waking up an electronic device, comprising:
[0004] When the electronic device is in a dormant state, obtaining an audio stream to be identified;
[0005] Performing voice wake-up recognition on a first audio segment in the audio stream to be recognized, and obtaining a wake-up value of a first audio segment set, where the first audio segment set includes the first audio segment and at least one audio segment before the first audio segment; the wake-up value of the first audio segment set is used to characterize the confidence that the wake-up word is included in the first audio segment set;
[0006] In response to the wake-up value of the first audio segment set being greater than or equal to the first wake-up threshold value and less than the second wake-up threshold value, at least increasing the operating frequency of the processor of the electronic device; the second wake-up threshold value being greater than the first wake-up threshold value;
[0007] Performing voice wake-up recognition on a second audio segment after the first audio segment to obtain a wake-up value of a second audio segment set, where the second audio segment set includes the second audio segment and multiple audio segments before the second audio segment, and the multiple audio segments before the second audio segment include the first audio segment; the wake-up value of the second audio segment set is used to characterize the confidence that the wake-up word is included in the second audio segment set;
[0008] In response to the wake-up value of the second audio segment set being greater than or equal to the second wake-up threshold value, waking up the electronic device.
[0009] In a second aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor implements any of the above methods when executing the computer program.
[0010] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, any of the above methods is implemented.
[0011] In a fourth aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements any of the above methods when executed by a processor.
[0012] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments disclosed in the present application and should not be regarded as limiting the scope of the present application.
[0014] Figure 1 A flowchart showing a wake-up method according to an embodiment of the present application is shown;
[0015] Figure 2 A waveform diagram showing a time domain signal corresponding to an audio signal including a wake-up word provided by a wake-up method according to an embodiment of the present application;
[0016] Figure 3 A schematic diagram showing voice wake-up recognition provided by the wake-up method according to an embodiment of the present application;
[0017] Figure 4 A schematic diagram showing a specific application scenario of the wake-up method according to an embodiment of the present application;
[0018] Figure 5 A structural block diagram showing a wake-up device according to an embodiment of the present application is shown;
[0019] Figure 6 A structural block diagram of an electronic device used to implement an embodiment of the present application is shown. DETAILED DESCRIPTION
[0020] In the following, only some exemplary embodiments are briefly described. As those skilled in the art will appreciate, the described embodiments may be modified in various ways without departing from the spirit or scope of the present application. Therefore, the drawings and descriptions are considered to be exemplary and non-restrictive in nature.
[0021] Wearable devices such as smart glasses usually take a series of measures to reduce energy consumption in inactive states to improve battery life, while maintaining the operation of necessary functions such as voice wake-up to meet the normal usage needs of users. For example, when a wearable device is not used interactively, it usually turns off non-essential modules such as the display module, speaker module, and Bluetooth module, and reduces the processor operating frequency to the lowest operating frequency, thereby entering a low-power sleep state. In the sleep state, the voice wake-up function of the wearable device will run at a lower frequency, which is sufficient to detect the wake-up word but will not significantly affect battery life.
[0022] However, for voice wake-up functions, reducing the processor operating frequency will result in longer response time. If the processor operating frequency is reduced by half, the time required to handle the same task will theoretically double, which will double the wake-up delay, thus negatively affecting the user experience because users expect the device to respond quickly even in low-power mode. Therefore, how to find a balance between extending battery life and maintaining fast response has become an important challenge for wearable devices such as smart glasses.
[0023] In view of the above-mentioned defects existing in the related art, an embodiment of the present application provides a wake-up method for an electronic device, which aims to extend the battery life of the electronic device while reducing the response delay of voice wake-up, thereby improving the user experience.
[0024] Figure 1 A flowchart showing a method for waking up an electronic device according to an embodiment of the present application is shown. Figure 1 As shown, the wake-up method in the embodiment of the present application includes the following steps:
[0025] S101: When the electronic device is in a dormant state, obtaining an audio stream to be identified;
[0026] S102: performing voice wake-up recognition on a first audio segment in the audio stream to be recognized, and obtaining a wake-up value of a first audio segment set, where the first audio segment set includes the first audio segment and at least one audio segment before the first audio segment; the wake-up value of the first audio segment set is used to represent the confidence that the wake-up word is included in the first audio segment set;
[0027] S103: In response to the wake-up value of the first audio segment set being greater than or equal to the first wake-up threshold value and less than the second wake-up threshold value, at least increasing the operating frequency of the processor of the electronic device; the second wake-up threshold value being greater than the first wake-up threshold value;
[0028] S104: performing voice wake-up recognition on a second audio segment after the first audio segment to obtain a wake-up value of a second audio segment set, where the second audio segment set includes the second audio segment and multiple audio segments before the second audio segment, and the multiple audio segments before the second audio segment include the first audio segment; the wake-up value of the second audio segment set is used to represent the confidence that the wake-up word is included in the second audio segment set;
[0029] S105: In response to the wake-up value of the second audio segment set being greater than or equal to the second wake-up threshold value, wake up the electronic device.
[0030] The wake-up method of the embodiments of the present application can be applied to various electronic products with voice wake-up functions, such as smart phones, tablet computers, laptop computers, smart glasses, smart watches, smart bracelets, smart speakers, headphones, vehicles or smart appliances, but is not limited to these.
[0031] In the embodiments of the present application, the sleep state refers to a low-power mode entered when the electronic device is not in active use in order to save battery energy. In the sleep state, most functional modules of the electronic device, such as the display module, speaker module, Bluetooth module, and processor, will be suspended or the operating frequency will be reduced, and unused software modules or tasks will be uninstalled. The conditions for triggering the sleep state of the electronic device may include manual triggering by the user, screen off event triggering, environmental perception triggering, low battery condition triggering, timer triggering, etc., which are not specifically limited in the embodiments of the present application.
[0032] In the embodiment of the present application, the audio stream to be identified may be collected by a microphone module of the electronic device at a certain sampling rate in a sleep state.
[0033] In some examples, the microphone module of the electronic device can continuously collect audio using a 16kHz sampling rate, 16-bit width, and single-channel specification to provide sufficient information for accurate voice wake-up recognition. At the same time, audio of this specification can also be directly used for feature extraction, such as calculating Mel-frequency cepstral coefficients (MFCCs) or other acoustic features, thereby improving the processing efficiency of voice wake-up recognition.
[0034] It is understandable that after the microphone module collects the audio data, it can first store the audio data set in the storage module of the electronic device. The processor of the electronic device reads the audio data from the storage module to obtain the audio stream to be identified, and executes the wake-up method provided in the embodiment of the present application according to the audio stream to be identified. The audio stream to be identified may include multiple continuous audio segments, and the audio segment refers to a single audio frame with a certain duration, for example, the duration of each audio frame may be 160ms. In an embodiment of the present application, the processor of the electronic device may extract the audio frame data included in the audio data frame by frame from the storage module, thereby obtaining each audio segment in turn, or may read a plurality of continuous audio frame data from the storage module each time, thereby obtaining a plurality of audio segments each time. It should also be noted that, for the sake of convenience of expression, the audio segment for voice wake-up recognition before the processor operating frequency is increased is referred to as the first audio segment, and the audio segment for voice wake-up recognition after the processor operating frequency is increased is referred to as the second audio segment.
[0035] In an embodiment of the present application, a trained voice wake-up recognition model can be used to perform voice wake-up recognition on an audio segment. Voice wake-up recognition usually involves keyword spotting (KWS) or wake-up word recognition (WWR), which is a voice recognition system that only responds to specific words or phrases. Due to the limited computing power and energy supply of electronic devices, in order to achieve this function, a lightweight neural network model optimized for small devices is usually used. Among them, the neural network model can adopt a miniaturized convolutional neural network (CNNs), a recurrent neural network (RNNs), an end-to-end neural network (end-to-end), a hybrid model combining CNN and RNN, or a Transformer model, etc., but is not limited to this.
[0036] Exemplarily, in the process of voice wake-up recognition, the audio segment can be preprocessed first, such as denoising, echo cancellation, signal enhancement, etc., to improve the quality of the audio segment. Then the preprocessed audio segment is framed to obtain multiple audio frames, and feature extraction is performed frame by frame to obtain the spectral features corresponding to each audio frame. After that, the spectral features are input into the voice wake-up recognition model, and the voice wake-up recognition model outputs a wake-up value based on the spectral features corresponding to multiple audio frames of the current audio segment and the spectral features corresponding to multiple audio frames of the previous audio segment before the current audio segment. The wake-up value is used to characterize the confidence that the wake-up word is included in the audio segment set including the current audio segment and the previous audio segment. Among them, the wake-up word can be "Hi Aicy", "Hello Aicy" or "Xiaomeng Xiaomeng", etc. The wake-up value ranges from 0 to 1. The larger the value of the wake-up value, the greater the probability that the audio to be recognized includes the wake-up word, and vice versa, the smaller the probability that the audio to be recognized includes the wake-up word.
[0037] It should be noted that the audio stream to be recognized may include multiple continuous audio segments. In step S102, voice wake-up recognition can be performed for each audio segment in turn, and the first audio segment is the current audio segment for voice wake-up recognition. Among them, the wake-up value obtained by each voice wake-up recognition is obtained based on the first audio segment and the first audio segment set consisting of at least one audio segment before the first audio segment. When the wake-up value obtained by the current voice wake-up recognition is less than the first wake-up threshold value, the subsequent audio segment after the current audio segment is used as the first audio segment for voice wake-up recognition again, and the first audio segment set is updated to include the subsequent audio segment after the current audio segment, the current audio segment, and at least one audio segment before the current audio segment. In this cycle, until the wake-up value of the first audio segment set is greater than or equal to the first wake-up threshold value and less than the second wake-up threshold value, then after increasing the processor operating frequency, at least the processor operating frequency of the electronic device is increased.
[0038] It should be noted that when the wake-up value of the first audio segment set is greater than or equal to the first wake-up threshold value and less than the second wake-up threshold value, it indicates that the real wake-up point has been approached but not yet reached. In this case, by increasing the operating frequency of the processor of the electronic device, the processing efficiency of the subsequent voice wake-up recognition of the second audio segment can be improved, thereby shortening the subsequent response delay and improving the wake-up efficiency.
[0039] In other examples of the present application, in response to the wake-up value of the first audio segment set being greater than or equal to the second wake-up threshold value, the electronic device may be directly woken up.
[0040] In step S103, voice wake-up recognition is continued for the second audio segment to obtain a wake-up value of the second audio segment set, the second audio segment set includes the second audio segment and multiple audio segments before the second audio segment, wherein the multiple audio segments before the second audio segment may include the first audio segment. In the case where the wake-up value obtained by the current voice wake-up recognition is less than the second wake-up threshold value, the subsequent audio segment after the current audio segment is used as the second audio segment for voice wake-up recognition again, and the second audio segment set is updated to include the subsequent audio segment after the current audio segment, the current audio segment, and at least one audio segment before the current audio segment. This cycle is repeated until the wake-up value of the second audio segment set is greater than or equal to the second wake-up threshold value, then the electronic device is woken up; or, until the wake-up value of the second audio segment set obtained by voice wake-up recognition for the last audio segment in the audio stream to be recognized is still less than the second wake-up threshold value, then no voice wake-up recognition is performed, or the operating frequency of the processor of the electronic device is reduced to the lowest operating frequency in the sleep state.
[0041] It should be noted that, when the wake-up value of the second audio segment set is greater than or equal to the second wake-up threshold value, it indicates that the real wake-up point has been reached. In this case, the dormant state of the electronic device is canceled and the electronic device is woken up.
[0042] In an embodiment of the present application, waking up an electronic device may be to enable part or all of the processing capabilities of the electronic device. For example, in response to the wake-up value of the first audio segment set being greater than or equal to the first wake-up threshold value and less than the second wake-up threshold value, the electronic device may first be put into a pre-wake-up state, the operating frequency of the processor of the electronic device may be increased, and the enabling process of some functional modules may be started. In the process of waking up the electronic device, the enabling process of other processing capabilities may be started. After the electronic device completes the wake-up, the wake-up state may include at least one of the following: increasing the operating frequency of the processor of the electronic device to the highest operating frequency, enabling the display module, enabling the Bluetooth module, enabling the speaker module, and loading a preset software module, etc. In addition, it may also be to enable only the voice control function of the electronic device. This embodiment of the present application does not specifically limit this.
[0043] In the embodiment of the present application, the first wake-up threshold value and the second wake-up threshold value are two preset wake-up thresholds, and the first wake-up threshold value is smaller than the second wake-up threshold value. Figure 2 The waveform diagram of the time domain signal corresponding to the audio including the wake-up word provided by the wake-up method of the embodiment of the present application is shown below in combination with Figure 2 The first wake-up threshold and the second wake-up threshold are exemplarily described. Figure 2 As shown, the horizontal axis can be time in milliseconds, and the vertical axis can be sound intensity in decibels. Since in the process of voice wake-up recognition, the audio frames included in the audio segment are recognized frame by frame or in groups of several audio frames, therefore, when the audio stream to be recognized includes the wake-up word, the wake-up value output by the voice wake-up recognition model will gradually increase over time. Figure 2 As shown, time t2 is after time t1, and the audio between time t0 and time t2 is the audio corresponding to the wake-up word. At time t1, the user has not yet completely spoken the wake-up word, but at time t2, the user has just completely spoken the wake-up word, so the corresponding wake-up value at time t1 is less than the corresponding wake-up value at time t2. Exemplarily, the first wake-up threshold value can be obtained after a large number of statistics and tests are performed on the wake-up value output by the wake-up recognition model at time t1, and the second wake-up threshold value can be obtained after a large number of statistics and tests are performed on the wake-up value output by the wake-up recognition model at time t2.
[0044] In some specific examples, the first wake-up threshold value may adopt the wake-up value output by the voice wake-up model at time t1. Wherein, the determination method of time t1 is as follows: first, determine the duration of the functional modules enabled during the wake-up process, such as the display module, Bluetooth module, speaker module, and the startup duration of the preset software module; then, subtract the duration of the functional modules enabled during the wake-up process from time t2 to obtain the reference time t0, and time t1 may be the reference time t0, or may be slightly earlier than time t0. Thus, after determining that the wake-up value of the first audio segment set is greater than or equal to the first wake-up threshold value, the functional module of the electronic device may be started in advance, and when the voice wake-up recognition is performed on the second audio segment until it is identified that the wake-up value of the second audio segment set is greater than or equal to the second wake-up threshold value, the functional module of the electronic device has been fully started, thereby further shortening the wake-up duration of the electronic device and further improving the wake-up efficiency.
[0045] In summary, according to the wake-up method of the embodiment of the present application, for the voice wake-up scenario of the electronic device in the low-power sleep state, by performing voice wake-up recognition on the first audio segment, when the wake-up value of the first audio segment set reaches the first wake-up threshold value and is less than the second wake-up threshold value, at least the processor operating frequency of the electronic device is increased, thereby improving the subsequent processing efficiency of the second audio segment, and then shortening the wake-up response delay. In addition, although the processor operating frequency is increased during the recognition process of the second audio segment, the increase in power consumption of the electronic device is minimal, so it will not significantly affect the standby time of the electronic device. Therefore, the wake-up method of the embodiment of the present application can well coordinate the battery life and the wake-up response rate, thereby improving the user experience.
[0046] In one implementation, step S101 may specifically include:
[0047] Voice activity detection (VAD) is performed on the audio data collected by the microphone of the electronic device. When the detection result shows that there is voice activity, the audio data with voice activity is determined as an audio stream to be identified.
[0048] It is understood that in this embodiment, voice activity detection can be based on a simple energy threshold, or a more complex machine learning algorithm, such as a neural network, can be used to distinguish between voice segments and non-voice segments in voice data. In some specific examples, the process of voice activity detection may include: (1) preprocessing of audio data: for example, it may include noise removal, echo cancellation, etc. to improve the quality of audio data; (2) feature extraction of audio data: extracting useful features from the preprocessed audio data, such as short-time energy, short-time average zero crossing rate, spectral features (such as Mel frequency cepstral coefficients, MFCC), etc.; (3) making a decision, such as using some form of model or algorithm (such as threshold detection, machine learning classifier, etc.) to determine whether the current frame contains voice; (4) smoothing processing: in order to avoid the output voice activity signal being too fragmented, some smoothing processing is required, such as sliding window averaging or using a hidden Markov model (HMM).
[0049] According to the above embodiment, by performing voice activity detection on the audio data collected by the microphone, and when voice activity is detected in the audio data, it is determined as an audio stream to be recognized and subsequent voice wake-up recognition is activated. In this way, the data processing amount of voice wake-up can be reduced, which is conducive to further reducing the power consumption of electronic devices.
[0050] In one implementation, step S102 may specifically include the following steps:
[0051] S1021: extracting features from the first audio segment to obtain frequency spectrum features corresponding to the first audio segment; the frequency spectrum features may include FBANK features or MFCC features;
[0052] S1022: Process the frequency spectrum features to obtain a wake-up value of the first audio segment set.
[0053] Exemplarily, in step S1021, the spectral feature may include an FBANK feature, and extracting the FBANK feature corresponding to the first audio segment may specifically include the following steps: (1) performing pre-emphasis processing on the first audio segment to enhance the signal strength of the first audio segment; (2) performing frame processing on the first audio segment after the signal strength is enhanced, for example, the first audio segment may be frame processed according to a duration of 10 ms to obtain a plurality of audio frames with a duration of 10 ms; (3) performing windowing processing on each audio frame, for example, the duration of the audio frame after the windowing processing may be 25 ms, and two adjacent audio frames may have an overlapping portion of 15 ms, thereby reducing spectrum leakage and edge effects; (4) performing Fourier transform processing on each audio frame to obtain a frequency domain signal corresponding to each audio frame; (5) determining a power spectrum according to the frequency domain signal corresponding to each audio frame after Fourier transform; and (6) based on a Mel filter bank, extracting the frequency of the power spectrum, mapping it to a Mel frequency scale and taking its logarithm to obtain an FBANK feature corresponding to each audio frame. The number of Mel filter banks can be set according to actual requirements and hardware performance, for example, 40 or 80, that is, each audio frame has 40 or 80 FBANK features in the output.
[0054] In some specific examples, the duration corresponding to the first audio segment may be 160 milliseconds. After framing and windowing the first audio segment, 16 audio frames may be obtained. The duration corresponding to each audio frame is 10 milliseconds. After processing, each audio frame obtains 40 corresponding FBANK features. The dimension of the spectral features corresponding to the first audio segment may be [16,40].
[0055] Figure 3 A schematic diagram showing the voice wake-up recognition provided by the wake-up method of an embodiment of the present application is shown. For example, Figure 3 As shown, after the feature extraction of step S1011, in step S1022, the spectrum features are processed to obtain the wake-up value of the first audio segment set, which may specifically include the following steps: S10221: input the spectrum features into at least one local processing network to obtain a first intermediate result corresponding to the spectrum features; the local processing network includes a convolution layer, a normalization layer and an activation function layer; S10222: input the first intermediate result output by at least one local processing network into a fully connected layer to obtain a second intermediate result; S10223: input the second intermediate result into an output layer based on a Softmax or Sigmoid function to obtain the wake-up value of the first audio segment set.
[0056] It is understandable that the function of the convolution layer is to further extract features from the input data, and it contains multiple convolution kernels, and each element of the convolution kernel corresponds to a weight coefficient and a deviation. The normalization layer is usually placed in front of the activation function layer to constrain the data output by the convolution layer to a mean of 0 and a variance of 1. In this way, the activation function layer will not be saturated and truncated, which can reduce errors and is more conducive to the convergence of neural network training. The normalization layer can be batch normalization. The role of the activation function layer is to add nonlinear factors and perform nonlinear mapping on the output results of the normalization layer. Since the neural network needs to transform the input data into the desired output data like a function, and the convolution layer and the fully connected layer themselves cannot bring nonlinear characteristics, and the network without nonlinear characteristics is not enough to complete this transformation, therefore, the activation function layer can be set in the neural network. The activation function used in the activation function layer in the neural network of the embodiment of the present application can be RELU (Rectified Linear Unit, linear rectifier function). It is understandable that the activation function layer does not change the data dimension, and the size of the input data is the same as the size of the output data.
[0057] In the embodiment of the present application, the neural network may include a plurality of local processing networks consisting of sequentially connected convolutional layers, normalization layers, and activation function layers, which can improve the recognition effect of the fitted neural network. In addition, when deploying the neural network, the local processing network can also be optimized into a fusion operator to speed up the recognition speed of the neural network.
[0058] The purpose of the fully connected layer is to project the output of the previous layer onto the dimension of the classification label. From the perspective of representation learning, the convolutional layer can extract features from the input data, and the role of the fully connected layer is to perform nonlinear combination of the extracted features to obtain the output, that is, the fully connected layer itself is not expected to have feature extraction capabilities, but attempts to use existing high-order features to achieve learning goals. The fully connected layer consists of weights, biases, and neurons, and is used to connect neurons between two different layers. The following is the output formula of the fully connected layer: Y = X*W+B. Among them, X is used to represent the input matrix, and its dimension is [batch_size, hiddenNum], batch_size refers to the batch size, and hiddenNum refers to the number of neurons in the previous layer; W is used to represent the trained weight matrix, and its dimension is [hiddenNum, classNum], classNum refers to the number of output categories; B is used to represent the bias vector, and its dimension is [classNum]; Y is used to represent the output vector, and its dimension is [classNum].
[0059] In the embodiment of the present application, a fully connected layer may be used to nonlinearly combine features corresponding to the first audio segment and features corresponding to at least one audio segment before the first audio segment to obtain an output corresponding to the first audio segment set.
[0060] The output layer can use the Softmax function to normalize the output so that the sum of multiple values is 1 and each value has a probabilistic meaning; and the Sigmoid function can be used as the output activation function. If the output result of the output layer is used to indicate whether the wake-up word is recognized, the output result of the output layer can be one-dimensional data, that is, the confidence of the first speech frame. In this way, the resource usage of the voice wake-up model can be reduced.
[0061] In some examples, in order to reduce the amount of data processing for voice wake-up recognition, the voice wake-up model can be set to output a wake-up value based on a number of audio frames. This is because if a wake-up recognition is performed for each audio frame (for example, a duration of 10ms, 15ms, 20ms or 60ms, etc.), the calculation is too frequent and the amount of calculation is too large. For example, the frame shift of the voice wake-up recognition model can be 100ms. In other words, the voice wake-up recognition model can calculate a wake-up value based on several audio frames with a duration of 100ms, thereby reducing the amount of calculation of the voice wake-up recognition model and reducing the power consumption of the electronic device.
[0062] In one implementation, step S103 may specifically include:
[0063] At least the operating frequency of the processor of the electronic device is increased from a first operating frequency in a sleep state to a second operating frequency in a wake-up state.
[0064] In this embodiment, the operating frequency of the processor of the electronic device may include at least two frequency levels, wherein the first operating frequency may be the lowest operating frequency, and the second operating frequency may be the highest operating frequency.
[0065] Exemplarily, when it is determined that the wake-up value of the first audio segment set is greater than or equal to the first wake-up threshold value and less than the second wake-up threshold value, the processor operating frequency of the electronic device can be increased from the lowest operating frequency in the sleep state to the highest operating frequency in the wake-up state.
[0066] As a result, the electronic device can perform wake-up recognition on the second audio segment with the strongest processing capability, thereby maximizing the recognition efficiency for the second audio segment.
[0067] In one implementation, step S103 may specifically include:
[0068] At least the operating frequency of the processor of the electronic device is increased from the first operating frequency in the sleep state to a third operating frequency, and the third operating frequency is greater than the first operating frequency and less than the second operating frequency in the awake state.
[0069] In this embodiment, the processor operating frequency of the electronic device may include three frequency gears, which are, from low to high, the lowest operating frequency, the middle operating frequency, and the highest operating frequency. Among them, the first operating frequency may be the lowest operating frequency, the second operating frequency may be the highest operating frequency, and the third operating frequency may be the middle operating frequency.
[0070] Exemplarily, when it is determined that the wake-up value of the first audio segment set is greater than or equal to the first wake-up threshold value and less than the second wake-up threshold value, the processor operating frequency of the electronic device can be increased from the lowest operating frequency in the sleep state to an intermediate operating frequency.
[0071] Therefore, while improving the recognition efficiency of the second audio band, it is possible to avoid excessive power consumption in the case of false wake-up, thereby taking into account both the wake-up recognition efficiency and the battery life.
[0072] In one embodiment, in step S103, in response to the wake-up value of the first audio segment set being greater than or equal to the first wake-up threshold value and less than the second wake-up threshold value, in addition to increasing the processor operating frequency of the electronic device, at least one of the following may also be included: turning on the display module of the electronic device; turning on the speaker module of the electronic device; turning on the Bluetooth module of the electronic device; loading preset software.
[0073] In some examples, when it is determined that the wake-up value of the first audio segment set is greater than or equal to the first wake-up threshold value and less than the second wake-up threshold value, some processing capabilities of the electronic device in the wake-up state can be enabled in advance, for example, the display module of the electronic device, the speaker module of the electronic device, the Bluetooth module of the electronic device, or the preset software can be turned on in advance. It can be understood that the activation of these modules requires a certain delay. The present application enables these modules in advance, which is conducive to further improving the wake-up efficiency of the electronic device.
[0074] In other examples, when it is determined that the wake-up value corresponding to the first audio to be identified is greater than or equal to the first wake-up threshold value and less than the second wake-up threshold value, all processing capabilities of the electronic device in the wake-up state can be enabled in advance, for example, the display module of the electronic device, the speaker module of the electronic device, the Bluetooth module of the electronic device, and the preset software can be turned on in advance, so as to further shorten the activation time of the functional modules of the electronic device, thereby further improving the wake-up efficiency of the electronic device.
[0075] In one implementation, step S105 may specifically include the following steps:
[0076] S1051: Activate a timer to determine whether the wake-up value of the second audio segment set is greater than or equal to a second wake-up threshold value within a preset time period;
[0077] S1052: In response to the wake-up value of the second audio segment set being greater than or equal to the second wake-up threshold value, wake up the electronic device.
[0078] It should be noted that, when the wake-up value of the first audio segment set is greater than or equal to the first wake-up threshold value and less than the second wake-up threshold value, since the real wake-up point has not been reached, after the operating frequency of the processor of the electronic device is increased, if this wake-up event is a false wake-up, it will cause the electronic device to generate additional power consumption due to the continuous frequency increase of the processor. Therefore, it is necessary to determine whether this wake-up event is a false wake-up event. If the judgment result is that the wake-up value of the second audio segment set is greater than or equal to the second wake-up threshold value, it indicates that this wake-up event is a normal wake-up and is not a false wake-up event.
[0079] For example, refer to Figure 2 As shown, the preset time period can be set accordingly according to the waveform diagram of the audio including the wake-up word, wherein the preset time period can be greater than or equal to the time difference Δt between the moment t2 corresponding to the second wake-up threshold value and the moment t1 corresponding to the first wake-up threshold value, and the time difference Δt can be determined by a large number of statistics and detections in advance. For example, the time difference Δt can be 1 second, and the preset time period can be set to 2 seconds. In response to the wake-up value of the first audio segment set being greater than or equal to the first wake-up threshold value, it is determined whether the wake-up value of the second audio segment set is greater than or equal to the second wake-up threshold value within the next 2-second time period.
[0080] Furthermore, step S105 may also include the following steps:
[0081] S1053: In response to the wake-up value of the second audio segment set being less than the second wake-up threshold value within the preset time period, at least reducing the operating frequency of the processor of the electronic device.
[0082] It is understandable that within the preset time period, if the wake-up value of the second audio segment set is less than the second wake-up threshold value, it indicates that this wake-up event is a false wake-up event, and the electronic device needs to be switched to a sleep state. Since in step S103, at least the processor operating frequency of the electronic device is increased, in step S1053, when it is determined that this wake-up event is a false wake-up event, it is necessary to timely reduce the processor operating frequency of the electronic device to the operating frequency in the sleep state to avoid continuous waste of power consumption. In addition, if in step S103, the display module of the electronic device, the speaker module of the electronic device, the Bluetooth module of the electronic device, and the loading of the preset software are also executed, then the display module of the electronic device, the speaker module of the electronic device, the Bluetooth module of the electronic device, and the preset software need to be correspondingly turned off, the speaker module of the electronic device, the Bluetooth module of the electronic device, and the preset software need to be uninstalled, so as to switch the electronic device to a sleep state.
[0083] According to the above implementation, by comparing the wake-up value of the second audio segment set with the second wake-up threshold value, it is possible to monitor false wake-up events, so that when it is determined that the current wake-up is a false wake-up event, the electronic device can be switched back to the sleep state in a timely manner, thereby achieving the purpose of saving power consumption.
[0084] Figure 4 A schematic diagram of a specific application scenario of the wake-up method of an embodiment of the present application is shown below. Figure 4 The wake-up method according to the embodiment of the present application is described by taking a specific application scenario as an example. Figure 4 As shown, the wake-up method in the embodiment of the present application includes the following steps:
[0085] S1. Recording: The microphone module of the electronic device continuously records to collect audio data;
[0086] S2. Voice wake-up recognition: (1) Perform voice activity detection on audio data, and determine audio data with voice activity as an audio stream to be recognized; (2) Perform frame processing on the first audio segment included in the audio stream to be recognized to obtain multiple audio frames, and perform feature extraction processing on each audio frame to obtain audio features corresponding to each audio frame, wherein the audio features may include FBANK features or MFCC features; (3) Input the audio features into a voice wake-up recognition model to obtain a wake-up value of the first audio segment set, and the wake-up value is used to characterize the confidence that the wake-up word is included in the first audio segment set; wherein the wake-up recognition model may specifically include a local processing network, a fully connected layer and an output layer, wherein the local processing network may be at least one and includes a convolutional layer, a normalization layer and an activation function layer, and the output layer may be constructed based on a Softmax or Sigmoid function.
[0087] S3, determining whether the wake-up value of the first audio segment set is less than the second wake-up threshold value Ht;
[0088] S4. If the judgment result of S3 is no, waking up the electronic device;
[0089] S5. If the judgment result of S3 is yes, determine whether the wake-up value of the first audio segment set is less than the first wake-up threshold value Hx, wherein the first wake-up threshold value Hx is less than the second wake-up threshold value Ht; if the judgment result of S5 is yes, the wake-up fails, and the microphone module continues to collect recording;
[0090] S6. If the judgment result of S5 is no, then increase the operating frequency of the processor;
[0091] S7, start the timer: perform voice wake-up recognition on the second audio segment to obtain a wake-up value of the second audio segment set, and determine whether the wake-up value of the second audio segment set is less than the second wake-up threshold value Ht within a preset time period; wherein the wake-up value of the second audio segment set can be determined in the same or similar manner as step S2, which is not repeated here;
[0092] S8. According to the judgment result of S7, determine whether it is a false awakening event: if the judgment result of S8 is yes, then this awakening is a false awakening event, and the electronic device is switched back to sleep mode; if the judgment result of S8 is no, then the electronic device is awakened. Wherein, before the timer times out, if the awakening value of the second audio segment set is identified to be greater than or equal to the second awakening threshold value Ht, the corresponding judgment result is no. If the awakening value of the second audio segment set is not identified to be greater than or equal to the second awakening threshold value Ht before the timer times out, the corresponding judgment result is yes.
[0093] Corresponding to the method provided in the embodiment of the present application, the embodiment of the present application also provides a wake-up device for an electronic device. Figure 5 The figure is a structural block diagram of a wake-up device of an electronic device according to an embodiment of the present application. The wake-up device may include:
[0094] An acquisition module 501 is used to acquire an audio stream to be identified when the electronic device is in a dormant state;
[0095] A first recognition module 502 is configured to perform voice wake-up recognition on a first audio segment in the audio stream to be recognized, and obtain a wake-up value of a first audio segment set, where the first audio segment set includes the first audio segment and at least one audio segment before the first audio segment; the wake-up value of the first audio segment set is used to represent the confidence that the wake-up word is included in the first audio segment set;
[0096] The frequency up-conversion module 503 is used to at least increase the operating frequency of the processor of the electronic device in response to the wake-up value of the first audio segment set being greater than or equal to the first wake-up threshold value and less than the second wake-up threshold value; the second wake-up threshold value is greater than the first wake-up threshold value;
[0097] The second recognition module 504 is configured to perform voice wake-up recognition on a second audio segment after the first audio segment to obtain a wake-up value of a second audio segment set, where the second audio segment set includes the second audio segment and multiple audio segments before the second audio segment, and the multiple audio segments before the second audio segment include the first audio segment; the wake-up value of the second audio segment set is used to characterize the confidence that the wake-up word is included in the second audio segment set;
[0098] The wake-up module 505 is configured to wake up the electronic device in response to the wake-up value of the second audio segment set being greater than or equal to the second wake-up threshold value.
[0099] In one embodiment, the wake-up module includes:
[0100] A determination submodule, configured to enable a timer and determine whether a wake-up value of the second audio segment set is greater than or equal to a second wake-up threshold value within a preset time period;
[0101] The wake-up submodule is configured to wake up the electronic device in response to the wake-up value of the second audio segment set being greater than or equal to the second wake-up threshold value.
[0102] In one embodiment, the wake-up device further includes:
[0103] The frequency reduction module is used to at least reduce the operating frequency of the processor of the electronic device in response to the wake-up value of the second audio segment set being less than the second wake-up threshold value within a preset time period.
[0104] In one embodiment, the frequency upscaling module is further used for:
[0105] At least the operating frequency of the processor of the electronic device is increased from a first operating frequency in a sleep state to a second operating frequency in a wake-up state.
[0106] In one embodiment, the frequency upscaling module is further configured to implement at least one of the following:
[0107] Turning on a display module of the electronic device;
[0108] Turning on a speaker module of the electronic device;
[0109] Turn on the Bluetooth module of the electronic device;
[0110] Load the preset software.
[0111] In one embodiment, the wake-up module is further used for:
[0112] In response to the wake-up value of the first audio segment set being greater than or equal to the second wake-up threshold value, waking up the electronic device.
[0113] In one embodiment, the acquisition module is further used to:
[0114] The collected audio data is subjected to voice activity detection, and when the detection result indicates that voice activity exists, the audio data with voice activity is determined as an audio stream to be identified.
[0115] Figure 6 FIG. 1 is a block diagram of an electronic device used to implement an embodiment of the present application. Figure 6 As shown, the electronic device includes: a memory 610 and a processor 620. The memory 610 stores a computer program that can be run on the processor 620. When the processor 620 executes the computer program, the method in the above embodiment is implemented. The number of the memory 610 and the processor 620 can be one or more.
[0116] The processor 620 may be a device on a chip (SOC), and the processor 620 may include a central processing unit (CPU), and may further include other types of processors.
[0117] The processor involved in the processor 620 may include, for example, a CPU, a DSP, a microcontroller or a digital signal processor, and may also include a GPU, an embedded neural network processor (Neural-network Process Units, NPU) and an image signal processor (Image Signal Processing, ISP). The processor may also include necessary hardware accelerators or logic processing hardware circuits, such as ASICs, or one or more integrated circuits for controlling the execution of the program of the technical solution of the present application. In addition, the processor may have the function of operating one or more software programs, and the software programs may be stored in a storage medium.
[0118] The processor 620 may include one or more processing units. For example, the processor may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). Different processing units may be independent components or integrated into one or more processors.
[0119] The memory 610 may include a code storage area and a data storage area. The code storage area may store an operating system. The data storage area may store data created during the use of the electronic device, etc. In addition, the memory 610 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage components, a flash memory component, a universal flash storage (Universal Flash Storage, UFS), etc.
[0120] The memory 610 can be a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium or other magnetic storage device, or it can also be any computer-readable medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer.
[0121] The electronic device also includes:
[0122] The communication interface 630 is used to communicate with external devices and perform data exchange transmission.
[0123] If the memory 610, the processor 620 and the communication interface 630 are implemented independently, the memory 610, the processor 620 and the communication interface 630 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0124] In some embodiments, the processor 620 may include one or more interfaces. The interface may include an Inter-Integrated Circuit (I2C) interface, an Integrated Circuit Sound (I2S) interface, a Pulse Code Modulation (PCM) interface, a Universal Asynchronous Receiver / Transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a General-Purpose Input / Output (GPIO) interface, a SIM card interface, and / or a USB interface, etc. Among them, the USB interface is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface can be used to connect a charger to charge an electronic device, and can also be used to transmit data between an electronic device and a peripheral device.
[0125] The electronic device may also include an external memory interface, which is used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 620 through the external memory interface to implement a data storage function. For example, files such as music and videos are stored in the external memory card.
[0126] Optionally, in a specific implementation, if the memory 610, the processor 620 and the communication interface 630 are integrated on a chip, the memory 610, the processor 620 and the communication interface 630 can communicate with each other through an internal interface.
[0127] An embodiment of the present application provides a computer-readable storage medium storing a computer program, which implements the method provided in the embodiment of the present application when the program is executed by a processor.
[0128] An embodiment of the present application provides a computer program product, including a computer program, which implements any of the above methods when executed by a processor.
[0129] An embodiment of the present application also provides a chip, which includes a processor for calling and executing instructions stored in the memory from the memory, so that a communication device equipped with the chip executes the method provided by the embodiment of the present application.
[0130] An embodiment of the present application also provides a chip, including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the method provided in the embodiment of the application.
[0131] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the Advanced RISC Machines (ARM) architecture.
[0132] Further, optionally, the above-mentioned memory may include a read-only memory and a random access memory. The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory may include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may include a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DRRAM).
[0133] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
[0134] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.
[0135] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0136] Any process or method description in the flow chart or otherwise described herein can be understood to represent a module, fragment or portion of a code including one or more executable instructions for implementing the steps of a specific logical function or process. And the scope of the preferred embodiment of the present application includes other implementations, in which the functions may not be performed in the order shown or discussed, including in a substantially simultaneous manner or in a reverse order according to the functions involved.
[0137] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, which can be embodied in any computer-readable medium for use by an instruction execution system, apparatus or device (such as a computer-based system, a system including a processor or other system that can fetch instructions from an instruction execution system, apparatus or device and execute instructions), or used in combination with these instruction execution systems, apparatuses or devices.
[0138] It should be understood that the various parts of the present application can be implemented with hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented with software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the above embodiment method can be completed by instructing the relevant hardware through a program, which can be stored in a computer-readable storage medium, and when the program is executed, it includes one of the steps of the method embodiment or a combination thereof.
[0139] In addition, each functional unit in each embodiment of the present application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the above-mentioned integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium can be a read-only memory, a disk or an optical disk, etc.
[0140] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for waking up an electronic device, comprising: When the electronic device is in a dormant state, obtaining an audio stream to be identified; Performing voice wake-up recognition on a first audio segment in the audio stream to be recognized, and obtaining a wake-up value of a first audio segment set, where the first audio segment set includes the first audio segment and at least one audio segment before the first audio segment; the wake-up value of the first audio segment set is used to characterize the confidence that the wake-up word is included in the first audio segment set; In response to the wake-up value of the first audio segment set being greater than or equal to a first wake-up threshold value and less than a second wake-up threshold value, at least increasing the operating frequency of the processor of the electronic device; the second wake-up threshold value being greater than the first wake-up threshold value; performing the voice wake-up recognition on a second audio segment after the first audio segment to obtain a wake-up value of a second audio segment set, where the second audio segment set includes the second audio segment and multiple audio segments before the second audio segment, and the multiple audio segments before the second audio segment include the first audio segment; the wake-up value of the second audio segment set is used to characterize the confidence that the wake-up word is included in the second audio segment set; In response to the wake-up value of the second audio segment set being greater than or equal to the second wake-up threshold, waking up the electronic device.
2. The method for waking up an electronic device according to claim 1, wherein: In response to the wake-up value of the second audio segment set being greater than or equal to the second wake-up threshold value, waking up the electronic device, comprising: Enable the timer to determine whether the wake-up value corresponding to the second audio segment set is greater than or equal to the second wake-up threshold within a preset time period; In response to the wake-up value of the second audio segment set being greater than or equal to the second wake-up threshold, waking up the electronic device.
3. The method for waking up an electronic device according to claim 2, wherein: Also includes: In response to the wake-up value of the second audio segment set being less than the second wake-up threshold value within the preset time period, at least the operating frequency of the processor of the electronic device is reduced.
4. The method for waking up an electronic device according to claim 1, wherein: At least increasing the operating frequency of the processor of the electronic device, including: At least the operating frequency of the processor of the electronic device is increased from a first operating frequency in a sleep state to a second operating frequency in a wake-up state.
5. The method for waking up an electronic device according to claim 1, wherein: In response to the wake-up value of the first audio segment set being greater than or equal to a first wake-up threshold value and less than a second wake-up threshold value, in addition to increasing the operating frequency of the processor of the electronic device, at least one of the following is further included: Turning on a display module of the electronic device; Turning on a speaker module of the electronic device; Turning on the Bluetooth module of the electronic device; Load the preset software.
6. The method for waking up an electronic device according to claim 1, wherein: Also includes: In response to the wake-up value of the first audio segment set being greater than or equal to the second wake-up threshold value, waking up the electronic device.
7. The method for waking up an electronic device according to claim 1, wherein: Get the audio stream to be recognized, including: The collected audio data is subjected to voice activity detection, and when the detection result indicates that voice activity exists, the audio data with voice activity is determined as the audio stream to be identified.
8. An electronic device comprising a memory, a processor and a computer program stored in the memory, wherein the processor implements the method according to any one of claims 1 to 7 when executing the computer program.
9. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.
Citation Information
Cited By
Bluetooth auxiliary hearing system based on voice wake-up technology
CN115297397A
