Electronic device and voice wake-up method
By employing a sliding window dynamic matching algorithm on the electronic device side to calculate the editing distance and confidence level between the custom wake word and the text, the compatibility and false wake-up issues of fixed and custom wake-up methods are resolved, resulting in higher wake-up accuracy and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-25
- Publication Date
- 2026-03-03
AI Technical Summary
Existing fixed wake-up methods cannot be compatible with the usage habits and preferences of different users, while custom wake-up methods suffer from false wake-ups and a decrease in wake-up rate, affecting voice control efficiency and user experience.
A sliding window-based dynamic matching algorithm is adopted. By calculating the minimum edit distance between the custom wake word and the candidate text, the confidence level is calculated and compared with the threshold to determine whether to wake up the voice application, thereby reducing the occurrence of false wake-ups and missed wake-ups.
It improves the wake-up rate and accuracy of custom wake-up, enhances the efficiency and user experience of voice control, protects user privacy, and is compatible with the chip performance of various electronic devices.
Smart Images

Figure CN117809630B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of speech processing technology, and in particular to an electronic device and a voice wake-up method. Background Technology
[0002] Electronic devices are generally equipped with applications for voice control (hereinafter referred to as: voice applications). Voice applications can have sleep and wake-up states. In sleep state, the voice application does not respond to or execute user-inputted voice commands. In wake-up state, it can respond to input voice commands and execute the actions / programs indicated by the commands. Therefore, when the voice application is in sleep state, the user needs to wake up the voice application first, and then achieve voice control through interaction with the voice application.
[0003] Voice wake-up methods include fixed wake-up methods and custom wake-up methods. Fixed wake-up methods use a fixed wake-up word to activate voice applications. The fixed wake-up word is usually the pre-set voice product name on the electronic device, such as "Xiao X". Fixed wake-up methods are incompatible with different users' habits and preferences, and the need to wake the device before voice interaction can lead to low voice control efficiency. Some users may not even know or have forgotten the default wake-up word, making it impossible to effectively use the voice control function.
[0004] Custom wake-up methods allow users to use a variety of wake words to activate voice applications. These custom wake words are primarily frequently used voice commands, such as "turn on the air conditioner" or "play a song," moving away from a single, fixed wake word. However, custom wake-up methods are prone to issues such as false wake-ups and decreased wake-up rates. Summary of the Invention
[0005] Some embodiments of this application provide an electronic device and a voice wake-up method, which reduces missed wake-ups and false wake-ups, and improves the wake-up rate and accuracy of custom wake-up when the electronic device performs a custom wake-up task.
[0006] In a first aspect, some embodiments of this application provide an electronic device, including:
[0007] A voice acquisition device is used to collect voice data input by the user.
[0008] The controller is used to perform:
[0009] Receive the voice data collected and transmitted by the sound collector;
[0010] The speech data is processed to obtain text information converted from the speech data;
[0011] The text information is truncated according to a preset length to obtain candidate text;
[0012] Dynamic matching based on a sliding window is performed on the custom wake word and the candidate text to obtain the minimum edit distance between the custom wake word and the candidate text;
[0013] Calculate the confidence level based on the minimum edit distance;
[0014] If the confidence level is greater than the threshold, the voice application is activated, and the voice application is used to respond to the user's voice input commands;
[0015] If the confidence level is not greater than the threshold, the voice application will not be activated.
[0016] In some embodiments, before performing dynamic matching of the custom wake word and the candidate text based on a sliding window, the controller is further configured to: uniformly convert the custom wake word and the candidate text into a target format; perform pinyin conversion on the format-converted custom wake word to obtain a first pinyin; and perform pinyin conversion on the format-converted candidate text to obtain a second pinyin.
[0017] In some embodiments, the controller performs dynamic matching of the custom wake word and the candidate text based on a sliding window, including: generating a sliding window based on the length of the first pinyin; as the sliding window moves along the second pinyin according to a preset step size and target direction, using the sliding window to truncate the second pinyin to obtain the pinyin string currently truncated by the sliding window; and calculating the minimum edit distance DI[h][h] between the first pinyin and the pinyin string truncated after the sliding window moves k steps. k Where k represents the number of steps the sliding window moves, and h represents the length of the first pinyin; calculate the minimum edit distance d between the first pinyin and the second pinyin, d = min{DI[h][h]} k |k=0,1,…Q}, where Q represents the total number of steps moved when the sliding window completely traverses the second pinyin.
[0018] In some embodiments, the controller calculates the confidence level as follows:
[0019]
[0020] Where c represents the confidence level.
[0021] In some embodiments, the controller calculates the minimum edit distance DI[h][h] between the first pinyin and the pinyin string truncated after the sliding window moves k steps. k This includes: creating a matrix DI with dimensions [h+1, h+1], wherein the matrix DI is used to calculate the edit distance DI[i][j]. xWhere i represents the letter index in the first pinyin, j represents the letter index in the pinyin string extracted after the sliding window moves k steps, 1≤i≤h, 1≤j≤h, x represents the type index of the editing operation, DI[i][j] x This represents the minimum number of edit operations (x-th type) required to convert the first i letters of the first pinyin string into the first j letters of the pinyin string. Starting with i = 0 and j = 0, iterate through i and j, calculating the edit distance DI[i][j], until i = j = h, to obtain the minimum edit distance DI[h][h]. k Where, DI[i][j] = min{DI[i][j]} x |x=1,2,…,R}, where R represents the total number of types included in the editing operation.
[0022] In some embodiments, the types of editing operations include insertion, replacement, and deletion, then:
[0023] x=1:DI[i][j]1=DI[i][j-1]+1;
[0024] x=2:DI[i][j]2=DI[i-1][j-1]+1;
[0025] x=3:DI[i][j]3=DI[i-1][j]+1;
[0026] Where x = 1 corresponds to the insertion operation, and DI[i][j]1 represents the edit distance when the first i-th letter of the first pinyin is inserted after the first i-th letter of the pinyin string, such that the first i-th letter of the first pinyin is the same as the first j+1-th letter of the pinyin string.
[0027] x = 2 corresponds to a swap operation, and DI[i][j]2 represents the edit distance when the i-th letter of the first pinyin is replaced with the j-th letter of the pinyin string;
[0028] x = 3 corresponds to the deletion operation, and DI[i][j]3 represents the edit distance when the i-th letter of the first pinyin is deleted, such that the first i-1 letters of the first pinyin are the same as the first j letters of the pinyin string.
[0029] In some embodiments, if the i-th letter of the first pinyin is the same as the j-th letter of the pinyin string, then DI[i][j] = DI[i-1][j-1].
[0030] In some embodiments, the electronic device is configured with a speech recognition model, which includes an encoder, a decoder, a concatenation unit, and a classifier. The outputs of the encoder and the decoder are both connected to the input of the concatenation unit, and the output of the concatenation unit is connected to the classifier. The controller then performs speech processing on the speech data, including: inputting speech frames collected by the sound acquisition device to the encoder; inputting historical output data of the speech recognition model to the decoder; inputting the output results of the encoder and the decoder to the concatenation unit; and inputting the output result of the concatenation unit to the classifier, so that the classifier outputs at least one piece of text information and its probability.
[0031] In some embodiments, after waking up the voice application, the controller is further configured to: control the voice application to generate a voice control instruction based on the non-wake-up intent contained in the text information; and send the voice control instruction to an execution object to cause the execution object to execute the program indicated by the voice control instruction, wherein the execution object is the software or hardware of the electronic device.
[0032] Secondly, some embodiments of this application also provide a voice wake-up method, including:
[0033] Receive voice data input by the user;
[0034] The speech data is processed to obtain text information converted from the speech data;
[0035] The text information is truncated according to a preset length to obtain candidate text;
[0036] Dynamic matching based on a sliding window is performed on the custom wake word and the candidate text to obtain the minimum edit distance between the custom wake word and the candidate text;
[0037] Calculate the confidence level based on the minimum edit distance;
[0038] If the confidence level is greater than the threshold, the voice application is activated, and the voice application is used to respond to the user's voice input commands;
[0039] If the confidence level is not greater than the threshold, the voice application will not be activated.
[0040] Thirdly, some embodiments of this application also provide a computer storage medium storing program instructions that, when executed on a computer, cause the computer to perform the methods involved in the above aspects and their various implementations.
[0041] After processing the user's input voice data, the electronic device converts the audio into text. To facilitate subsequent dynamic matching of custom wake words and text information and improve matching efficiency, the text information can be truncated to a preset length. This preset length can be set with reference to the maximum length of a custom wake word, thus obtaining truncated candidate text. In this embodiment, after voice recognition, to further improve recognition accuracy and avoid false or missed wake-ups, a dynamic text matching algorithm is used to calculate the minimum edit distance between the custom wake word and the candidate text. The minimum edit distance can assess the similarity / matching degree between the custom wake word and the candidate text. Based on the minimum edit distance, a confidence score is calculated and compared with a threshold to decide whether to wake up the voice application. This improves the accuracy of voice recognition and wake-up, avoids erroneous responses and executions of voice control commands due to users mistakenly waking up voice applications, reduces false and missed wake-ups, improves wake-up rate and wake-up accuracy, and enhances voice control functionality and user voice experience. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in some embodiments of this application or in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 This application provides operational scenario diagrams for voice service processing in some embodiments.
[0044] Figure 2 Hardware configuration block diagrams of electronic devices provided in some embodiments of this application;
[0045] Figure 3 Software architecture configuration block diagrams of servers and electronic devices provided for some embodiments of this application;
[0046] Figure 4 A schematic diagram of a voice interaction network architecture provided for some embodiments of this application;
[0047] Figure 5 This application provides interactive illustrations of user-activated voice applications within electronic devices, based on some embodiments. Figure 1 ;
[0048] Figure 6 This application provides interactive illustrations of user-activated voice applications within electronic devices, based on some embodiments. Figure 2
[0049] Figure 7A schematic diagram illustrating the processing architecture for a custom voice wake-up function on an electronic device, provided in some embodiments of this application;
[0050] Figure 8 Flowcharts of voice wake-up methods provided in some embodiments of this application;
[0051] Figure 9 A schematic diagram of a speech recognition model provided for some embodiments of this application;
[0052] Figure 10 Flowcharts for input feature extraction based on transformer structure provided for some embodiments of this application;
[0053] Figure 11 Flowcharts of text dynamic matching algorithms provided in some embodiments of this application;
[0054] Figure 12 This application provides a sliding window movement mechanism for dynamic text matching in some embodiments. Detailed Implementation
[0055] To make the objectives and implementation methods of this application clearer, the exemplary implementation methods of this application will be clearly and completely described below with reference to the accompanying drawings of the exemplary embodiments of this application. Obviously, the exemplary embodiments described are only some embodiments of this application, and not all embodiments.
[0056] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.
[0057] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities, and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms can be used interchangeably where appropriate.
[0058] Figure 1 The diagram illustrates operational scenarios for voice service processing provided in some embodiments of this application. For example... Figure 1 As shown, the operation scenario may include a server 100 and an electronic device 200. Examples of electronic devices 200 include a smart TV 200a, a mobile terminal 200b, a smart speaker 200c, etc.
[0059] In this application, server 100 and electronic device 200 can interact with each other through various communication methods. Electronic device 200 can be connected via a local area network (LAN), wireless local area network (WLAN), or other networks. Server 100 can provide electronic device 200 with semantic parsing and intent recognition results, various business-related data, and other content. For example, electronic device 200 and server 100 can interact with each other for information and data, and receive software program updates, etc.
[0060] Server 100 can be a server providing various services, such as a backend server supporting the voice data collected by electronic device 200. Server 100 can perform semantic parsing, intent recognition, and other voice processing on the received voice data, and feed back the processing results (e.g., voice-to-text, intent commands, etc.) to electronic device 200. Server 100 can also respond to business requests from electronic device 200 and send corresponding business data (e.g., application data, media asset data, etc.) to electronic device 200. Server 100 can be a server cluster or multiple server clusters, and can include one or more types of servers.
[0061] Electronic device 200 can be a hardware device or a software device. When electronic device 200 is a hardware device, it can be various electronic devices with sound acquisition function, including but not limited to: smart TVs, smart refrigerators, smart air conditioners, smart speakers and other home appliances, smartphones, tablets, e-book readers, smartwatches, smart game consoles, computers, AI devices, robots, smart vehicles and other terminal devices.
[0062] When the electronic device 200 is a software device, it may include at least one software functional module / service / model (e.g., a sound acquisition module, a voice service, a voice processing model, etc.), and this software device can be applied to the hardware electronic devices listed above. This software device can be implemented as multiple software programs or software modules (e.g., to provide a sound acquisition service), or it can be implemented as a single software program or software module. No specific limitations are made here.
[0063] It should be noted that the voice wake-up method provided in this application embodiment can be executed by the server 100, by the electronic device 200, or by both the server 100 and the electronic device 200. This application does not limit the scope of the method.
[0064] Figure 2 This is a hardware configuration block diagram of the electronic device 200 provided in an embodiment of this application. For example... Figure 2As shown, electronic device 200 may include, but is not limited to, at least one of the following: communicator 210, detector 220, external device interface 230, controller 240, display 250, audio output interface 260, user interface 270, memory 280, and power supply. Controller 240 may include: central processing unit, video processor, audio processor, graphics processor, RAM, ROM, and first to nth interfaces for input / output.
[0065] The display 250 includes a display screen assembly for presenting images, a driving assembly for driving image display, a component for receiving image signals output from the controller 240, and a user interface (UI) for displaying video content, image content, a menu control interface, and a user control interface. The display 250 can be a liquid crystal display, an OLED display, or a projection display, and can also be a projection device and a projection screen.
[0066] The communicator 210 is a component used to communicate with external devices or the server 100 according to various communication protocol types. For example, the communicator 210 may include at least one of the following: a Wi-Fi module, a Bluetooth module, a wired Ethernet module, other network communication protocol chips or near-field communication protocol chips, and an infrared receiver. The electronic device 200 can establish a communication connection with the server 100 through the communicator 210 to send and receive control signals and data signals.
[0067] User interface 270 can be used to receive external control signals, such as user operations based on user interface input.
[0068] Detector 220 can be used to collect signals from the external environment or to interact with the external environment. For example, detector 220 may include: a light receiver, a sensor for collecting ambient light intensity; or, detector 220 may include an image collector, such as a camera, for collecting external environmental scenes, user attributes, or user interaction gestures; or, detector 220 may include a sound collector for collecting sounds from the external environment, such as collecting voice commands issued by the user to electronic device 200, including voice wake-up commands for waking up voice applications (e.g., voice assistants).
[0069] A sound acquisition device can be a microphone, also known as a "microphone" or "voice transducer," which can be used to receive the user's voice and convert the sound signal into an electrical signal. Electronic device 200 can be equipped with at least one microphone. In some embodiments, electronic device 200 can be equipped with two microphones, which, in addition to acquiring sound signals, can also perform noise reduction. Electronic device 200 can also be equipped with three, four, or more microphones, and can be configured as a microphone array to achieve near-field or far-field sound signal acquisition, noise reduction, sound source identification, and directional recording functions.
[0070] Furthermore, the microphone can be built into the electronic device 200, or it can be connected to the electronic device 200 via wired or wireless means (such as Bluetooth). Of course, this embodiment does not limit the installation location of the microphone on the electronic device 200. Alternatively, the electronic device 200 may not include a microphone, meaning the microphone is not located within the electronic device 200. The electronic device 200 can connect an external microphone via certain interfaces (e.g., USB interfaces), and this external microphone can be fixed to any position on the electronic device 200 using external fasteners (e.g., microphone holders with clips).
[0071] The controller 240 can control the task execution of the electronic device 200 and respond to user operations or voice commands through various software programs stored in the memory 270. The controller 240 is used to control the overall operation of the electronic device 200.
[0072] The controller 240 may include at least one of the following: a central processing unit (CPU), a video processor, an audio processor, a graphics processing unit (GPU), a random access memory (RAM), a read-only memory (ROM), a first to an nth interface for input / output, a communication bus, etc.
[0073] Electronic devices 200 can have different software configurations under different device types and operating systems. Figure 3 This is a software architecture configuration block diagram of a server and electronic device provided for some embodiments of this application. Taking an electronic device 200 configured with an Android operating system as an example, as follows... Figure 3 As shown, the electronic device 200 can be logically divided into an application layer (referred to as "application layer 21"), a kernel layer 22, and a hardware layer 23. The server 100 includes, but is not limited to, a communication control module 101, an intent recognition module 102, and a data storage module 103.
[0074] In some embodiments, such as Figure 3 As shown, hardware layer 23 may include Figure 2 Examples include a communicator 210, a detector 220, a controller 240, and a display 250.
[0075] In some embodiments, such as Figure 3As shown, application layer 21 includes one or more applications. These applications can be system applications or third-party applications. For example, application layer 21 may include a voice application, which can provide a voice interaction interface and related voice services. The voice application can interact with the communication control module 101 to achieve the connection between the electronic device 200 and the server 100.
[0076] The kernel layer 22 serves as a software middleware between the hardware layer 23 and the application layer 21, and is used to manage and control hardware and software resources.
[0077] In some embodiments, kernel layer 22 includes a detector driver, which may include a microphone driver. The microphone driver is used to send voice data collected by the microphone to the voice application in application layer 21. When the voice application in electronic device 200 is started and a communication connection has been established between electronic device 200 and server 100, the microphone driver is used to send the user-input voice data collected by the microphone in detector 230 to the voice application. The voice application can then send this voice data to intent recognition module 202 in the server. Intent recognition module 202 is used to input the voice data sent by electronic device 200 into intent recognition model. The intent recognition model can be a model configured with voice processing, intent recognition, and other algorithms, used to output the user intent indicated by the voice data, such as the user intent being "turn on the air conditioner".
[0078] To clearly illustrate the embodiments of this application, the following description is provided in conjunction with... Figure 4 This application describes a speech recognition network architecture provided in its embodiments.
[0079] Figure 4 This is a schematic diagram of a voice interaction network architecture provided for some embodiments of this application. For example... Figure 4 As shown, electronic device 200 collects voice data input by the user and sends the voice data to server 100. Server 100 can be configured with a voice recognition module, a semantic understanding module, and a business service module. The voice recognition module can be equipped with an ASR (Automatic Speech Recognition) service, which converts voice data into text. The semantic understanding module can be equipped with an NLU (Natural Language Understanding) service, which performs semantic parsing on the text to identify the user's voice intent. The business service module executes business services matching the user's voice input, such as providing query functions (e.g., weather queries, media asset queries). Figure 4The architecture shown can contain multiple entity service devices with different business services deployed, or it can aggregate one or more functional services in one or more entity service devices.
[0080] In some embodiments, the following describes the basis Figure 4 The process of processing information input to an electronic device using the architecture shown is illustrated with an example, taking voice-input commands as an example:
[0081] [Speech Recognition]
[0082] After receiving a command statement input by the user, the electronic device can perform noise reduction and feature extraction on the audio of the command statement. The noise reduction process may include steps such as removing echoes and ambient noise. The electronic device then sends the audio of the command statement to the speech recognition module in the server 100, which converts the audio of the command statement into text.
[0083] [Semantic understanding]
[0084] The semantic understanding module utilizes acoustic and language models to perform natural language understanding on the identified candidate text and associated contextual information. It parses the text into structured, machine-readable information, including business domain, intent, slots, and other semantic elements. After obtaining the executable intent, the semantic understanding module determines the intent confidence score and selects one or more candidate executable intents based on this score.
[0085] [Business Services]
[0086] Based on the semantic parsing and intent recognition results of the instruction statement, the semantic understanding module issues a first instruction to the corresponding business service module. The business service module responds to this first instruction by executing the corresponding business function. For example, if the instruction statement is "Play program A," the business service module can obtain the media asset data of program A and send it to electronic device 200, causing electronic device 200 to start playing program A, thereby completing the voice response and business execution.
[0087] It should be noted that, Figure 4 The architecture shown is merely an example and is not intended to limit the scope of protection of this application. Other architectures can also be used to achieve similar functions in the embodiments of this application. For example, all or part of the above processes can be performed by electronic devices, which will not be elaborated here. The embodiments of this application do not limit the structure of server 100. Server 100 may at least include a communicator and a controller. The communicator is used to establish a communication connection between server 100 and electronic device 200, and the controller is used to execute relevant calculations, control logic, and business functions in server 100.
[0088] In voice control scenarios, electronic device 200 can pre-agree with the user on a wake-up word for waking up a voice application (e.g., a voice assistant). This wake-up word is usually the name or nickname of the voice product pre-set by electronic device 200, such as "Xiao X". This method is a fixed wake-up method. Figure 5 This application provides interactive illustrations of user-activated voice applications within electronic devices, based on some embodiments. Figure 1 See Figure 5 Taking the fixed wake-up method for waking up the voice application of a smart TV as an example, the user says the sentence 1 "Hi, Xiao X", where "Xiao X" is a fixed wake-up word, which is equivalent to the user "greeting" the voice application built into the smart TV. The sound collector sends the audio data of the collected sentence 1 to the voice application. The voice application can send the audio data to the server or call the voice model preset by the electronic device to parse and process the audio data 1.
[0089] The voice application retrieves keywords from the voice processing results and compares them with a wake-up word. If the keyword matches the wake-up word, the wake-up is successful, and statement 1 triggers a voice wake-up command, reviving the voice application from sleep mode to wake mode. It is then allowed to respond to subsequently acquired voice commands and execute actions / programs matching the user's voice intent—in other words, wake-up precedes voice interaction. If the keyword does not match the wake-up word, the wake-up fails, and the voice application remains in sleep mode. In sleep mode, no voice control other than the wake-up task is permitted.
[0090] Fixed wake-up methods require the use of a fixed wake-up word to wake up voice applications. However, different users have different usage habits and preferences. This unchanging wake-up mode affects the user experience. Furthermore, waking up before voice interaction can lead to low voice control efficiency. Some users may not know or have forgotten the default wake-up word, making it impossible to effectively use the voice control function. This has led to the development of more user-friendly custom wake-up methods.
[0091] Compared to fixed wake-up methods, custom wake-up methods are no longer limited to fixed wake words. Custom wake words can be used by users to replace the original fixed wake words with personalized wake words, such as using "Happy Baby" instead of "Little X". Alternatively, custom wake words can include a wider range of words that can wake up voice applications. The number of custom wake words can range from dozens to hundreds or even more. Custom wake words are mainly voice commands that users frequently use for specific electronic devices, such as "Turn on the air conditioner", "Play a song", "Check the weather", "Turn up the volume", "Turn down the volume", "Return to the homepage", etc.
[0092] Figure 6 This application provides interactive illustrations of user-activated voice applications within electronic devices, based on some embodiments. Figure 2 See also Figure 6 If the user says "Next Page" on the currently displayed cable TV recommendation page, and "Next Page" is one of the custom wake words of the electronic device, then this statement 2 can trigger a custom wake-up task, enabling the smart TV to automatically wake up the voice application, and after successfully waking up the voice application, switch to the next recommendation page.
[0093] If the electronic device 200 is a display device, the custom wake-up word can be a voice command based on user interface input. For example, when the display device displays a video playback interface, the custom wake-up word can include keywords such as "play", "pause", "full-screen playback", "exit full-screen", "X times speed", etc., for example, "2x speed playback".
[0094] For example, when a shopping interface or media selection interface is displayed on a display device, a custom wake word can include keywords such as "previous page", "next page", "page X", "item X", etc., for example, "view the details of the second product".
[0095] For example, the interface of the in-vehicle terminal display includes at least one touch-sensitive button. The function trigger commands of these touch-sensitive buttons can all be used as custom wake words, such as "play CD" or "turn on Bluetooth". In this way, if the electronic device detects that the user's statement contains a custom wake word, it can automatically wake up the voice application and control the voice application to execute the corresponding control commands after successful wake-up.
[0096] For example, if a user says "turn on the air conditioner's cooling mode," the smart home voice control system recognizes that the statement contains the custom wake word "turn on the air conditioner," then wakes up the voice application. The voice application sends a control command to the smart air conditioner to start it up and enter cooling mode. Custom wake-up scenarios are not limited to the examples in this application's embodiments.
[0097] Custom wake-up methods have at least the following problems:
[0098] Problem 1: Custom wake-up methods require training and optimization for a large number of wake-up words. The algorithm model is complex and computationally intensive. If the algorithm model is configured on electronic device 200, it may reduce the operating performance of electronic device 200, increase the load on electronic device 200, or even be incompatible with the chip performance of electronic device 200.
[0099] Question 2, refer to Figures 1-4This configuration allows the algorithm model for the custom wake-up technology to be configured on the server 100. The electronic device 200 then uploads the user's voice data to the server 100, which in turn calls the algorithm model and executes the custom wake-up task. However, this method requires the electronic device 200 and server 100 to maintain a network connection. If the network connection is lost, the custom wake-up cannot be triggered, and the synchronous uploading of user voice data also exposes user privacy.
[0100] Question 3: Custom wake-up has issues with false wake-ups and a decreased wake-up rate (missed wake-ups), which affects the user experience of voice control functions.
[0101] The following embodiments of this application provide a voice wake-up solution. Addressing problems one and two, by optimizing the algorithm model and reducing its complexity, it achieves compatibility with the chip performance of more electronic devices (200), improving the feasibility of custom wake-up execution on the electronic device side. This eliminates the need for the electronic device to maintain a network connection with the server or upload user-input voice data to the server, thus protecting user privacy. Regarding problem three, this application employs a dynamic text matching algorithm to dynamically match the voice recognition results output by the model, reducing false wake-ups and improving the wake-up rate and accuracy of custom wake-up methods, thereby providing users with better voice control functionality.
[0102] Figure 7 This is a schematic diagram illustrating a custom voice wake-up processing architecture for an electronic device, provided in some embodiments of this application. See also... Figure 7 The processing architecture may include an audio front-end processing module 71, a speech recognition module 72, and a text dynamic matching module 73. After receiving a speech signal, the sound acquisition unit of the electronic device sends the speech signal to the audio front-end processing module 71. The audio front-end processing module 71 preprocesses the speech signal and then sends the preprocessed speech signal to the speech recognition module 72. The preprocessing performed by the audio front-end processing module 71 includes, but is not limited to, echo cancellation, noise suppression, and speech endpoint detection. The purpose of preprocessing is to facilitate processing by the speech recognition module 72 and improve the accuracy of speech recognition. The preprocessing method for the speech signal can refer to relevant technologies, and will not be elaborated further in this embodiment.
[0103] In some embodiments, the speech recognition module 72 is configured with a speech recognition model. The speech recognition module 72 inputs the preprocessed speech signal into the speech recognition model, which processes the speech signal to convert it into text information and sends the text information to the text dynamic matching module 73. The text dynamic matching module 73 performs dynamic matching on the text information and outputs a wake-up result, which includes "not wake up" and "wake up allowed". Based on the wake-up result, the electronic device decides whether to wake up the voice application and, if so, executes the voice command corresponding to the custom wake-up word.
[0104] Figure 7 The example processing architecture and the algorithms configured in each module of the architecture are applicable to electronic devices on different systems (including but not limited to Android, Windows, and Linux). The following embodiments will provide a detailed description of the voice wake-up method, the algorithm configuration of the voice recognition module 72, and the dynamic text matching module 73 executed by this architecture.
[0105] based on Figure 7 The architecture, Figure 8 A flowchart illustrating a voice wake-up method provided in some embodiments of this application. See also... Figure 8 This method is executed on the electronic device side and includes the following steps:
[0106] Step S81: Receive the voice data collected and transmitted by the sound acquisition device.
[0107] Step S82: Perform speech processing on the speech data to obtain text information converted from the speech data.
[0108] In some embodiments, the electronic device can control the audio front-end processing module 71 to preprocess the voice data, and control the voice recognition module 72 to perform voice processing on the preprocessed voice data. Voice processing includes, but is not limited to, semantic analysis and intent recognition, and the algorithm model used for voice processing is not limited. If the performance of the electronic device's chip is limited, it can refer to... Figure 3 and Figure 4 The example shows that the voice processing flow is executed by the server.
[0109] Step S83: Extract text information according to a preset length to obtain candidate text.
[0110] In some embodiments, a preset length can be set with reference to the average or maximum length of at least one custom wake word associated with the electronic device. The preset length can be greater than the average or maximum length of the custom wake word. For example, if the maximum length of a custom wake word is typically 5 to 6 characters, the preset length can be set to 10 characters.
[0111] By extracting text information by setting a preset length to obtain candidate text, the computational load of subsequent dynamic text matching algorithms can be reduced, and some invalid text (such as interjections, "hey," etc.) can be reduced or filtered out, which is beneficial to improving the efficiency and accuracy of dynamic text matching.
[0112] Step S84: Perform dynamic matching of the custom wake word and candidate text based on a sliding window to obtain the minimum edit distance between the custom wake word and candidate text.
[0113] In some embodiments, a sliding window can be set based on the length of the custom wake word, and the movement of the sliding window in the candidate text can be used to realize the step-by-step comparison and dynamic matching between text characters to obtain the minimum edit distance. The minimum edit distance is used to measure the similarity / matching degree between the custom wake word and the candidate text. The smaller the minimum edit distance, the higher the matching degree is usually, indicating that the candidate text is more similar to the custom wake word.
[0114] Step S85: Calculate the confidence level based on the minimum edit distance.
[0115] In some embodiments, a confidence score can be calculated based on the minimum edit distance between the custom wake word and the candidate text, combined with the length of the custom wake word. The confidence score is used to measure the credibility of the wake-up voice application.
[0116] Step S86: Determine whether the confidence level is greater than the threshold.
[0117] If the confidence level is greater than the threshold, proceed to step S87; otherwise, if the confidence level is not greater than the threshold, proceed to step S88.
[0118] Step S87: Activate the voice application.
[0119] Step S88: Do not wake up the voice application.
[0120] Figure 9 This is a schematic diagram of a speech recognition model provided for some embodiments of this application. See also... Figure 9 The speech recognition module 72 is configured with a speech recognition model that includes an encoder, a decoder, a joint, and a classifier. Electronic devices can use this speech recognition model to implement the above step S82.
[0121] In some embodiments, see Figure 9 The input to this speech recognition model is a sequence of speech feature vectors, corresponding to speech frames, denoted as x. t The output of this speech recognition model is a sequence of modeling units, denoted as y. u The modeling unit can be a phoneme, a character, or a word. The speech recognition module 72 can process the speech frame x at time t.t The audio frame is input to the encoder, which encodes it; the speech recognition module 72 can then use the non-blank historical output data y from the speech recognition model. u-M …y u-2 y u-1 The input is fed to the decoder, where M represents the interval between the historical output and the output at time u. The decoder decodes the historical output data.
[0122] In some embodiments, the encoder may employ a transformer structure, which requires the input to be a log-Mel spectrogram feature. Therefore, the speech recognition module 72 may first extract the log-Mel spectrogram feature from the speech data.
[0123] Figure 10 A flowchart illustrating input feature extraction based on a transformer structure, provided for some embodiments of this application. See also... Figure 10 The speech recognition module 72 can sequentially process the speech data through pre-emphasis, framing, windowing, FFT (Fast Fourier Transform), amplitude squaring, Mel filter bank, log power, and log-Mel spectrum generation to obtain log-Mel spectrum features, which are then input into the encoder. The dimension of the log-Mel spectrum features is represented as [T, F], where T is the number of time frames and F is the dimension of the audio features before encoding. The encoded sequence output by the encoder can be represented as... The output dimension is represented as [T,D], where D is the output feature dimension of the encoder.
[0124] In some embodiments, the decoder can be a structure such as CNN (Convolutional Neural Network) or RNN (Recurrent Neural Network). The decoder can first perform an embedding operation on the labels of the historical outputs to obtain the label vector V. l Then the label vector V l The input is a neural network structure (e.g., an RNN) for decoding, and the decoded sequence output by the decoder can be represented as... The output dimension is represented as [U,D], where U represents the number of tag characters and D is the output feature dimension of the decoder. The output feature dimensions of the codec and the decoder are consistent.
[0125] In some embodiments, see Figure 9 The outputs of both the encoder and decoder are connected to a combiner. The combiner can include multiple (e.g., two) linear layers. The combiner is used to combine the outputs of the encoder and decoder, and the output of the combiner can be expressed as... The feature dimension output by the jointer through matrix transformation is represented as [T,D,V], where V represents the size of the vocabulary. In this application, the jointer can be regarded as a kind of Joint Network, and the jointer can be implemented by structures such as MLP (Multi-layer Perceptron).
[0126] In some embodiments, see Figure 9 The union will output the result z. t,u The data is sent to the classifier, which obtains the probability distribution p(y|t,u) of the output at the current time. p(y|t,u) represents the probability of each possible category (i.e., the recognized text information). In this way, the speech recognition module 72 can obtain the text information converted from the user's speech, such as the target text information mapped by the highest probability or a probability higher than a threshold.
[0127] In some embodiments, the classifier can use a structure such as Softmax, and the calculation method of p(y|t,u) is as shown in the following formula:
[0128]
[0129] In Formula 1, T represents the input time frame, and U represents the number of tag characters. Indicates t i The audio frame at a given moment, t i It is the time variable corresponding to the speech frame. Indicate u i-1 Historical output of moments, u i-1 It corresponds to the time variable in the historical output.
[0130] The advantages of the algorithm model configured in the speech recognition module 72 in this embodiment include: fewer encoder model network layers, fewer parameters involved in the model, and no need for multiple models to be cascaded, which can reduce the computational load of the model, reduce the complexity of the speech recognition model, facilitate model training and expansion, adapt to the chip performance of most electronic devices, and improve the feasibility of speech recognition and custom wake-up to be executed on the electronic device side. In this way, the electronic device does not need to maintain a network connection with the server, nor does it need to upload the user's input voice data to the server, which is beneficial to protecting user privacy.
[0131] In some embodiments, after processing the voice data and obtaining text information, the voice recognition module 72 can input the text information into the text dynamic matching module 73. The text dynamic matching module 73 is equipped with a text dynamic matching algorithm, which can improve the wake-up rate of custom wake-up and reduce the false wake-up rate. Thus, through the cooperation of the voice recognition module 72 and the text dynamic matching module 73, the wake-up rate and accuracy when the electronic device performs a custom wake-up task can be improved.
[0132] Figure 11 This is a flowchart of a text dynamic matching algorithm provided in some embodiments of this application. Electronic devices can use it. Figure 11 The example text dynamic matching algorithm implements steps S83 to 88 above. Assuming the custom wake-up word is "Keys" and the text information recognized by the speech recognition module 72 is "TextWord", see [link / reference]. Figure 11 At the current time t, the operation logic of the dynamic text matching algorithm is as follows:
[0133] Step 1: Extract candidate text (Text) from the TextWord based on the custom wake word (Keys).
[0134] In some embodiments, the custom wake word has a certain length. Assuming the longest custom wake word includes M characters, the dynamic text matching module 73 can extract the last N characters of the text information TextWord, where N is greater than M, and combine these last N characters according to their original order to form the candidate text Text. For example, a custom wake word might be "turn on the air conditioner," and a text information TextWord example might be "turn on the air conditioner's cooling mode at 20 degrees." Assuming N = 10, the candidate text Text would be extracted as "the air conditioner's cooling mode at 20 degrees." By appropriately reducing the text information TextWord to the candidate text Text, the computational load of subsequent dynamic text matching can be reduced, improving matching efficiency.
[0135] Step 2: Convert the custom wake word keys and candidate text to the target format.
[0136] In some embodiments, the text dynamic matching module 73 can encode the custom wake word Keys and candidate text Text into UTF-8 respectively, converting them into a unified UTF-8 format to improve the accuracy of subsequent matching. UTF-8 is an encoding format where each byte contains 8 bits. UTF-8 is a variable-length character encoding for Unicode, characterized by its ability to use different lengths of encoding for different ranges of characters. It can represent any character in the Unicode standard, and the first byte in its encoding is still compatible with ASCII, allowing software that originally processed ASCII characters to continue using it with little or no modification.
[0137] Step 3: Convert the custom wake word Keys and candidate text to Pinyin.
[0138] In some embodiments, to facilitate character matching, the dynamic text matching module 73 can perform pinyin conversion on the custom wake-up word Keys and the candidate text Text respectively, so as to transform both from Chinese character structure to pinyin structure. The dynamic text matching module 73 can be configured with a pinyin conversion submodule, in which the dynamic text matching module 73 inputs the custom wake-up word Keys and the candidate text Text to the pinyin conversion submodule, which generates the first pinyin p_Keys of the custom wake-up word Keys and the second pinyin p_Text corresponding to the candidate text Text. For example, if a custom wake-up word is "play a song", then the corresponding p_Keys example is "bofanggequ".
[0139] Step 4: Obtain the pinyin length h of the custom wake word Keys, truncate p_Text using the pinyin length h as a sliding window, and move the sliding window according to a preset step size. The preset step size is not limited, for example, it can be one letter.
[0140] Figure 12 This application provides a sliding window movement mechanism for dynamic text matching in some embodiments. See also: Figure 12 If the current custom wake word Keys example is "turn on the air conditioner", and the first pinyin p_Keys example is "dakaikongtiao", then the pinyin length h of the custom wake word Keys is 13 letters. The text dynamic long matching module 73 can generate a sliding window that can accommodate 13 letters.
[0141] See Figure 12Suppose the candidate text Text is truncated to "Air conditioner cooling mode 20 degrees", and the second pinyin p_Text example is "kongtiaodezhilengmoshiershidu". Then the sliding window will first truncate "kongtiaodezhi". Assuming the preset step size is 1 letter, the next step of the sliding window will truncate "ongtiaodezhil", and so on, until the sliding window finally truncates "gmoshiershidu". The sliding window moves a total of 16 steps.
[0142] The following step 5 is executed repeatedly during the initial capture of the sliding window and each subsequent step the sliding window takes along the target direction at a preset step size. The target direction can be from left to right along the second pinyin p_Text.
[0143] Step 5: Calculate the minimum edit distance between the first pinyin p_Keys of the custom wake word Keys and the pinyin string currently truncated by the sliding window.
[0144] Let's abbreviate the first pinyin of the custom wake word Keys, p_Keys, as A, and the pinyin string extracted by the sliding window from p_Text as B. Then, the text dynamic matching module 73 can create a matrix DI with dimensions [h+1, h+1] to facilitate the calculation of the edit distance DI[i][j]. Here, i represents the letter index in A, j represents the letter index in B, 1≤i≤h, 1≤j≤h, and DI[i][j] represents the minimum number of editing operations required to convert the first i letters of A into the first j letters of B. The minimum edit distance can be used to evaluate the similarity between A and B; generally, the smaller the minimum edit distance between A and B, the more similar they are.
[0145] In some embodiments, after creating matrix DI, matrix DI can be initialized, where DI[i][0] represents the minimum number of modifications required to convert the pinyin string consisting of the first i letters of A into an empty string. When j = 0, DI[i][0] = i. DI[0][j] represents the minimum number of modifications required to convert the empty string into the pinyin string consisting of the first j letters of B. When i = 0, DI[0][j] = j. If the i-th letter of A is the same as the j-th letter of B, that is, A[i] = B[j], then DI[i][j] = DI[i-1][j-1].
[0146] In some embodiments, editing operations include, but are not limited to, insertion, deletion, and replacement. For example, inserting the letter 'p' after "to" changes the string to "top"; deleting the letter 'e' from "eat" changes the string to "at"; and replacing the third letter 'e' with the letter 'a' in "deer" changes the string to "dear".
[0147] In some embodiments, if the i-th letter of A is different from the j-th letter of B, the edit distance can be calculated separately for different types of edit operations.
[0148] Step 5.1: If the j-th letter of B is inserted after the i-th letter of A, such that the first i letters of A are the same as the first j+1 letters of B, then the edit distance DI[i][j]1 = DI[i][j-1]+1.
[0149] Step 5.2: If the i-th letter of A is replaced with the j-th letter of B, then the edit distance DI[i][j]2 = DI[i-1][j-1] + 1.
[0150] Step 5.3: If the i-th letter of A is deleted, so that the first i-1 letters of A are the same as the first j letters of B, then the edit distance DI[i][j]3 = DI[i-1][j] + 1.
[0151] Step 5.4: Take the minimum edit distance among the three cases in Steps 5.1 to 5.3 as the edit distance DI[i][j], where DI[i][j] = min{DI[i][j]} x |x=1,2,…,R}, where x represents the type number of the editing operation, and R is the total number of types of editing operations. For example, when R equals 3, x=1 corresponds to the insertion operation, x=2 corresponds to the replacement operation, and x=3 corresponds to the deletion operation. Then, the calculation of DI[i][j] is as shown in Formula 2:
[0152]
[0153] Step 5.5: Based on the initial values of the DI matrix, starting from i=0 and j=0, iterate through i and j until you obtain DI[h][h]. k . DI[h][h] k This represents the minimum edit distance between the first pinyin of the custom wake word Keys (p_Keys) and the pinyin string truncated after the sliding window moves k steps, i.e., the minimum edit distance between A and B.
[0154] Step 6: Move the sliding window according to the preset step size, and repeat Step 5 until the sliding window finishes moving.
[0155] Step 7: Obtain the minimum edit distance d between the first pinyin p_Keys of the custom wake word Keys and the second pinyin p_Text of the candidate text Text.
[0156] Let the second pinyin of the candidate text Text, p_Text, be abbreviated as C. Let d represent the minimum edit distance between p_Keys and p_Text, that is, the minimum edit distance between A and C. Then d = min{DI[h][h]}k |k=0,1,…Q}, where k represents the number of steps the sliding window moves, DI[h][h] k Q represents the minimum edit distance between p_Keys and the pinyin string extracted after the sliding window moves k steps, and Q represents the total number of steps moved when the sliding window fully traverses p_Text.
[0157] Get the DI[h][h] when the sliding window is traversed in step mode for p_Text. k The minimum value of p_Keys is obtained to obtain the minimum edit distance d between p_Keys and p_Text. This minimum edit distance d can measure the similarity between the custom wake word and the candidate text so that the text dynamic matching module 73 can decide whether to wake up the voice application.
[0158] Step 8: Calculate the confidence level c based on the pinyin length h and minimum edit distance d of p_Keys.
[0159] In some embodiments, the confidence level c is calculated as shown in Formula 3:
[0160]
[0161] Step 9: Determine whether the confidence level c is greater than the threshold Th.
[0162] If the confidence level c is greater than the threshold Th, it is considered that the custom wake word matches the candidate text well, and step 10 is executed; if the confidence level c is not greater than the threshold Th, it is considered that the custom wake word matches the candidate text poorly, and step 11 is executed.
[0163] Step 10: Output the wake-up result as "Wake-up allowed".
[0164] Step 11, the output wake-up result is "not woken up".
[0165] The algorithms configured by the text dynamic matching module 73 in steps 1 to 11 above can improve the accuracy of custom wake-up execution on the electronic device side, increase the wake-up rate, reduce missed wake-ups and false wake-ups, and enhance voice control functions.
[0166] In some embodiments, after a voice application is activated, it can generate voice control commands based on non-wake-up intentions contained in the text information. Non-wake-up intentions refer to other intentions contained in the user's voice besides waking up the voice application. For example, if a user says "play movie S" into the microphone of a smart TV, and "open the news channel" highly matches a custom wake word, then in addition to waking up the smart TV's voice application, the recognized intention is to start playing movie S. The voice application can then generate voice control commands matching this intention.
[0167] In some embodiments, a voice application can send voice control commands to an execution object, causing the execution object to execute the program indicated by the voice control command, thereby completing the control stages such as voice recognition, response, and execution. The execution object can be a software program or hardware structure of an electronic device. Software programs can be, for example, media players or different software function modules, while hardware structures can be, for example, audio playback devices or displays.
[0168] Some embodiments of this application also provide a computer storage medium that can store a program. When the computer storage medium is configured in an electronic device, the program, when executed, can include the program steps included in the voice wake-up method in the above embodiments. The computer storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0169] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0170] For ease of explanation, the above description has been provided in conjunction with specific embodiments. However, the foregoing exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Various modifications and variations can be made based on the foregoing teachings. The selection and description of the above embodiments are for the purpose of better explaining the contents of this disclosure, thereby enabling those skilled in the art to better utilize the described embodiments.
Claims
1. An electronic device, characterized in that, include: A voice acquisition device is used to collect voice data input by the user. The controller is used to perform: Receive the voice data collected and transmitted by the sound collector; The speech data is processed to obtain text information converted from the speech data; The text information is truncated according to a preset length to obtain candidate text; Dynamic matching based on a sliding window is performed on the custom wake word and the candidate text to obtain the minimum edit distance between the custom wake word and the candidate text; Calculate the confidence level based on the minimum edit distance; If the confidence level is greater than the threshold, the voice application is activated, and the voice application is used to respond to the user's voice input commands; If the confidence level is not greater than the threshold, the voice application will not be activated; Before performing a sliding-window-based dynamic matching of the custom wake word and the candidate text, the controller is also configured to perform: Convert the custom wake word and the alternative text into the target format. The custom wake word after format conversion is converted into pinyin to obtain the first pinyin; The candidate text after format conversion is converted into pinyin to obtain a second pinyin; The controller performs dynamic matching of the custom wake word and the candidate text based on a sliding window, including: A sliding window is generated based on the length of the first pinyin; When the sliding window moves along the second pinyin according to a preset step size and target direction, the second pinyin is captured by the sliding window to obtain the pinyin string currently captured by the sliding window; Calculate the minimum edit distance DI[h][h] between the first pinyin and the pinyin string extracted after the sliding window moves k steps. k , where k represents the number of steps the sliding window moves, and h represents the length of the first pinyin; Calculate the minimum edit distance d between the first and second pinyin, d = min{DI[h][h]} k |k=0,1,…Q}, where Q represents the total number of steps moved when the sliding window completely traverses the second pinyin; The controller calculates the minimum edit distance DI[h][h] between the first pinyin and the pinyin string extracted after the sliding window moves k steps. k ,include: Create a matrix DI of dimension [h+1, h+1], which is used to calculate the edit distance DI[i][j]. x Where i represents the letter index in the first pinyin, j represents the letter index in the pinyin string extracted after the sliding window moves k steps, 1≤i≤h, 1≤j≤h, x represents the type index of the editing operation, DI[i][j] x This represents the minimum number of edit operations of type x required to convert the first i letters of the first pinyin into the first j letters of the pinyin string; Starting with i=0 and j=0, iterate through i and j, calculating the edit distance DI[i][j], until i=j=h, obtaining the minimum edit distance DI[h][h]. k Where, DI[i][j] = min{DI[i][j]} x |x=1,2,…,R}, where R represents the total number of types included in the editing operation.
2. The electronic device according to claim 1, characterized in that, The controller calculates the confidence level as follows: Where c represents the confidence level.
3. The electronic device according to claim 1, characterized in that, The types of editing operations include insertion, replacement, and deletion, then: x=1:DI[i][j]1=DI[i][j-1]+1; x=2:DI[i][j]2=DI[i-1][j-1]+1; x=3:DI[i][j]3=DI[i-1][j]+1; Where x = 1 corresponds to the insertion operation, and DI[i][j]1 represents the edit distance when the first i-th letter of the first pinyin is inserted after the first i-th letter of the pinyin string, such that the first i-th letter of the first pinyin is the same as the first j+1-th letter of the pinyin string. x = 2 corresponds to a swap operation, and DI[i][j]2 represents the edit distance when the i-th letter of the first pinyin is replaced with the j-th letter of the pinyin string; x = 3 corresponds to the deletion operation, and DI[i][j]3 represents the edit distance when the i-th letter of the first pinyin is deleted, such that the first i-1 letters of the first pinyin are the same as the first j letters of the pinyin string.
4. The electronic device according to claim 1, characterized in that, If the i-th letter of the first pinyin is the same as the j-th letter of the pinyin string, then DI[i][j] = DI[i-1][j-1].
5. The electronic device according to claim 1, characterized in that, The electronic device is equipped with a speech recognition model, which includes an encoder, a decoder, a concatenation unit, and a classifier. The outputs of the encoder and the decoder are both connected to the input of the concatenation unit, and the output of the concatenation unit is connected to the classifier. The controller then performs speech processing on the speech data, including: The audio frames collected by the sound collector are input into the encoder; The historical output data of the speech recognition model is input into the decoder; The outputs of the encoder and the decoder are input into the combiner; The output of the concatenation unit is input into the classifier so that the classifier outputs at least one of the text information and its probability.
6. The electronic device according to claim 1, characterized in that, After activating the voice application, the controller is also used to perform: The voice application is controlled to generate voice control commands based on the non-wake-up intent contained in the text information; The voice control command is sent to an execution object so that the execution object executes the program indicated by the voice control command, wherein the execution object is the software or hardware of the electronic device.
7. A voice wake-up method, characterized in that, include: Receive voice data input by the user; The speech data is processed to obtain text information converted from the speech data; The text information is truncated according to a preset length to obtain candidate text; Dynamic matching based on a sliding window is performed on the custom wake word and the candidate text to obtain the minimum edit distance between the custom wake word and the candidate text; Calculate the confidence level based on the minimum edit distance; If the confidence level is greater than the threshold, the voice application is activated, and the voice application is used to respond to the user's voice input commands; If the confidence level is not greater than the threshold, the voice application will not be activated; Before performing a sliding window-based dynamic matching of the custom wake word and the candidate texts, the following steps are also included: Convert the custom wake word and the alternative text into the target format. The custom wake word after format conversion is converted into pinyin to obtain the first pinyin; The candidate text after format conversion is converted into pinyin to obtain a second pinyin; Dynamic matching of the custom wake word and the candidate texts based on a sliding window includes: A sliding window is generated based on the length of the first pinyin; When the sliding window moves along the second pinyin according to a preset step size and target direction, the second pinyin is captured by the sliding window to obtain the pinyin string currently captured by the sliding window; Calculate the minimum edit distance DI[h][h] between the first pinyin and the pinyin string extracted after the sliding window moves k steps. k , where k represents the number of steps the sliding window moves, and h represents the length of the first pinyin; Calculate the minimum edit distance d between the first and second pinyin, d = min{DI[h][h]} k |k=0,1,…Q}, where Q represents the total number of steps moved when the sliding window completely traverses the second pinyin; Calculate the minimum edit distance DI[h][h] between the first pinyin and the pinyin string extracted after the sliding window moves k steps. k ,include: Create a matrix DI of dimension [h+1, h+1], which is used to calculate the edit distance DI[i][j]. x Where i represents the letter index in the first pinyin, j represents the letter index in the pinyin string extracted after the sliding window moves k steps, 1≤i≤h, 1≤j≤h, x represents the type index of the editing operation, DI[i][j] x This represents the minimum number of edit operations of type x required to convert the first i letters of the first pinyin into the first j letters of the pinyin string; Starting with i=0 and j=0, iterate through i and j, calculating the edit distance DI[i][j], until i=j=h, obtaining the minimum edit distance DI[h][h]. k Where, DI[i][j] = min{DI[i][j]} x |x=1,2,…,R}, where R represents the total number of types included in the editing operation.
Citation Information
Patent Citations
Joint automatic speech recognition and speaker diarization
CN113646835A
Wake word evaluation
US9275637B1