Voice wake-up method, device, electronic device and readable storage medium
By directly determining the phoneme sequence from the target speech signal and obtaining keywords, the problem of high training cost of CNN models in the prior art is solved, and low-cost keyword awakening is achieved.
Patent Information
- Application Number
- CN202211354111.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-28
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2042-10-28
AI Technical Summary
In the prior art, using CNN models to wake up keywords requires the acquisition of a large number of corpus for training, resulting in high implementation costs.
By determining the target phoneme sequence and directly obtaining the target keywords, avoiding the use of the CNN model for recognition, and directly obtaining keywords from the target speech signal.
It reduces the cost of realizing keyword awakening, reduces the need to collect a large amount of corpus for each keyword, and improves training efficiency.
Smart Images

Figure CN115910040B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of speech recognition, and particularly relates to a voice wake-up method, device, electronic device and readable storage medium. Background Art
[0002] Generally, in the related art, to achieve keyword wake-up, a CNN model is usually used for overall recognition and detection. Specifically, the device performs real-time recording, and the CPU first calculates the original audio data into a FBank or MFCC feature map, and then performs a fixed-length time slice of the feature map, such as 2s, and sends it to the keyword classification detection model to predict whether the current time slice is a keyword or background noise.
[0003] However, since a large amount of corpus needs to be collected and trained for each keyword before using the CNN model to obtain the CNN model, the time taken to obtain the CNN model is relatively long, and thus the cost of achieving keyword wake-up is relatively high. Summary of the Invention
[0004] The purpose of the embodiments of this application is to provide a voice wake-up method, device, electronic device and readable storage medium, which can solve the problem of reducing the cost of achieving keyword wake-up.
[0005] In a first aspect, the embodiments of this application provide a voice wake-up method, and the method includes: determining N target phoneme sequences according to the obtained target voice signal, where N is a positive integer; obtaining N target keywords according to the N target phoneme sequences to obtain a target keyword, the N target phoneme sequences and the N target keywords correspond one by one, and the target keyword includes the N target keywords; when the target keyword matches a preset keyword, performing a target operation corresponding to the preset keyword.
[0006] In a possible implementation manner, the obtaining N target keywords according to the N target phoneme sequences includes: calculating M first probability values of M first keywords for each of the M target phoneme sequences one by one, where the M target phoneme sequences are: the phoneme sequences in the N target phoneme sequences that match a preset phoneme sequence; the M first keywords and the M first probability values correspond one by one; determining N target probability values with the largest probability values from the M first probability values; and determining the first keywords corresponding to the N target probability values as the N target keywords.
[0007] In a possible implementation, calculating the M first probability values of the M first keywords for each of the M target phoneme sequences includes: creating M target token buckets according to the M target phoneme sequences; the M target phoneme sequences and the M target token buckets are in one-to-one correspondence; calculating for each of the M target token buckets to obtain the M first probability values.
[0008] In a possible implementation, calculating for each of the M target token buckets to obtain the M first probability values includes: directly storing a first token bucket into a new token bucket, where the first token bucket is the token bucket of the path that decodes the entire audio sequence among the M target token buckets; performing a first operation on a second token bucket to merge it into the new token bucket; performing a pruning operation using the new token bucket to obtain the M first probability values.
[0009] In a possible implementation, the first operation includes any one of the following: storing the token buckets of the same phoneme sequence into the new token bucket; storing the token buckets of the blank merge path into the new token bucket; storing the token buckets of the near-phoneme word path into the new token bucket.
[0010] In a second aspect, an embodiment of the present application provides a voice wake-up device, which includes: a determination module, a processing module, and an execution module; the determination module is configured to determine N target phoneme sequences according to the acquired target voice signal, where N is a positive integer; the processing module is configured to obtain N target keywords according to the N target phoneme sequences determined by the determination module to obtain a target keyword, the N target phoneme sequences and the N target keywords are in one-to-one correspondence, and the target keyword includes the N target keywords; the execution module is configured to execute a target operation corresponding to the preset keyword when the target keyword obtained by processing by the processing module matches the preset keyword.
[0011] In a possible implementation, the processing module is specifically configured to calculate the M first probability values of the M first keywords for each of the M target phoneme sequences, where the M target phoneme sequences are: the phoneme sequences in the N target phoneme sequences that match a preset phoneme sequence; the M first keywords and the M first probability values are in one-to-one correspondence; and determining N target probability values with the largest probability values from the M first probability values; and determining the first keywords corresponding to the N target probability values as the N target keywords.
[0012] In a possible implementation manner, the processing module is specifically configured to create M target token buckets according to the M target phoneme sequences; the M target phoneme sequences and the M target token buckets are in one-to-one correspondence; and calculate the M first probability values by calculating each of the M target token buckets one by one.
[0013] In a possible implementation manner, the processing module is specifically configured to directly store a first token bucket into a new token bucket, where the first token bucket is the token bucket of the path that decodes the entire audio sequence among the M target token buckets; and perform a first operation on a second token bucket to merge it into the new token bucket; and perform a pruning operation using the new token bucket to obtain the M first probability values.
[0014] In a possible implementation manner, the first operation includes any one of the following: storing the token buckets of the same phoneme sequence into the new token bucket; storing the token buckets of the blank merge path into the new token bucket; storing the token buckets of the near-phoneme word path into the new token bucket.
[0015] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory. The memory stores a program or instruction that can run on the processor, and when the program or instruction is executed by the processor, the steps of the method described in the first aspect are implemented.
[0016] In a fourth aspect, an embodiment of the present application provides a readable storage medium, where a program or instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0017] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0018] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium, and the program product is executed by at least one processor to implement the method described in the first aspect.
[0019] In an embodiment of the present application, an electronic device may determine N target phoneme sequences according to the acquired target voice signal, where N is a positive integer; obtain N target keywords according to the N target phoneme sequences to obtain a target keyword. The N target phoneme sequences and the N target keywords correspond one by one, and the target keyword includes the N target keywords; when the target keyword matches the preset keyword, perform a target operation corresponding to the preset keyword. Since the electronic device can directly determine the N target phoneme sequences according to the target voice signal and directly obtain the target keyword according to the N target phoneme sequences, without using a CNN model to recognize the target voice signal to obtain the target keyword, therefore, there is no need to spend time collecting a large amount of corpus for training for each keyword to obtain the CNN model. Therefore, the cost of implementing keyword wake-up can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is one of the flow diagrams of the voice wake-up method provided by an embodiment of the present application;
[0021] Figure 2 is another flow diagram of the voice wake-up method provided by an embodiment of the present application;
[0022] Figure 3 is the structural diagram of the voice wake-up device provided by an embodiment of the present application;
[0023] Figure 4 is the structural diagram of the electronic device provided by an embodiment of the present application;
[0024] Figure 5 is the hardware structural diagram of the electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0025] The following will clearly describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application belong to the scope of protection of the present application.
[0026] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.
[0027] The following, in conjunction with the accompanying drawings, describes in detail the voice wake-up method, device, electronic device, and readable storage medium provided in the embodiments of the present application through specific embodiments and their application scenarios.
[0028] Currently, keyword-based wake-up technology is one of the most widely used technologies in voice recognition. It's commonly used in smart speakers and smart voice assistants as a precursor to intelligent voice interaction. It can also be implemented as a voice remote control, allowing users to simply control various smart home appliances using voice keywords. As a leading technology for intelligent voice interaction, keyword-based wake-up prevents users' daily conversations from being uploaded to the cloud for interpretation, which would waste cloud computing power and leak user privacy. Smart speakers normally only listen for keywords. Upon detecting a preset keyword, they enter a wake-up state and provide voice feedback, such as "I'm here," prompting the user to speak the desired voice content. The user's voice content is then uploaded to the cloud server for recognition and semantic understanding, and the required response is returned for interaction. When used as a voice remote control, it is generally used for simple voice interaction with smart home appliances. Semantic understanding is not supported, and control is limited to specified keywords. This scenario requires low cost, low computing power, low memory consumption, low latency, low false alarm rate, high sensitivity, and high noise tolerance to achieve a good voice interaction experience. Keyword wake-up algorithms were previously commonly implemented using general-purpose microcontrollers running specially optimized speech processing algorithms, such as DTW and RNN. In recent years, specialized speech chips based on CNN acceleration have also emerged. Regardless of the scenario, the required voice keywords require manufacturers to collect large speech datasets for training, such as collecting the pronunciation of "Tmall Genie" from thousands of users, and then training a deep learning model to obtain a usable voice wake-up model. This makes it difficult for third-party manufacturers to use their own keywords, or they must pay algorithm manufacturers to customize keywords, which increases R&D costs and timelines, hindering the rapid launch of products.
[0029] However, in the embodiments of the present application, the electronic device can determine N target phoneme sequences according to the acquired target voice signal, where N is a positive integer; obtain N target keywords according to the N target phoneme sequences to obtain a target keyword, and the N target phoneme sequences and the N target keywords correspond one by one, and the target keyword includes the N target keywords; when the target keyword matches the preset keyword, perform the target operation corresponding to the preset keyword. Since the electronic device can directly determine N target phoneme sequences according to the target voice signal and directly obtain the target keyword according to the N target phoneme sequences, without using a CNN model to identify the target voice signal to obtain the target keyword, therefore, there is no need to spend time collecting a large amount of corpus for training for each keyword to obtain the CNN model, so the cost of realizing keyword wake-up can be reduced.
[0030] Figure 1 FIG. shows a flowchart of a voice wake-up method provided by an embodiment of the present application. As Figure 1 shown, the voice wake-up method provided by the embodiment of the present application may include the following steps 101 to 103.
[0031] Step 101: The electronic device determines N target phoneme sequences according to the acquired target voice signal.
[0032] In the embodiments of the present application, N is a positive integer.
[0033] Step 102: The electronic device obtains N target keywords according to the N target phoneme sequences to obtain a target keyword.
[0034] In the embodiments of the present application, the N target phoneme sequences and the N target keywords correspond one by one, and the target keyword includes the N target keywords.
[0035] Optionally, in the embodiments of the present application, when the electronic device is in the powered-on state, the electronic device can receive the target voice signal input by the user and determine N target phoneme sequences.
[0036] Optionally, in the embodiments of the present application, the target phoneme sequence may specifically be a pinyin sequence.
[0037] Optionally, in the embodiments of the present application, the electronic device can input the target voice signal into a phoneme-based streaming speech recognition acoustic model to obtain N target phoneme sequences, and then input the N target phoneme sequences into a keyword decoder to obtain N target keywords.
[0038] Among them, the electronic device can first initialize the acoustic model, the keyword decoder, and the registered near-sound dictionary.
[0039] Specifically, for initializing the acoustic model, taking Chinese keyword recognition as an example, the acoustic model uses a 1.536s input window and a 0.768s sliding step. Each time the window slides, it outputs 12 grids × the top 5 predicted pinyin results.
[0040] Specifically, for initializing the keyword decoder, initialize the input parameters: a list of keyword strings, a list of probability thresholds, the number of keywords, and whether to enable automatic homophonic words. Initialize the historical pinyin list, that is, the 24 grids × the top 5 predicted pinyin results within the past 1.536s.
[0041] Specifically, for registering the homophonic dictionary, such as the keyword "Tmall Genie", we can register it using "tian1mao1 jing1 ling2", or: "tian1 mao1 jin1 ling2", "tian1 mao1 jing1 lin2", etc. with easily mispronounced front and back nasals, and set the recognition threshold for each keyword to facilitate adjusting the sensitivity.
[0042] Optionally, in the embodiments of the present application, after determining N target phoneme sequences, the electronic device can push a frame of recognition result newly recognized by the acoustic model (i.e., N target phoneme sequences) into the historical pinyin list, so as to calculate N target keywords.
[0043] Step 103, when the target keyword matches the preset keyword, the electronic device performs a target operation corresponding to the preset keyword.
[0044] For the voice wake-up method provided in the embodiments of the present application, the electronic device can determine N target phoneme sequences according to the acquired target voice signal, where N is a positive integer; according to the N target phoneme sequences, obtain N target keywords to obtain the target keyword, and the N target phoneme sequences and the N target keywords correspond one by one, and the target keyword includes the N target keywords; when the target keyword matches the preset keyword, perform the target operation corresponding to the preset keyword. Since the electronic device can directly determine N target phoneme sequences according to the target voice signal, and directly obtain the target keyword according to the N target phoneme sequences, without using a CNN model to recognize the target voice signal to obtain the target keyword, therefore, there is no need to spend time collecting a large amount of corpus for training for each keyword to obtain the CNN model, so the cost of implementing keyword wake-up can be reduced.
[0045] Optionally, in the embodiments of the present application, in combination with Figure 1 , as Figure 2 shown, the above step 102 can be specifically implemented by the following steps 102a to 102c.
[0046] Step 102a: The electronic device calculates each of the M target phoneme sequences to obtain M first probability values of M first keywords.
[0047] In the embodiments of the present application, the M target phoneme sequences are: among the N target phoneme sequences, the phoneme sequences that match the preset phoneme sequence; the M first keywords and the M first probability values correspond one by one.
[0048] Optionally, in the embodiments of the present application, the above step 102a may be specifically implemented by the following steps 102a1 and 102a2.
[0049] Step 102a1: The electronic device creates M target token buckets according to the M target phoneme sequences.
[0050] In the embodiments of the present application, the M target phoneme sequences and the M target token buckets correspond one by one.
[0051] It can be understood that the electronic device can calculate frame by frame for the input historical pinyin prediction record to obtain M first probability values.
[0052] Specifically, denote the token bucket at the current moment as toks, and the token bucket at the new moment as new_toks
[0053] The tok structure is:
[0054]
[0055] The electronic device can initialize the starting tok as all blank toks and store them in the toks token bucket.
[0056] Step 102a2: The electronic device calculates each of the M target token buckets to obtain M first probability values.
[0057] It can be understood that the electronic device can calculate each token tok for the token bucket toks at the current moment.
[0058] Optionally, in the embodiments of the present application, the above step 102a2 may be specifically implemented by the following steps 102a2a to 102a2c.
[0059] Step 102a2a: The electronic device directly stores the first token bucket into a new token bucket.
[0060] In the embodiments of the present application, the first token bucket is the token bucket of the path that decodes the entire audio sequence among the M target token buckets.
[0061] It can be understood that the electronic device can directly archive the tok that has decoded the entire keyword pinyin path to new_toks.
[0062] Step 102a2b: The electronic device performs a first operation on the second token bucket to merge it into a new token bucket.
[0063] Optionally, in the embodiments of the present application, the first operation includes any one of the following:
[0064] Storing the token buckets with the same phoneme sequence into the new token bucket;
[0065] Storing the token buckets with blank merge paths into the new token bucket;
[0066] Storing the token buckets with near - homophone paths into the new token bucket.
[0067] Specifically, if the prediction result at the current moment is the same as the previous predicted pinyin of tok, calculate the probability sum and multiply the p of the current tok by this probability; if the previous pinyin result does not exist in the prediction result, default it to the probability of BG_P(1e - 6); push the path tok{toks[i].cur_idx,p,toks[i].first_t,0} into new_toks.
[0068] Specifically, if the prediction result at the current moment is blank, calculate the blank probability and multiply the p of the current tok by this probability; if the prediction result does not contain blank, default it to the probability of BG_P(1e - 6); push the path tok{toks[i].cur_idx,p,toks[i].first_t,blank_flag} into new_toks.
[0069] Optionally, in the embodiments of the present application, the electronic device can also remove all - blank toks.
[0070] Specifically, for all toks in new_toks, remove the toks with the blank_flag set, that is, all - blank toks.
[0071] Step 102a2c: The electronic device performs a pruning operation using the new token bucket to obtain M first probability values.
[0072] Specifically, for all toks in new_toks, sort them in descending order of probability; clear the original toks token bucket, store the first TOK_N toks of new_toks into toks, and record the number of toks whose prediction results reach the number of pinyins.
[0073] Optionally, in the embodiments of the present application, the electronic device can also add back an all - blank tok to toks and then calculate M first probability values.
[0074] Optionally, in the embodiments of the present application, the electronic device may calculate the sum of probabilities for all toks in toks that contain the entire pinyin of the keyword, and sum them separately for keywords with different starting offsets; if the first_t of the current tok is recorded in the first_t container, then add the probability of the current tok to the probability of the first_t; otherwise, create a new item in the first_t container and record the result of the current tok to obtain M first probability values.
[0075] Step 102b, the electronic device determines N target probability values with the largest probability values from the M first probability values.
[0076] Step 102c, the electronic device determines the first keywords corresponding to the N target probability values as N target keywords.
[0077] Specifically, if there is a value in the container of the final sum of probabilities, return the maximum probability value and its start timestamp; otherwise, return a probability of 0; through the above process, the occurrence probability of keywords within a historical window can be calculated, and the occurrence time can be obtained to prevent repeated recognition.
[0078] In the embodiments of the present application, a phoneme-based streaming speech recognition acoustic model is used at the front end, and a keyword decoder using a token bucket-based pruning method is used at the back end. Taking Chinese keyword wake-up as an example, a streaming acoustic model with 1250 tone-containing pinyins as phoneme labels is used. The real-time audio stream passes through the streaming acoustic model and outputs a phoneme (pinyin) sequence. Inputting this sequence into the keyword decoder generated based on the current keyword list can output the final keyword result.
[0079] The execution subject of the voice wake-up method provided by the embodiments of the present application may be a voice wake-up device. In the embodiments of the present application, taking the voice wake-up device executing the voice wake-up method as an example, the voice wake-up device provided by the embodiments of the present application is described.
[0080] Figure 3 Shows a voice wake-up device provided by an embodiment of the present application. As Figure 3 shown, the voice wake-up device 50 includes: a determination module 51, a processing module 52, and an execution module 53. The determination module 51 is configured to determine N target phoneme sequences according to the acquired target voice signal, where N is a positive integer; the processing module 52 is configured to obtain N target keywords according to the N target phoneme sequences determined by the determination module 51 to obtain a target keyword, the N target phoneme sequences and the N target keywords correspond one by one, and the target keyword includes the N target keywords; the execution module 53 is configured to execute a target operation corresponding to the preset keyword when the target keyword processed by the processing module 52 matches the preset keyword.
[0081] In a possible implementation, the processing module 52 is specifically configured to calculate the M first probability values of the M first keywords one by one for the M target phoneme sequences. The M target phoneme sequences are the phoneme sequences in the N target phoneme sequences that match a preset phoneme sequence; the M first keywords and the M first probability values correspond one by one; and N target probability values with the largest probability values are determined from the M first probability values; and the first keywords corresponding to the N target probability values are determined as the N target keywords.
[0082] In a possible implementation, the processing module 52 is specifically configured to create M target token buckets according to the M target phoneme sequences; the M target phoneme sequences and the M target token buckets correspond one by one; and the M target token buckets are calculated one by one to obtain the M first probability values.
[0083] In a possible implementation, the processing module 52 is specifically configured to directly store the first token bucket into a new token bucket, where the first token bucket is the token bucket of the path that decodes the entire audio sequence among the M target token buckets; and perform a first operation on the second token bucket to merge it into the new token bucket; and perform a pruning operation using the new token bucket to obtain the M first probability values.
[0084] In a possible implementation, the first operation includes any one of the following: storing the token bucket of the same phoneme sequence into the new token bucket; storing the token bucket of the blank merge path into the new token bucket; storing the token bucket of the near-homophone word path into the new token bucket.
[0085] The voice wake-up device provided by the embodiment of the present application can directly determine N target phoneme sequences according to the target voice signal, and directly obtain the target keywords according to the N target phoneme sequences, without using a CNN model to identify the target voice signal to obtain the target keywords. Therefore, there is no need to spend time collecting a large amount of corpus for training for each keyword to obtain the CNN model. Therefore, the cost of implementing keyword wake-up can be reduced.
[0086] The voice wake-up device in the embodiments of the present application can be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices other than terminals. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a handheld computer, an in-vehicle electronic device, a mobile internet device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. It can also be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc. The embodiments of the present application do not make specific limitations.
[0087] The voice wake-up device in the embodiments of the present application can be a device with an operating system. The operating system can be an Android operating system, an iOS operating system, or other possible operating systems. The embodiments of the present application do not make specific limitations.
[0088] The voice wake-up device provided by the embodiments of the present application can implement Figure 1 and Figure 2 each process implemented by the method embodiments. To avoid repetition, it will not be elaborated here.
[0089] Optionally, as Figure 4 shown, the embodiments of the present application further provide an electronic device 60, including a processor 61 and a memory 62. A program or instruction that can run on the processor 61 is stored on the memory 62. When the program or instruction is executed by the processor 61, it implements each process step of the above voice wake-up method embodiment and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.
[0090] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0091] Figure 5 Schematic diagram of the hardware structure of an electronic device for implementing the embodiments of the present application.
[0092] The electronic device 100 includes, but is not limited to, components such as a radio frequency unit 101, a network module 102, an audio output unit 103, an input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, and a processor 110, etc.
[0093] Those skilled in the art can understand that the electronic device 100 may further include a power supply (such as a battery) for powering each component. The power supply can be logically connected to the processor 110 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system. x The structure of the electronic device shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than those shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0094] Among them, the processor 110 is configured to determine N target phoneme sequences according to the acquired target voice signal, where N is a positive integer; obtain N target keywords according to the N target phoneme sequences to obtain a target keyword, the N target phoneme sequences and the N target keywords correspond one by one, and the target keyword includes the N target keywords; when the target keyword matches a preset keyword, perform a target operation corresponding to the preset keyword.
[0095] In the electronic device provided by the embodiments of the present application, since the electronic device can directly determine N target phoneme sequences according to the target voice signal, and directly obtain the target keyword according to the N target phoneme sequences, without using a CNN model to identify the target voice signal to obtain the target keyword, therefore, there is no need to spend time collecting a large amount of corpus for training for each keyword to obtain the CNN model. Therefore, the cost of implementing keyword wake-up can be reduced.
[0096] Optionally, in the embodiments of the present application, the processor 110 is configured to calculate M first probability values of M first keywords for each of the M target phoneme sequences. The M target phoneme sequences are: the phoneme sequences in the N target phoneme sequences that match a preset phoneme sequence; the M first keywords and the M first probability values correspond one by one; determine N target probability values with the largest probability values from the M first probability values; and determine the first keywords corresponding to the N target probability values as the N target keywords.
[0097] Optionally, in the embodiments of the present application, the processor 110 creates M target token buckets according to the M target phoneme sequences; the M target phoneme sequences and the M target token buckets correspond one by one; and calculates the M first probability values for each of the M target token buckets one by one.
[0098] Optionally, in the embodiments of the present application, the processor 110 directly stores the first token bucket into a new token bucket, where the first token bucket is the token bucket of the path that decodes the entire audio sequence among the M target token buckets; performs a first operation on the second token bucket to merge it into the new token bucket; and performs a pruning operation using the new token bucket to obtain the M first probability values.
[0099] It should be understood that, in the embodiments of the present application, the input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042. The graphics processing unit 1041 processes the image data of static pictures or videos obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 107 includes at least one of a touch panel 1071 and other input devices 1072. The touch panel 1071 is also referred to as a touch screen. The touch panel 1071 may include two parts: a touch detection device and a touch controller. The other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be elaborated here.
[0100] The memory 109 can be used to store software programs and various types of data. The memory 109 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data. Among them, the first storage area may store an operating system, application programs or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 109 may include a volatile memory or a non-volatile memory, or the memory 109 may include both a volatile memory and a non-volatile memory. Among them, the non-volatile memory may be 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 be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synch link dynamic random access memory (SLDRAM), and a direct rambus random access memory (DRRAM). The memory 109 in the embodiments of the present application includes, but is not limited to, these and any other suitable types of memories.
[0101] The processor 110 may include one or more processing units; optionally, the processor 110 integrates an application processor and a modem processor. Among them, the application processor mainly processes operations related to the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor may not be integrated into the processor 110 either.
[0102] The embodiments of the present application also provide a readable storage medium, on which a program or instructions are stored. When the program or instructions are executed by a processor, each process of the above-mentioned voice wake-up method embodiments is implemented, and the same technical effects can be achieved. To avoid repetition, it will not be elaborated here.
[0103] Among them, the processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes computer-readable storage media such as computer read-only memory ROM, random access memory RAM, magnetic disks, or optical discs.
[0104] Another embodiment of the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement each process of the above embodiment of the voice wake-up method and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.
[0105] It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, system chip, chip system, or system-on-chip.
[0106] The embodiments of the present application provide a computer program product. The program product is stored in a storage medium and is executed by at least one processor to implement each process of the above embodiment of the voice wake-up method and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.
[0107] It should be noted that in this article, the term "including", "comprising", or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article, or device including a series of elements not only includes those elements but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article, or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article, or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the reverse order according to the functions involved. For example, the described method may be executed in an order different from that described, and various steps may be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0108] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described example methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present application, in essence or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to enable a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present application.
[0109] The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above specific implementation manners. The above specific implementation manners are merely illustrative rather than restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the purpose of the present application and the scope protected by the claims, and all of them fall within the protection scope of the present application.
Claims
1. A voice wake-up method, applied to an electronic device, characterized in that, The method includes: Determining N target phoneme sequences according to the acquired target voice signal, where N is a positive integer; Obtaining N target keywords based on the N target phoneme sequences to obtain a target keyword, where the N target phoneme sequences and the N target keywords are in one-to-one correspondence, and the target keyword includes the N target keywords; Performing a target operation corresponding to the preset keyword when the target keyword matches the preset keyword; Wherein, obtaining N target keywords based on the N target phoneme sequences includes: Calculating M first probability values of M first keywords for each of the M target phoneme sequences. The M target phoneme sequences are the phoneme sequences in the N target phoneme sequences that match a preset phoneme sequence; the M first keywords and the M first probability values are in one-to-one correspondence; Determining N target probability values with the largest probability values from the M first probability values; Determining the first keywords corresponding to the N target probability values as the N target keywords; Wherein, calculating M first probability values of M first keywords for each of the M target phoneme sequences includes: Creating M target token buckets according to the M target phoneme sequences; the M target phoneme sequences and the M target token buckets are in one-to-one correspondence; Calculating the M first probability values for each of the M target token buckets; Wherein, calculating the M first probability values for each of the M target token buckets includes: Directly storing a first token bucket into a new token bucket, where the first token bucket is the token bucket of the path that decodes the entire audio sequence among the M target token buckets; Performing a first operation on a second token bucket to merge it into the new token bucket; Performing a pruning operation using the new token bucket to obtain the M first probability values.
2. The method according to claim 1, wherein The first operation includes any one of the following: Storing the token buckets of the same phoneme sequence into the new token bucket; Storing the token buckets of the blank merge path into the new token bucket; Storing the token buckets of the near-sound word path into the new token bucket.
3. A voice wake-up device, characterized in that, The voice wake-up device includes: a determination module, a processing module, and an execution module; The determination module is configured to determine N target phoneme sequences according to the acquired target voice signal, where N is a positive integer; The processing module is configured to obtain N target keywords based on the N target phoneme sequences determined by the determination module to obtain a target keyword, where the N target phoneme sequences and the N target keywords are in one-to-one correspondence, and the target keyword includes the N target keywords; The execution module is configured to perform a target operation corresponding to the preset keyword when the target keyword processed by the processing module matches the preset keyword; The processing module is specifically configured to calculate the M first probability values of the M first keywords one by one for the M target phoneme sequences. The M target phoneme sequences are the phoneme sequences in the N target phoneme sequences that match a preset phoneme sequence; the M first keywords and the M first probability values correspond one by one; and N target probability values with the largest probability values are determined from the M first probability values; and the first keywords corresponding to the N target probability values are determined as the N target keywords. The processing module is specifically configured to create M target token buckets according to the M target phoneme sequences; the M target phoneme sequences and the M target token buckets correspond one by one; and calculate the M first probability values by calculating the M target token buckets one by one. The processing module is specifically configured to directly store the first token bucket into a new token bucket, where the first token bucket is the token bucket of the path that decodes the entire audio sequence among the M target token buckets; and perform a first operation on the second token bucket to merge it into the new token bucket; and perform a pruning operation using the new token bucket to obtain the M first probability values.
4. The voice wake-up device according to claim 3, wherein The first operation includes any one of the following: Store the token buckets of the same phoneme sequence into the new token bucket; Store the token buckets of the blank merge path into the new token bucket; Store the token buckets of the near-sound word path into the new token bucket.
5. An electronic device, characterized in that, It includes a processor and a memory. The memory stores programs or instructions that can run on the processor. When the programs or instructions are executed by the processor, the steps of the voice wake-up method described in any one of claims 1 to 2 are implemented.
6. A readable storage medium, characterized in that, Programs or instructions are stored on the readable storage medium. When the programs or instructions are executed by the processor, the steps of the voice wake-up method described in any one of claims 1 to 2 are implemented.
Citation Information
Patent Citations
Voice keyword detection method, device and system based on neural network
CN110992929A
Keyword voice wake-up method for ceiling lamp
CN113012698A