Equipment control method and device, storage medium and equipment
By directly judging the voiceprint type of speech data in electronic devices using voiceprint models and classification models, the problem of inefficient speech data judgment in the prior art is solved, and the accuracy and control efficiency of speech recognition are improved.
Patent Information
- Application Number
- CN202510039881.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-04-04
AI Technical Summary
When existing electronic devices determine whether voice data belongs to children, they are inefficient, and they need to use statistical information of acoustic parameters or matching of voiceprint vectors, resulting in a decrease in control efficiency.
The voiceprint vector is extracted from the voiceprint data through the voiceprint model, and the classification model is used to classify the voiceprint vectors to directly judge the voiceprint type of the voiceprint data, without obtaining the acoustic parameters of each age group or registering the voiceprint vector in advance for matching.
The accuracy of speech recognition and the control efficiency of electronic devices are improved, and the cumbersome matching process of acoustic parameters and voiceprint vectors are avoided.
Smart Images

Figure CN119763576A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic equipment, and more specifically, to a device control method, apparatus, storage medium and device in the field of electronic equipment. Background Art
[0002] With the development of technology, more and more electronic devices can be controlled by users through voice. In order to prevent children from accidentally triggering the control instructions of electronic devices, electronic devices need to determine whether the acquired voice data belongs to children, and then determine whether to execute the instructions corresponding to the voice data. Existing electronic devices determine the age group to which the voice data belongs through the statistical information of acoustic parameters, or match the voiceprint vector of the voice data with the voiceprint vectors of each age group registered in advance to determine whether the voice data belongs to a child, which reduces the control efficiency of electronic devices. Summary of the invention
[0003] The present application provides a device control method, apparatus, storage medium and equipment. The method can obtain voiceprint vectors in voice data through a voiceprint model, and then directly classify the voiceprint vectors through a classification model. There is no need to obtain acoustic parameters of each age group, and there is no need to register voiceprint vectors of various population types in advance for matching, thereby improving the accuracy of voice recognition and the control efficiency of electronic equipment.
[0004] In a first aspect, a device control method is provided, the method comprising: obtaining target voice data, extracting target voice features from the target voice data; inputting the target voice features into a voiceprint model, and extracting a target voiceprint vector from the target voice features based on the voiceprint model; inputting the target voiceprint vector into a classification model, and obtaining a target voiceprint type of the target voiceprint vector based on the classification model; and controlling the electronic device based on the target voiceprint type and the target voice data.
[0005] Through the above technical solution, voice features are extracted from the acquired voice data, voiceprint vectors are extracted from the voice features through the voiceprint model, and then the voiceprint vectors are classified through the classification model. There is no need to obtain the acoustic parameters of each age group, nor is there a need to register the voiceprint vectors of each group of people in advance for matching, which improves the accuracy of voice recognition and the control efficiency of electronic equipment.
[0006] In a second aspect, a device control apparatus is provided, the device comprising:
[0007] A speech feature extraction unit, used to obtain target speech data and extract target speech features from the target speech data;
[0008] A voiceprint vector extraction unit, used for inputting the target speech feature into the voiceprint model, and extracting the target voiceprint vector from the target speech feature based on the voiceprint model;
[0009] A voiceprint type acquisition unit, used to input the target voiceprint vector into the classification model, and acquire the target voiceprint type of the target voiceprint vector based on the classification model;
[0010] The device control unit is used to control the electronic device based on the target voiceprint type and the target voice data.
[0011] In a third aspect, an electronic device is provided, the electronic device comprising: a memory for storing executable program code;
[0012] A processor is used to call and run executable program code from a memory to execute the method in the above-mentioned first aspect or any possible implementation manner of the first aspect.
[0013] In a fourth aspect, a computer program product is provided, comprising: a computer program code, which, when executed on a computer, enables the computer to execute the method in the first aspect or any possible implementation of the first aspect.
[0014] In a fifth aspect, a computer-readable storage medium is provided, which stores a computer program code. When the computer program code runs on a computer, the computer executes the method in the above-mentioned first aspect or any possible implementation manner of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a scene schematic diagram of a device control method provided in an embodiment of the present application;
[0016] Figure 2 It is a flow chart of a device control method provided in an embodiment of the present application;
[0017] Figure 3 It is a flow chart of a device control method provided in an embodiment of the present application;
[0018] Figure 4 It is a flow chart of a device control method provided in an embodiment of the present application;
[0019] Figure 5 It is a structural schematic diagram of a device control device provided in an embodiment of the present application;
[0020] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0021] The technical solution in the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0022] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.
[0023] See also Figure 1 , Figure 1 Schematic diagram of a device control method provided in an embodiment of the present application. Figure 1 As shown, the device control method provided in the embodiment of the present application can be applied to the control scenario of electronic equipment. Electronic devices include but are not limited to mobile phones, personal computers, laptops, smart furniture, vehicle-mounted devices, wearable devices and other terminal devices that can be controlled by voice. Taking the sweeper in smart furniture as an example, the sweeper obtains the user's voice data through the built-in microphone (Microphone, MIC), identifies the control instructions corresponding to the voice data, and then executes the operation corresponding to the control instructions. However, if the sweeper is set with a child lock function, it is necessary to identify whether the voice data belongs to a child or an adult.
[0024] Based on the above problems, an embodiment of the present application provides a device control method. After the electronic device obtains the user's voice data, it extracts voice features from the voice data, inputs the voice features into the voiceprint model, and extracts voiceprint vectors from the voice features through the voiceprint model. The voiceprint vectors are then input into the classification model, the voiceprint vectors are classified through the classification model, the voiceprint type of the voiceprint vectors is obtained, and the electronic device is controlled based on the voiceprint type and the target voice data. The embodiment of the present application does not need to obtain the acoustic parameters of each age group, nor does it need to register the voiceprint vectors of each type of people in advance for matching, which improves the accuracy of voice recognition and the control efficiency of electronic devices.
[0025] based on Figure 1 The scene diagram shown below will be combined with Figure 2-Figure 4 , the device control method provided in the embodiment of the present application is introduced in detail.
[0026] See also Figure 2 , Figure 2is a flow chart of a device control method provided in an embodiment of the present application. Figure 2 As shown, the method of the embodiment of the present application may include the following steps S101-S104.
[0027] S101, acquiring target speech data, and extracting target speech features from the target speech data;
[0028] Specifically, the electronic device obtains the target voice data of the current user through the built-in MIC, and then extracts the target voice features from the target voice data. Among them, voice features can be used in multiple fields such as voice recognition, audio classification and voiceprint classification. The target voice features include but are not limited to Mel-Frequency Cepstral Coefficients (MFCC), Mel-scale Filter Bank Coefficients (FBank) and Linear Predictive Coding (LPC) and other features. MFCC simulates the sensitivity of the human ear's auditory system to different frequencies, represents the audio signal on the Mel frequency scale, and calculates the cepstral coefficients of the spectrum, thereby capturing the spectrum envelope of the audio signal. The Mel frequency scale is a nonlinear frequency scale used to simulate the human ear's perception of sounds of different frequencies, that is, the human ear is more sensitive to low-frequency sounds than high-frequency sounds. FBank is the output value of a group of filter groups designed based on the Mel frequency scale. By designing a series of filters evenly distributed on the Mel frequency scale, the energy distribution of the audio signal in different frequency bands can be captured, thereby extracting useful audio features. LPC estimates the spectral envelope and formant frequency of speech signals by performing linear prediction modeling on speech signals, thereby achieving effective compression and representation of speech signals.
[0029] S102, inputting the target speech feature into the voiceprint model, and extracting the target voiceprint vector from the target speech feature based on the voiceprint model;
[0030] Specifically, after obtaining the target speech features, the target speech features are input into the voiceprint model, and the target voiceprint vector is extracted from the target speech features based on the voiceprint model. The voiceprint model is a deep learning-based model that is pre-trained using a large amount of sample speech data, such as the Res2idual Networks with Multi-scale Residual Blocks (Res2Net), the Emphasized Channel Attention, Propagation and Aggregation in Time Delay Neural Network Based Speaker Verification (ECAPA-TDNN), and the Context-Aware Masking in Dense TDNN for Speaker Verification (CAM++). The Res2Net model, the ECAPA-TDNN model, and the CAM++ model are all advanced models in the field of voiceprint recognition. This type of voiceprint model uses multi-level fusion technology to extract the complete voiceprint features of the target voice features, and extracts a voiceprint vector from the entire sentence of target voice data, which can make full use of the entire voice data information. The voiceprint feature dimension of the voiceprint vector extracted by the voiceprint model used in the embodiment of the present application is only 128 to 256, which greatly reduces the computational complexity and improves the extraction efficiency of the voiceprint vector. The voiceprint vector is a format converted from voice features that can be processed by machine learning algorithms. The lower the latitude of the voiceprint vector, the lower the computational complexity.
[0031] S103, inputting the target voiceprint vector into a classification model, and obtaining a target voiceprint type of the target voiceprint vector based on the classification model;
[0032] Specifically, the extracted target voiceprint vector is input into the classification model, and the target voiceprint type of the target voiceprint vector is obtained based on the classification model. The classification model predicts the category to which the new data belongs by learning the labeled data. The classification model provided in the embodiment of the present application includes but is not limited to the time delay neural network model (TDNN), the convolutional neural network model (CNN), the feedforward sequential memory neural network model (FSMN), the gated recurrent model (GRU) and the temporal convolutional network model (TCN).
[0033] S104, controlling the electronic device based on the target voiceprint type and the target voice data.
[0034] Specifically, after obtaining the target voiceprint type, the target voiceprint type can be compared with the target population type corresponding to the locking function of the electronic device, so as to control the electronic device based on the target voiceprint type and the target voice data. The locking function of the electronic device is a function set to restrict a certain type of people. If the target voiceprint type is the target population type corresponding to the locking function of the electronic device, the electronic device can be controlled based on the current functional state of the locking function and the target voice data; if the target voiceprint type is different from the target population type corresponding to the locking function of the electronic device, the electronic device can be controlled to execute the target instruction corresponding to the target voice data.
[0035] In an embodiment of the present application, after obtaining the user's voice data, the electronic device extracts voice features from the voice data, inputs the voice features into the voiceprint model, and extracts voiceprint vectors from the voice features through the voiceprint model. The voiceprint vectors are then input into the classification model, the voiceprint vectors are classified through the classification model, the voiceprint type of the voiceprint vectors is obtained, and the electronic device is controlled based on the voiceprint type and the target voice data. In the embodiment of the present application, there is no need to obtain acoustic parameters for each age group, nor is there any need to register voiceprint vectors of each type of population in advance for matching, which improves the accuracy of voice recognition and the control efficiency of electronic devices.
[0036] See also Figure 3 , Figure 3 is a flow chart of a device control method provided in an embodiment of the present application. Figure 3 As shown, the method of the embodiment of the present application may include the following steps S201-S209.
[0037] S201, obtaining sample speech data of each crowd type in a crowd type set;
[0038] Specifically, before recognizing voice data, the voiceprint model and classification model used to recognize voice data need to be trained. Before training, a crowd type set is determined according to the locking function of the electronic device, and the crowd type set includes at least two crowd types, and a large amount of sample voice data of each crowd type in the crowd type set is obtained. If the electronic device has only one locking function, and the locking function corresponds to one crowd type, then there are two crowd types in the crowd type set, wherein one crowd type is the first target crowd type corresponding to the locking function, and the other crowd type is other crowd types except the first target crowd type. If the electronic device has two locking functions, the two locking functions are the first locking function and the second locking function, wherein the first locking function corresponds to the second target crowd type, and the second locking function corresponds to the third target crowd type, then there are three crowd types in the crowd type set, wherein the first crowd type is the second target crowd type corresponding to the first locking function, the second crowd type is the third target crowd type corresponding to the second locking function, and the third crowd type is other crowd types except the second target crowd type and the third target crowd type.
[0039] The embodiment of the present application is applied to the control scenario of an electronic device. If the electronic device has only one locking function, and the locking function is a child lock function, sample voice data of two types of people are obtained, the first type of people is children, and the second type of people is adults. Child lock is a safety function in electronic devices, which is intended to limit children's access to electronic devices or certain functions in electronic devices to prevent potential dangers or improper use caused by children's curiosity and misoperation. It should be noted that the age boundary between children and adults can be set by the developer according to the type of electronic device. For example, if the electronic device is a smart furniture such as a sweeper, people under the age of 12 can be determined as children, and people aged 12 or above can be determined as adults; if the electronic device is a vehicle, people under the age of 16 can be determined as children, and people aged 16 or above can be determined as adults.
[0040] S202, performing speech enhancement on the sample speech data to obtain a sample speech data set, and training a voiceprint model and a classification model based on the sample speech data set;
[0041] Specifically, after obtaining the sample voice data, the sample voice data is preprocessed, and the preprocessing includes processing steps such as voice enhancement and endpoint detection. After preprocessing, a sample voice data set is obtained, and the voiceprint model and classification model are trained based on the sample voice data set. Among them, voice enhancement is to enhance at least one parameter of noise, reverberation, speech rate and spectrum in the voice data. Using voice-enhanced sample voice data to train the voiceprint model and classification model can improve the anti-interference performance and generalization performance of the model. Endpoint detection is used to determine the start time and end time of the voice data to intercept the effective voice part.
[0042] When training the voiceprint model, sample voice features are extracted from each sample voice data, and each sample voice feature is input into the voiceprint model to be trained to obtain a sample voiceprint vector corresponding to each sample voice data, and the sample voiceprint vector is evaluated to optimize the voiceprint model to be trained, and finally a trained voiceprint model is obtained. The voiceprint models provided in the embodiments of the present application are all advanced models in the field of voiceprint recognition, including but not limited to the Res2Net model, the ECAPA-TDNN model, and the CAM++ model.
[0043] When training the classification model, a sample voiceprint vector is obtained from the trained voiceprint model, and the sample voiceprint vector is input into the classification model to be trained to obtain the voiceprint type of each sample voiceprint vector output by the classification model to be trained. According to the comparison between the population type corresponding to the known sample voiceprint vector and the voiceprint type of the sample voiceprint vector output by the classification model, the classification model to be trained is optimized to obtain a trained classification model. The classification model provided in the embodiment of the present application includes but is not limited to a TDNN model, a CNN model, a FSMN model, a GRU model, and a TCN model. If the electronic device has only one locking function, and the locking function is a child lock function, a binary classification model is used, which is a classification model pre-trained based on a large amount of first sample voice data of the first population type and second sample voice data of the second population type. The voiceprint vector is input into the trained binary classification model, and the voiceprint type of the voiceprint vector is judged as the first population type or the second population type by the binary classification model.
[0044] S203, acquiring target speech data, and extracting target speech features from the target speech data;
[0045] Specifically, the electronic device obtains the target voice data of the current user through the built-in MIC, and then extracts the target voice features from the target voice data. Among them, the voice features can be used in multiple fields such as speech recognition, audio classification and voiceprint classification. The target voice features include but are not limited to MFCC, FBank and LPC features.
[0046] MFCC simulates the sensitivity of the human auditory system to different frequencies, represents the audio signal on the Mel frequency scale, and calculates the cepstral coefficients of the spectrum to capture the spectral envelope of the audio signal. The Mel frequency scale is a nonlinear frequency scale used to simulate the human ear's perception of sounds of different frequencies, that is, the human ear is more sensitive to low-frequency sounds than high-frequency sounds. When extracting MFCC features, the target speech data is first preprocessed, and the preprocessing includes pre-emphasis, framing, and windowing. Pre-emphasis is to emphasize the high-frequency part of the target speech data through a high-pass filter to remove the influence of lip radiation and increase the high-frequency resolution of the speech. This is usually achieved through a high-pass filter. Framing is the step of dividing the target speech data into multiple shorter frames so that the signal of the target speech data is assumed to be stable in a short period of time in subsequent processing. Windowing is to apply a window function to each frame to make the signal of the target speech data smoother and reduce spectral leakage. After preprocessing, each windowed frame is subjected to a Fast Fourier Transform (FFT) to convert the target speech data signal from the time domain to the frequency domain. The FFT result is then filtered using a Mel filter to simulate the sensitivity of the human ear to sounds of different frequencies. The energy value after filtering is taken logarithmically to further emphasize the difference in the low-frequency part. The result of the logarithmic operation is subjected to a Discrete Cosine Transform (DCT) to map the target speech data signal to a low-dimensional space, remove the correlation between the dimensional signals, and obtain the MFCC coefficients.
[0047] FBank is the output value of a set of filter banks designed based on the Mel frequency scale. By designing a series of filters evenly distributed on the Mel frequency scale, the energy distribution of audio signals in different frequency bands can be captured, thereby extracting useful audio features. When extracting FBank features, the target speech data is first preprocessed. Similar to the process of extracting MFCC, the preprocessing when extracting FBank also includes steps such as pre-emphasis, framing, and windowing. After preprocessing, for each frame of windowed signal, an N-point FFT transform is performed, also known as Short-Time Fourier Transform (STFT), where N is usually 256 or 512, and the energy distribution of the target speech data signal in the frequency domain is finally obtained. The result of STFT is then filtered using a Mel filter to obtain the FBank feature.
[0048] LPC estimates the spectral envelope and formant frequency of speech signals by linear prediction modeling of speech signals, thereby achieving effective compression and representation of speech signals. The extraction steps of LPC features are different from those of MFCC features and FBank features. First, the target speech data is preprocessed. The preprocessing not only includes pre-emphasis, framing and windowing steps, but also includes sampling and quantization steps before pre-emphasis. Sampling and quantization are sampling and quantization of the target speech data, converting the target speech data into digital signals. The sampling rate of the target speech data should meet the Nyquist sampling theorem to avoid information loss. After preprocessing, the target speech data is subjected to autocorrelation analysis, and the autocorrelation function of each frame of target speech data is calculated. The autocorrelation function is used to reflect the similarity between the speech data and itself under different time delays. Then, the coefficients of the linear prediction equation are solved by a recursive algorithm. The recursive algorithm gradually increases the prediction order by iteration until the required prediction order P is reached, and finally P LPC coefficients are obtained. The LPC coefficients are used to reflect the spectral characteristics of the speech signal.
[0049] S204, inputting the target speech feature into the voiceprint model, and extracting voiceprint feature information from the target speech feature;
[0050] Specifically, after acquiring the target speech features, the target speech features are input into the trained voiceprint model, and the voiceprint model extracts the voiceprint feature information from the target speech features. The specific process is to perform a convolution operation on the input target speech features through a sliding convolution kernel to extract local features, which are the voiceprint feature information. Optionally, in the field of voiceprint recognition, the convolution kernel can extract multiple features such as spectral features and time series features from the target speech features, and the extracted features are distinguished according to different voiceprint models. Parameters such as the size, step size, and padding of the convolution kernel can be adjusted according to task requirements to obtain different voiceprint feature graphs. The pooling layer of the voiceprint model provided in the embodiment of the present application can perform dimensionality reduction processing on the voiceprint feature graph, thereby reducing the computational complexity.
[0051] S205, fusing the voiceprint feature information to obtain the complete voiceprint feature of the target speech data, and mapping the complete voiceprint feature to the voiceprint vector space to obtain the target voiceprint vector;
[0052] Specifically, the voiceprint model uses multi-level fusion technology to fuse the extracted voiceprint feature information to obtain the complete voiceprint features of the target voice data, and maps the complete voiceprint features to the voiceprint vector space to obtain a target voiceprint vector of a fixed dimension. The voiceprint model used in the embodiment of the present application can extract a voiceprint vector from a whole sentence of target voice data, and can make full use of the entire voice data information. The voiceprint feature dimension of the voiceprint vector extracted by the voiceprint model used in the embodiment of the present application is only 128 to 256, which greatly reduces the computational complexity and improves the extraction efficiency of the voiceprint vector. The voiceprint vector is a format converted from speech features that can be processed by a machine learning algorithm. The lower the latitude of the voiceprint vector, the lower the computational complexity.
[0053] S206, inputting the target voiceprint vector into the classification model, and calculating the target probability that the target voiceprint vector is a target for each crowd type in the crowd type set;
[0054] Specifically, after obtaining the target voiceprint vector, the target voiceprint vector is input into the trained classification model, and the target probability of the target voiceprint vector being the target of each crowd type in the crowd type set is calculated in the classification model. The classification model predicts the category to which the new data belongs by learning the labeled data.
[0055] S207, selecting a maximum target probability from the target probabilities, and determining the crowd type corresponding to the maximum target probability as the target voiceprint type of the target voiceprint vector;
[0056] Specifically, the target voiceprint vectors calculated by the classification model are sorted according to the size relationship for the target probabilities of each population type, so as to select the maximum target probability from at least two target probabilities, and the population type corresponding to the maximum target probability is determined as the target voiceprint type of the target voiceprint vector.
[0057] S208, if the target voiceprint type is the target population type corresponding to the locking function of the electronic device, obtaining the functional state of the locking function, and controlling the electronic device based on the functional state and the target voice data;
[0058] Specifically, if the target voiceprint type is the target population type corresponding to the lock function of the electronic device, the function state of the lock function is obtained. If the function state is on, the target voice data is shielded; if the function state is off, the electronic device is controlled to execute the target instruction corresponding to the target voice data. When executing the target instruction, the target text data corresponding to the target voice data is identified, the target instruction to be executed is determined in the target text data based on the preset instruction set, and the electronic device is controlled to execute the target operation corresponding to the target instruction.
[0059] If the electronic device has two locking functions, the two locking functions are the first locking function and the second locking function, wherein the first locking function corresponds to the second target population type, and the second locking function corresponds to the third target population type. If the target voiceprint type is the second target population type, the first functional state of the first locking function is obtained, and if the first functional state is the on state, the target voice data is shielded; if the first functional state is the off state, the electronic device is controlled to execute the target instruction corresponding to the target voice data.
[0060] S209: If the target voiceprint type is different from the target population type corresponding to the locking function of the electronic device, control the electronic device to execute the target instruction corresponding to the target voice data.
[0061] Specifically, if the target voiceprint type is different from the target population type corresponding to the lock function of the electronic device, there is no need to pay attention to the functional state of the lock function, and the electronic device is directly controlled to execute the target command corresponding to the target voice data. When the electronic device executes the target command,
[0062] In a feasible implementation, if the locking function of the electronic device restricts only certain functions in the electronic device, then after acquiring the target voice data, the electronic device can directly identify the target text data corresponding to the target voice data, and determine the target instruction to be executed in the target text data based on the preset instruction set. If the function corresponding to the target instruction is a function restricted by the locking function, then when the target voiceprint type is the target population type and the function state is on, the target voice data is shielded. If the function corresponding to the target instruction is not a function restricted by the locking function, then when the target voiceprint type is the target population type, there is no need to obtain the function state, and the electronic device is directly controlled to execute the target operation corresponding to the target instruction.
[0063] See also Figure 4 , Figure 4 is a flow chart of a device control method provided in an embodiment of the present application. Figure 4 As shown, taking the electronic device having only one locking function, and the locking function being the child lock function as an example, after the electronic device obtains the target voice data, the target voice feature is extracted from the target voice data, and then the target voiceprint vector is extracted from the target voice feature, and the target voiceprint vector is classified. According to the classification result, it is determined whether the target voice data belongs to a child. If the target voice data belongs to a child, it is determined whether the child lock is turned on according to the child lock state. If the child lock is turned on, the target voice data is shielded, and the target instruction corresponding to the target voice data is refused to be responded; if the child lock is turned off, the target instruction corresponding to the target voice data is executed. If the target voice data does not belong to a child, the target instruction corresponding to the target voice data is executed.
[0064] In the embodiment of the present application, the voiceprint model and the classification model are first trained with a large amount of sample voice data for subsequent use. When the electronic device obtains the target voice data, the target voice feature is extracted from the target voice data, the voiceprint feature information is extracted from the target voice feature based on the voiceprint model, and the voiceprint feature information is fused to make full use of the entire voice data information, and finally the target voiceprint vector is obtained. Secondly, the target voiceprint vector is classified, and the target probability of the target voiceprint vector being each population type is calculated in the classification model, and the population type corresponding to the maximum target probability among multiple target probabilities is determined as the target voiceprint type. If the target voiceprint type is the target population type corresponding to the lock function of the electronic device and the lock function is turned off, or the target voiceprint type is different from the target population type, the electronic device is controlled to execute the target instruction corresponding to the target voice data; if the target voiceprint type is the target population type and the lock function is turned on, the target voice data is shielded. In the embodiment of the present application, there is no need to obtain the acoustic parameters of each age group, nor is there any need to register the voiceprint vectors of each population type in advance for matching, which improves the accuracy of speech recognition and the control efficiency of the electronic device. The electronic device can be flexibly controlled according to the voiceprint type and the functional status of the locking function, thereby improving the intelligence and safety of the electronic device and ensuring the use effect of the electronic device.
[0065] based on Figure 1 The following is a schematic diagram of the scene. Figure 5 , the device control device provided in the embodiment of the present application is introduced in detail. It should be noted that, Figure 5 The device control device in the present application is used to execute Figure 2-Figure 4 For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the present application. Figure 2-Figure 4 The embodiment shown.
[0066] See also Figure 5 , Figure 5 Schematic diagram of the structure of a device control device provided in an embodiment of the present application. Figure 5 As shown, the device control apparatus 1 of the embodiment of the present application may include: a speech feature extraction unit 11, a voiceprint vector extraction unit 12, a voiceprint type acquisition unit 13 and a device control unit 14.
[0067] A speech feature extraction unit 11 is used to obtain target speech data and extract target speech features from the target speech data;
[0068] A voiceprint vector extraction unit 12, used for inputting the target speech feature into the voiceprint model, and extracting the target voiceprint vector from the target speech feature based on the voiceprint model;
[0069] A voiceprint type acquisition unit 13, configured to input the target voiceprint vector into a classification model, and acquire a target voiceprint type of the target voiceprint vector based on the classification model;
[0070] The device control unit 14 is used to control the electronic device based on the target voiceprint type and the target voice data.
[0071] Optionally, the device control device 1 is specifically used to obtain sample voice data of each crowd type in the crowd type set;
[0072] Performing speech enhancement on the sample speech data to obtain a sample speech data set;
[0073] The voiceprint model and classification model are trained based on the sample speech dataset.
[0074] Optionally, the voiceprint vector extraction unit 12 is specifically used to input the target speech feature into the voiceprint model, and extract voiceprint feature information from the target speech feature;
[0075] The voiceprint feature information is integrated to obtain the complete voiceprint features of the target voice data;
[0076] Map the complete voiceprint features to the voiceprint vector space to obtain the target voiceprint vector.
[0077] Optionally, the voiceprint type acquisition unit 13 is specifically used to input the target voiceprint vector into the classification model, and calculate the target probability that the target voiceprint vector is a target of each crowd type in the crowd type set;
[0078] The maximum target probability is selected from the target probabilities, and the crowd type corresponding to the maximum target probability is determined as the target voiceprint type of the target voiceprint vector.
[0079] Optionally, the device control unit 14 is specifically configured to obtain a functional state of the locking function if the target voiceprint type is a target population type corresponding to the locking function of the electronic device;
[0080] Control electronic devices based on functional status and target voice data.
[0081] Optionally, the device control unit 14 is specifically configured to shield the target voice data if the function state is in an on state;
[0082] If the function state is off, the electronic device is controlled to execute the target instruction corresponding to the target voice data.
[0083] Optionally, the device control unit 14 is specifically configured to control the electronic device to execute a target instruction corresponding to the target voice data if the target voiceprint type is different from the target population type corresponding to the locking function of the electronic device.
[0084] Optionally, the device control unit 14 is specifically used to identify target text data corresponding to the target voice data, determine the target instruction to be executed in the target text data based on a preset instruction set, and control the electronic device to execute the target operation corresponding to the target instruction.
[0085] Optionally, speech enhancement is to enhance at least one parameter of noise, reverberation, speaking rate and spectrum in the speech data.
[0086] In the embodiment of the present application, the voiceprint model and the classification model are first trained with a large amount of sample voice data for subsequent use. When the electronic device obtains the target voice data, the target voice feature is extracted from the target voice data, the voiceprint feature information is extracted from the target voice feature based on the voiceprint model, and the voiceprint feature information is fused to make full use of the entire voice data information, and finally the target voiceprint vector is obtained. Secondly, the target voiceprint vector is classified, and the target probability of the target voiceprint vector being each population type is calculated in the classification model, and the population type corresponding to the maximum target probability among multiple target probabilities is determined as the target voiceprint type. If the target voiceprint type is the target population type corresponding to the lock function of the electronic device and the lock function is turned off, or the target voiceprint type is different from the target population type, the electronic device is controlled to execute the target instruction corresponding to the target voice data; if the target voiceprint type is the target population type and the lock function is turned on, the target voice data is shielded. In the embodiment of the present application, there is no need to obtain the acoustic parameters of each age group, nor is there any need to register the voiceprint vectors of each population type in advance for matching, which improves the accuracy of speech recognition and the control efficiency of the electronic device. The electronic device can be flexibly controlled according to the voiceprint type and the functional status of the locking function, thereby improving the intelligence and safety of the electronic device and ensuring the use effect of the electronic device.
[0087] See also Figure 6 , Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application.
[0088] For example, Figure 6 As shown, the electronic device 600 includes: a processor 601 and a memory 602, wherein the processor 601 is electrically connected to the memory 602.
[0089] The processor 601 is the control center of the electronic device 600 and may include one or more processing cores. The processor 601 uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or calling computer programs stored in the memory 602, and calling data stored in the memory 602, so as to control the electronic device 600 as a whole. Optionally, the processor 601 can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 601 can integrate one or a combination of CPU, graphics processing unit (GPU), modem, etc. Among them, the CPU mainly processes the operating system, user pages, and applications; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 601, but may be implemented separately through a communication chip.
[0090] The memory 602 can be used to store software programs and modules, and the processor 601 executes various functional applications and data processing by running the computer programs and modules stored in the memory 602. The memory 602 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, a computer program required for at least one function, etc.; the data storage area can store data created according to the use of the electronic device 600, etc.
[0091] In addition, the memory 602 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 602 may also include a memory controller to provide the processor 601 with access to the memory 602.
[0092] In this embodiment, the processor 601 in the electronic device 600 loads instructions corresponding to the processes of one or more computer programs into the memory 602 according to the following steps, and the processor 601 runs the computer program stored in the memory 602 to implement various functions, as follows:
[0093] Acquire target speech data, and extract target speech features from the target speech data;
[0094] Inputting the target speech feature into the voiceprint model, and extracting the target voiceprint vector from the target speech feature based on the voiceprint model;
[0095] Inputting the target voiceprint vector into the classification model, and obtaining the target voiceprint type of the target voiceprint vector based on the classification model;
[0096] Based on the target voiceprint type and the target voice data, the electronic device is controlled.
[0097] Optionally, before inputting the target speech feature into the voiceprint model and extracting the target voiceprint vector from the target speech feature based on the voiceprint model, the processor 601 further executes:
[0098] Obtain sample speech data for each crowd type in the crowd type set;
[0099] Performing speech enhancement on the sample speech data to obtain a sample speech data set;
[0100] The voiceprint model and classification model are trained based on the sample speech dataset.
[0101] Optionally, when inputting the target speech feature into the voiceprint model and extracting the target voiceprint vector from the target speech feature based on the voiceprint model, the processor 601 specifically performs:
[0102] Inputting the target speech feature into the voiceprint model, and extracting the voiceprint feature information from the target speech feature;
[0103] The voiceprint feature information is integrated to obtain the complete voiceprint features of the target voice data;
[0104] Map the complete voiceprint features to the voiceprint vector space to obtain the target voiceprint vector.
[0105] Optionally, when inputting the target voiceprint vector into the classification model and obtaining the target voiceprint type of the target voiceprint vector based on the classification model, the processor 601 specifically performs:
[0106] Input the target voiceprint vector into the classification model, and calculate the target probability that the target voiceprint vector is the target of each crowd type in the crowd type set;
[0107] The maximum target probability is selected from the target probabilities, and the crowd type corresponding to the maximum target probability is determined as the target voiceprint type of the target voiceprint vector.
[0108] Optionally, when the processor 601 controls the electronic device based on the target voiceprint type and the target voice data, it specifically performs:
[0109] If the target voiceprint type is the target population type corresponding to the lock function of the electronic device, then the function status of the lock function is obtained;
[0110] Control electronic devices based on functional status and target voice data.
[0111] Optionally, when the processor 601 controls the electronic device based on the functional state and the target voice data, the processor 601 specifically performs:
[0112] If the function status is on, the target voice data is shielded;
[0113] If the function state is off, the electronic device is controlled to execute the target instruction corresponding to the target voice data.
[0114] Optionally, when the processor 601 controls the electronic device based on the target voiceprint type and the target voice data, it specifically performs:
[0115] If the target voiceprint type is different from the target population type corresponding to the locking function of the electronic device, the electronic device is controlled to execute the target instruction corresponding to the target voice data.
[0116] Optionally, when the processor 601 executes the target instruction corresponding to the target voice data to control the electronic device, the processor 601 specifically executes:
[0117] Identify the target text data corresponding to the target voice data, determine the target instruction to be executed in the target text data based on a preset instruction set, and control the electronic device to execute the target operation corresponding to the target instruction.
[0118] Optionally, speech enhancement is to enhance at least one parameter of noise, reverberation, speaking rate and spectrum in the speech data.
[0119] In the embodiment of the present application, the voiceprint model and the classification model are first trained with a large amount of sample voice data for subsequent use. When the electronic device obtains the target voice data, the target voice feature is extracted from the target voice data, the voiceprint feature information is extracted from the target voice feature based on the voiceprint model, and the voiceprint feature information is fused to make full use of the entire voice data information, and finally the target voiceprint vector is obtained. Secondly, the target voiceprint vector is classified, and the target probability of the target voiceprint vector being each population type is calculated in the classification model, and the population type corresponding to the maximum target probability among multiple target probabilities is determined as the target voiceprint type. If the target voiceprint type is the target population type corresponding to the lock function of the electronic device and the lock function is turned off, or the target voiceprint type is different from the target population type, the electronic device is controlled to execute the target instruction corresponding to the target voice data; if the target voiceprint type is the target population type and the lock function is turned on, the target voice data is shielded. In the embodiment of the present application, there is no need to obtain the acoustic parameters of each age group, nor is there any need to register the voiceprint vectors of each population type in advance for matching, which improves the accuracy of speech recognition and the control efficiency of the electronic device. The electronic device can be flexibly controlled according to the voiceprint type and the functional status of the locking function, thereby improving the intelligence and safety of the electronic device and ensuring the use effect of the electronic device.
[0120] It should be understood that the apparatus provided in the embodiment of the present application is used to execute the above-mentioned device control method, and thus can achieve the same effect as the above-mentioned implementation method.
[0121] In the case of an integrated unit, the device may include a processing module and a storage module. When the device is applied to an electronic device, the processing module may be used to control and manage the actions of the electronic device. The storage module may be used to support the electronic device in executing related program codes, etc.
[0122] The processing module may be a processor or a controller, which may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module may be a memory.
[0123] In addition, the device provided in the embodiment of the present application can specifically be a chip, component or module, and the chip may include a connected processor and memory; wherein the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute a device control method provided in the above embodiment.
[0124] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program code is stored. When the computer program code is executed on a computer, the computer executes the above-mentioned related method steps to implement a device control method provided in the above-mentioned embodiment.
[0125] This embodiment further provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement a device control method provided by the above embodiment.
[0126] Among them, the device, computer-readable storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
[0127] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0128] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0129] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A device control method, characterized in that: The method comprises: Acquire target speech data, and extract target speech features from the target speech data; Inputting the target speech feature into a voiceprint model, and extracting a target voiceprint vector from the target speech feature based on the voiceprint model; Inputting the target voiceprint vector into a classification model, and obtaining a target voiceprint type of the target voiceprint vector based on the classification model; Based on the target voiceprint type and the target voice data, the electronic device is controlled.
2. The method according to claim 1, characterized in that Before inputting the target speech feature into the voiceprint model and extracting the target voiceprint vector from the target speech feature based on the voiceprint model, the method further includes: Obtain sample speech data for each crowd type in the crowd type set; Performing speech enhancement on the sample speech data to obtain a sample speech data set; The voiceprint model and the classification model are trained based on the sample speech data set.
3. The method according to claim 2, characterized in that The step of inputting the target speech feature into a voiceprint model and extracting a target voiceprint vector from the target speech feature based on the voiceprint model includes: Inputting the target speech feature into the voiceprint model, and extracting voiceprint feature information from the target speech feature; The voiceprint feature information is integrated to obtain the complete voiceprint feature of the target voice data; The complete voiceprint feature is mapped to the voiceprint vector space to obtain a target voiceprint vector.
4. The method according to claim 2, characterized in that: The step of inputting the target voiceprint vector into a classification model and obtaining a target voiceprint type of the target voiceprint vector based on the classification model includes: Inputting the target voiceprint vector into the classification model, and calculating the target probability that the target voiceprint vector is a target for each of the crowd types in the crowd type set; A maximum target probability is selected from the target probabilities, and the crowd type corresponding to the maximum target probability is determined as the target voiceprint type of the target voiceprint vector.
5. The method according to claim 1, characterized in that The controlling the electronic device based on the target voiceprint type and the target voice data includes: If the target voiceprint type is the target population type corresponding to the locking function of the electronic device, then obtaining the functional state of the locking function; Based on the functional status and the target voice data, the electronic device is controlled.
6. The method according to claim 5, characterized in that The controlling the electronic device based on the functional state and the target voice data comprises: If the function state is on, shielding the target voice data; If the function state is an off state, the electronic device is controlled to execute a target instruction corresponding to the target voice data.
7. The method according to claim 5, characterized in that The method further comprises: If the target voiceprint type is different from the target population type corresponding to the locking function of the electronic device, the electronic device is controlled to execute the target instruction corresponding to the target voice data.
8. The method according to claim 6 or 7, characterized in that: The controlling the electronic device to execute the target instruction corresponding to the target voice data includes: Identify the target text data corresponding to the target voice data, determine the target instruction to be executed in the target text data based on a preset instruction set, and control the electronic device to execute the target operation corresponding to the target instruction.
9. The method according to claim 2, characterized in that: The speech enhancement is to enhance at least one parameter of the noise, reverberation, speech rate and spectrum in the speech data.
10. A device control device, characterized in that: The device comprises: A speech feature extraction unit, used to obtain target speech data and extract target speech features from the target speech data; A voiceprint vector extraction unit, configured to input the target speech feature into a voiceprint model, and extract a target voiceprint vector from the target speech feature based on the voiceprint model; a voiceprint type acquisition unit, configured to input the target voiceprint vector into a classification model, and acquire a target voiceprint type of the target voiceprint vector based on the classification model; A device control unit is used to control the electronic device based on the target voiceprint type and the target voice data.
11. An electronic device, characterized in that: The electronic device comprises: A memory for storing executable program codes; A processor, configured to call and run the executable program code from the memory, so that the electronic device executes the method according to any one of claims 1 to 9.
12. A computer program product, characterized in that The computer program product comprises: Computer program code, when the computer program code is executed, implements the method according to any one of claims 1 to 9.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program code, and when the computer program code is executed, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Cited By
Device control method and apparatus, and storage medium and device
WO2026148863A1