Voice desensitization method, device, electronic device and storage medium
By inputting the amplitude spectrum of each voice frame of speech data into the sensitive speech detection model, generating a voice mask and eliminating sensitive information, the problem of leakage and excessive elimination of sensitive information in real-time voice communication scenarios in the prior art is solved, and the problem of sensitive information leakage and excessive elimination in real-time voice communication scenarios is realized Accurate speech desensitization and improvement in recognition efficiency.
Patent Information
- Application Number
- CN202111144335.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-28
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2041-09-28
AI Technical Summary
The prior art cannot effectively deal with the problems of leakage or excessive elimination of sensitive information in real-time voice communication scenarios, and the recognition rate is low.
By inputting the amplitude spectrum of each speech frame of speech data to a pretrained sensitive speech detection model, a speech mask is generated and sensitive information in the speech data is eliminated based on the mask.
It realizes the precise positioning and elimination of sensitive information in real-time voice communication scenarios, reduces the interchange of voice and text, improves recognition efficiency, and avoids the problems of leakage and excessive elimination of sensitive information.
Smart Images

Figure CN113921042B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a speech desensitization method, device, electronic device and storage medium. Background Art
[0002] Nowadays, there are more and more application scenarios for real-time voice communication, such as telephone communication, voice communication tool communication, and online conference communication. In the process of voice communication, a large amount of sensitive information is often contained, such as personal ID number, name, address, price, registration information, etc. Therefore, it is necessary to shield these sensitive information to protect the security of voice information. The existing method of shielding sensitive voice information mainly detects sensitive words after voice-to-text conversion, desensitizes and replaces the sensitive words, and converts the replaced content into voice output to the receiving end. However, this method has the problems of being unable to cope with real-time scenarios, easy leakage of sensitive information or excessive elimination of voice, and low recognition rate. Summary of the invention
[0003] The present invention provides a voice desensitization method, device, electronic device and storage medium to solve the defects of the prior art that it cannot cope with real-time scenarios, sensitive information is easily leaked or voice is excessively eliminated, and the recognition rate is low.
[0004] The present invention provides a speech desensitization method, comprising:
[0005] Determine the voice data to be desensitized;
[0006] Inputting the amplitude spectrum of each speech frame in the speech data into a sensitive speech detection model to obtain a speech mask of each speech frame output by the sensitive speech detection model; the sensitive speech detection model is trained based on sample general speech and the general mask of each sample speech frame therein, and sample sensitive word speech and the sensitive mask of each sample speech frame therein;
[0007] Based on the speech mask of each speech frame, sensitive information in the speech data is eliminated.
[0008] According to a speech desensitization method provided by the present invention, the amplitude spectrum of each speech frame in the speech data is input into a sensitive speech detection model to obtain a speech mask of each speech frame output by the sensitive speech detection model, including:
[0009] Inputting the amplitude spectrum of each speech frame in the speech data into the sensitive speech detection model frame by frame, and obtaining the speech mask of each speech frame output by the sensitive speech detection model frame by frame;
[0010] Among them, the input speech frame and the output speech frame at the same moment differ by a preset number of frames, the input speech frame is the speech frame corresponding to the amplitude spectrum input into the sensitive speech detection model, and the output speech frame is the speech frame corresponding to the speech mask output from the sensitive speech detection model.
[0011] According to a speech desensitization method provided by the present invention, the amplitude spectrum of each speech frame in the speech data is input into a sensitive speech detection model frame by frame to obtain a speech mask of each speech frame output by the sensitive speech detection model frame by frame, including:
[0012] The amplitude spectrum of each speech frame in the speech data is input into the sensitive speech detection model frame by frame. The sensitive speech detection model encodes the state vector of each speech frame based on the amplitude spectrum of each speech frame, the amplitude spectrum of a preset number of consecutive speech frames after each speech frame, and the state vector of a frame before each speech frame, and performs sensitive speech detection based on the state vector of each speech frame to obtain the speech mask of each speech frame output by the sensitive speech detection model frame by frame.
[0013] According to a speech desensitization method provided by the present invention, the voice mask based on each speech frame is used to eliminate sensitive information in the speech data, including:
[0014] Based on the speech mask of each speech frame, desensitizing the amplitude spectrum of each speech frame in the speech data to obtain desensitized amplitude spectrum data;
[0015] The desensitized amplitude spectrum data is inversely transformed to obtain desensitized speech data.
[0016] According to a speech desensitization method provided by the present invention, based on the speech mask of each speech frame, the amplitude spectrum of each speech frame in the speech data is desensitized to obtain the desensitized amplitude spectrum data, including:
[0017] Based on the speech mask of each speech frame, locate the sensitive word speech segment from the speech data, and determine the desensitization method of each sensitive word speech segment;
[0018] If the desensitization method is information desensitization, desensitization is performed on the amplitude spectrum of the speech frames of the specified number of frames after the sensitive word speech segment, or on the amplitude spectrum of each speech frame in the sensitive word speech segment and the amplitude spectrum of the speech frames of the specified number of frames after the sensitive word speech segment;
[0019] If the desensitization method is sensitive word desensitization, desensitization processing is performed on the amplitude spectrum of each speech frame in the sensitive word speech segment.
[0020] According to a speech desensitization method provided by the present invention, the sensitive word speech segment is located from the speech data based on the speech mask of each speech frame, including:
[0021] Determine, in the voice data, a voice frame whose voice mask is less than a preset voice mask threshold as a sensitive word voice frame;
[0022] A plurality of continuous sensitive word speech frames whose frame number is greater than a preset frame number threshold is regarded as a sensitive word speech segment.
[0023] According to a speech desensitization method provided by the present invention, the specific steps of determining the desensitization mode of each sensitive word speech segment include:
[0024] A preset number of speech frames are intercepted from the end of the sensitive word speech segment to serve as the speech segment to be classified;
[0025] Inputting the speech segment to be classified into a speech classification model to obtain a desensitization method of the sensitive word speech segment output by the speech classification model;
[0026] The speech classification model is trained based on sample sensitive word speech segments and their desensitization method labels.
[0027] According to a speech desensitization method provided by the present invention, the sample sensitive word speech is obtained by adding noise to the original sensitive word speech based on sample noise, and the sensitive mask is determined based on the amplitude spectrum of the sample noise and the amplitude spectrum of the original sensitive word speech.
[0028] The present invention also provides a speech desensitization device, comprising:
[0029] A determination module, used to determine the voice data to be desensitized;
[0030] A prediction module, used for inputting the amplitude spectrum of each speech frame in the speech data into a sensitive speech detection model to obtain a speech mask of each speech frame output by the sensitive speech detection model; the sensitive speech detection model is trained based on sample common speech and the common mask of each sample speech frame therein, and sample sensitive word speech and the sensitive mask of each sample speech frame therein;
[0031] The elimination module is used to eliminate sensitive information in the speech data based on the speech mask of each speech frame.
[0032] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-mentioned speech desensitization methods are implemented.
[0033] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned speech desensitization methods are implemented.
[0034] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of any of the above-mentioned speech desensitization methods are implemented.
[0035] The present invention provides a speech desensitization method, device, electronic device and storage medium. The method inputs the amplitude spectrum of each frame in the speech data to be desensitized into a sensitive speech detection model to obtain a speech mask for each speech frame, and then eliminates sensitive information in the speech data according to the speech mask for each speech frame. The method outputs a speech mask based on the amplitude spectrum of the input speech frame using the sensitive speech detection model to locate sensitive words, and desensitizes the sensitive words. The process of converting between speech and text is reduced, the recognition efficiency is improved, the problems of easy leakage of sensitive information or excessive elimination of speech, as well as low efficiency and recognition rate are overcome, and real-time and accurate speech desensitization is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0037] Figure 1 This is one of the flow charts of the speech desensitization method provided by the present invention;
[0038] Figure 2 It is a schematic diagram of the process of obtaining desensitized voice data provided by the present invention;
[0039] Figure 3 It is a flowchart of a method for determining sensitive speech segments provided by the present invention;
[0040] Figure 4 It is a schematic diagram of a flow chart of a method for determining a sensitive word speech segment desensitization method provided by the present invention;
[0041] Figure 5 This is the second flow chart of the method for speech desensitization provided by the present invention;
[0042] Figure 6 The present invention provides a method for training a sensitive speech detection model;
[0043] Figure 7 It is a schematic diagram of the processing flow of the sensitive speech detection model provided by the present invention;
[0044] Figure 8 It is a structural schematic diagram of the speech desensitization device provided by the present invention;
[0045] Fig. 9 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] The existing speech desensitization method mainly converts the speech data into text first, and then compares the converted text with the sensitive words in a pre-set sensitive word library. If it is detected that the text contains sensitive words, the speech segment containing the sensitive words is replaced with other speech segments to complete the speech desensitization operation.
[0048] However, the speech-to-text method in the existing methods is inefficient and cannot meet the needs of real-time speech desensitization. The subsequent steps are highly dependent on speech-to-text. Once there is a problem in the text conversion, all subsequent desensitization steps will fail. Moreover, the speech-to-text operation that is not performed on sensitive words will lead to the problem of low recognition rate of sensitive words. When sensitive words are detected, the speech segments of the sensitive words are replaced with other speech segments, and the replaced speech segments need to be aligned on the original speech segments. However, aligning the text on the speech data is prone to errors, resulting in leakage of sensitive information. In order to reduce the probability of sensitive information leakage, the speech segments near the sensitive information will be excessively eliminated, affecting the actual experience.
[0049] Therefore, how to achieve real-time and accurate speech desensitization is an urgent problem to be solved in this field.
[0050] Figure 1 It is one of the flow charts of the method for speech desensitization provided by the present invention, such as Figure 1 As shown, an embodiment of the present invention provides a speech desensitization method, including:
[0051] Step 110, determining the voice data to be desensitized;
[0052] Specifically, the voice data to be desensitized can be real-time voice data, such as voice calls, online conferences, etc., or non-real-time voice data, such as recordings, intercom voice messages, etc., and the embodiments of the present invention do not limit this. Desensitization is to eliminate sensitive information in voice data, and sensitive information can be information that needs to be eliminated, such as uncivilized or illegal language, etc., and can also be positioning information, which is used to locate and eliminate the specified information behind the sensitive information, such as passwords, addresses or identity information, etc., and the embodiments of the present invention do not limit this.
[0053] Step 120, inputting the amplitude spectrum of each speech frame in the speech data into a sensitive speech detection model to obtain a speech mask of each speech frame output by the sensitive speech detection model; the sensitive speech detection model is trained based on sample general speech and a general mask of each sample speech frame therein, and sample sensitive word speech and a sensitive mask of each sample speech frame therein;
[0054] Considering that speech-to-text conversion may cause conversion errors due to ambient sound, the speaker's local accent or semantics, the speech data in the time domain is transformed to the frequency domain for processing, and then the processed frequency domain signal is restored to the time domain. What is transformed is the expression of the speech data, which is not prone to conversion errors. In the embodiment of the present invention, the speech data is no longer converted to text, but the speech data is transformed to the frequency domain for processing. Furthermore, the amplitude spectrum, as one of the frequency domain expressions of the speech signal, can be used as a means of extracting speech features. Therefore, the embodiment of the present invention detects and locates sensitive information through the amplitude spectrum of the speech data.
[0055] Specifically, in an embodiment of the present invention, the amplitude spectrum of each speech frame in the speech data can be input into a pre-trained sensitive speech detection model, and the sensitive speech detection model detects the amplitude spectrum of each speech frame in the speech data to obtain a speech mask corresponding to the speech frame for use in step 130. It should be noted that the amplitude spectrum of each speech frame in the speech data is obtained by sliding window framing the speech data and then performing time-frequency transformation on each speech frame obtained; the speech mask output by the sensitive speech detection model is a judgment label of whether the speech frame is a speech frame containing sensitive information. For example, it can reflect whether the speech frame is a speech frame containing sensitive information in the form of "0" or "1", or it can reflect the possibility of containing sensitive information in the speech frame in the form of probability, which is not specifically limited in the embodiment of the present invention.
[0056] Before executing step 120, it is also necessary to pre-train a sensitive speech detection model. Specifically, when training the sensitive speech detection model, it is necessary to use sample general speech and sample sensitive word speech as samples, and use the general mask of each sample speech frame in the sample general speech and the sensitive mask of each sample speech frame in the sample sensitive word speech as labels. Among them, the sample general speech and the sample sensitive word speech are both sample speech, the difference is that the sample general speech does not contain sensitive words, that is, the sample general speech is a speech that does not need to be desensitized, and the mask of each sample speech frame in the sample general speech reflects that the corresponding sample speech frame does not contain sensitive information, so it is recorded here as a general mask, and the sample sensitive word speech is a speech that only contains sensitive words, that is, the sample sensitive words are speech that needs to be muted as a whole, and the mask of each speech frame in the sample sensitive word speech reflects that the corresponding sample speech frame contains sensitive information, so it is recorded here as a sensitive mask.
[0057] When training the sensitive speech detection model, the amplitude spectra of the sample general speech and the sample sensitive word speech can be respectively input into the model being trained, so as to obtain the prediction mask output by the model for the amplitude spectrum of each sample speech frame in the sample general speech and the sample sensitive word speech. On this basis, the prediction mask of each sample speech frame in the sample general speech is compared with the pre-labeled general mask, and the prediction mask output of each sample speech frame in the sample sensitive word speech is compared with the pre-labeled sensitive mask, so as to obtain the loss value of the model training, and the model parameters are iteratively updated based on the loss value. In this process, the model can learn the correspondence between the amplitude spectrum of the sample speech frame and the mask label, so that the trained sensitive speech detection model can have the ability to detect sensitive information based on the amplitude spectrum.
[0058] Step 130, based on the speech mask of each speech frame, eliminate sensitive information in the speech data.
[0059] Specifically, according to the voice mask of each voice frame output in step 120, the sensitive information in the voice data is eliminated. It should be noted that the sensitive information in the voice data can be eliminated by desensitizing the amplitude spectrum of the original voice frame according to the voice mask, and then restoring the amplitude spectrum after desensitization to voice data. It is also possible to locate multiple continuous voice frames of sensitive information to form a voice segment according to the voice mask of each voice frame, thereby eliminating the voice segment as a whole or eliminating the voice segment of a specified number of frames after the voice segment, and the embodiment of the present invention is not limited to this.
[0060] A speech desensitization method provided by an embodiment of the present invention applies a sensitive speech detection model to perform sensitive speech detection on the amplitude spectrum of an input speech frame to locate sensitive information in the speech data, thereby realizing speech desensitization. In this process, there is no process of converting speech to text, thereby avoiding the problems of easy leakage of sensitive information caused by speech transcription, excessive elimination of speech, and low transcription efficiency and recognition rate, thereby realizing real-time and accurate speech desensitization.
[0061] Based on the above embodiment, step 120 includes:
[0062] Inputting the amplitude spectrum of each speech frame in the speech data into the sensitive speech detection model frame by frame, and obtaining the speech mask of each speech frame output by the sensitive speech detection model frame by frame;
[0063] Among them, the input speech frame and the output speech frame at the same time differ by a preset number of frames, the input speech frame is the speech frame corresponding to the amplitude spectrum of the input sensitive speech detection model, and the output speech frame is the speech frame corresponding to the speech mask output from the sensitive speech detection model.
[0064] Considering the need for desensitization of real-time speech, streaming processing is introduced into the embodiment of the present invention based on its low latency and high throughput characteristics. Specifically, the amplitude spectrum of each speech frame in the speech data is input into the sensitive speech detection model frame by frame, and the speech mask corresponding to each speech frame output by the sensitive speech detection model is obtained. Through the form of frame-by-frame input and output, streaming sensitive speech detection for speech data is realized to ensure the real-time performance of speech desensitization.
[0065] At the same time, considering that the information content in the amplitude spectrum of a single speech frame is relatively small in streaming sensitive speech detection, in order to improve the effect of model prediction, the information in the amplitude spectra of multiple speech frames is needed to assist in sensitive speech detection. Therefore, when predicting the current speech frame, a delay can be set for the input and output of the model, so that when the model performs sensitive speech detection on the current speech frame, while based on the amplitude spectrum of the current speech frame, it can also refer to the information of the amplitude spectra of each speech frame a preset number of frames after the speech frame.
[0066] Specifically, the input speech frame and the output speech frame at the same time differ by a preset number of frames. It should be noted that the preset number of frames between the input speech frame and the output speech frame at the same time is to set a preset frame delay. When a speech frame is input, the sensitive speech detection model outputs a speech frame with a preset frame delay before the speech frame. For example, if the preset frame delay is 2 frames and the current input is an amplitude spectrum with a frame number of the third speech frame, then the speech mask of the first speech frame is output at the same time.
[0067] The method provided by the embodiment of the present invention realizes sensitive information detection of voice frames in streaming voice data by inputting voice frames frame by frame and outputting sensitive information detection results frame by frame.
[0068] In the detection of sensitive information in streaming speech frames, a delay of a preset number of frames is applied so that the sensitive speech detection model can perform sensitive information detection of the current frame based on the amplitude spectrum of speech frames that are a preset number of frames subsequent to the current speech frame, combined with the amplitude spectrum of the current frame and the sensitive information detection results of the previous period of the current frame, thereby improving the reliability of detection.
[0069] Based on the above embodiment, in step 120, the amplitude spectrum of each speech frame in the speech data is input into the sensitive speech detection model frame by frame, and the speech mask of each speech frame output by the sensitive speech detection model frame by frame is obtained, including:
[0070] The amplitude spectrum of each speech frame in the speech data is input into the sensitive speech detection model frame by frame. The sensitive speech detection model encodes the state vector of each speech frame based on the amplitude spectrum of each speech frame, the amplitude spectrum of a preset number of consecutive speech frames after each speech frame, and the state vector of the frame before each speech frame. Sensitive speech detection is performed based on the state vector of each speech frame to obtain the speech mask of each speech frame output by the sensitive speech detection model frame by frame.
[0071] Specifically, considering the temporal nature of speech itself, the information represented by a speech frame is often related to the information represented by the speech frames before and after the speech frame. When performing streaming sensitive speech detection based on a sensitive speech detection model, the sensitive speech detection model can use its own model structure to implement sensitive speech detection based on the left field of view of the model. For example, causal convolution, LSTM (Long Short-Term Memory) and other model structures all have a left field of view, that is, in the streaming processing process, the model can encode the state vector of any input speech frame based on its own amplitude spectrum and the state vector of the previous frame of the speech frame, and then perform sensitive speech detection based on the state vectors of each speech frame.
[0072] However, the effect of directly predicting the speech mask of the current frame by the streaming sensitive speech detection model without the right field of view is not ideal. Therefore, the embodiment of the present invention uses the amplitude spectrum of a preset number of speech frames consecutively after each speech frame as the right field of view of the sensitive speech detection model to assist the sensitive speech detection model in predicting and outputting the speech mask of each speech frame.
[0073] Specifically, in the process of inputting the amplitude spectrum of each speech frame in the speech data into the sensitive speech detection model frame by frame, for any speech frame therein, the model can encode the state vector of each speech frame according to the amplitude spectrum of a preset number of consecutive speech frames after the input speech frame, the amplitude spectrum of each speech frame itself and the state vector of the frame before each speech frame, and then perform sensitive speech detection based on the state vector of each speech frame to obtain the speech mask of each speech frame output by the sensitive speech detection model frame by frame.
[0074] It should be noted that the state vector is obtained by encoding the sensitive speech detection model according to the amplitude spectrum of the speech frame and the amplitude spectrum of its context speech frame; when the sensitive speech detection model processes a certain speech frame, it is necessary to encode the amplitude spectrum of a preset number of speech frames subsequent to the speech frame (as the right field of view of the model), the amplitude spectrum of the speech frame, and the state vector of the amplitude spectrum of the frame before the frame (as the left field of view of the model) to obtain the state vector of the speech frame, and then perform sensitive speech detection according to the state vector of the speech frame to obtain the speech mask of the frame. Based on such a processing flow, the speech mask of each speech frame output frame by frame ensures real-time performance while also ensuring reliability and accuracy.
[0075] For example, the preset number of frames is 2, and the currently processed speech frame is the 4th speech frame. The sensitive speech detection model will use the last two speech frames of the currently processed speech frame as the model right field of view, namely the 5th speech frame and the 6th speech frame, and then encode the state vector of the previous speech frame of the currently processed speech frame, namely the 3rd speech frame, the amplitude spectrum of the currently processed speech frame, namely the 4th speech frame, and the amplitude spectrum of the 5th speech frame and the 6th speech frame to obtain the state vector corresponding to the 4th speech frame, thereby obtaining the speech mask of the 4th speech frame. Here, the model outputs the speech mask of the 4th speech frame after the amplitude spectrum of the 6th speech frame is input into the model, that is, there is a 2-frame delay.
[0076] Based on the above embodiments, the sensitive speech detection model can adopt a CNN (Convolutional Neural Network) + RNN (Recurrent Neural Network) structure. In order to take into account both the model effect and the real-time performance of streaming processing, the CNN part of the sensitive speech detection model uses causal convolution, that is, a convolution layer without a model right field of view; the RNN part uses an LSTM structure, which also does not require a model right field of view, so that the entire model can maintain a streaming processing effect of one frame in and one frame out.
[0077] Based on the above embodiments, Figure 2 It is a schematic diagram of the process of obtaining desensitized voice data provided by the present invention, such as Figure 2 As shown, step 130 includes:
[0078] Step 131, based on the voice mask of each voice frame, desensitize the amplitude spectrum of each voice frame in the voice data to obtain desensitized amplitude spectrum data;
[0079] Specifically, based on the voice mask of each voice frame, the amplitude spectrum of each voice frame in the voice data is desensitized to obtain the desensitized amplitude spectrum data. It should be noted that based on the voice mask of each voice frame, the amplitude spectrum of each voice frame in the voice data is desensitized, wherein the desensitization process can be to desensitize the amplitude spectrum of the original voice frame according to the voice mask of each voice frame, for example: when the output voice mask is 0 or close to 0, it is represented as a sensitive voice frame, then the voice mask multiplied by the original amplitude spectrum of the frame can obtain the amplitude spectrum of the desensitized voice frame.
[0080] However, considering that some misjudgments may occur in the output of the sensitive speech detection model, desensitization processing based on a single-frame speech mask may result in misprocessing, eliminate common speech, and lead to a poor user experience. Therefore, the specific desensitization processing may also be to combine multiple consecutive frames corresponding to the speech mask whose detection results are sensitive information into a speech segment, and then multiply the speech mask of the speech segment by the original amplitude spectrum of the speech segment to obtain the desensitized amplitude spectrum data.
[0081] Step 132, inversely transform the desensitized amplitude spectrum data to obtain desensitized speech data.
[0082] Specifically, the desensitized amplitude spectrum data is inversely transformed to obtain the desensitized voice data. It should be noted that the desensitized amplitude spectrum data is converted into voice data through short-time Fourier inverse transformation to obtain the desensitized voice data.
[0083] Based on the above embodiment, step 131 includes:
[0084] Based on the speech mask of each speech frame, the sensitive word speech segments are located from the speech data, and the desensitization method of each sensitive word speech segment is determined;
[0085] If the desensitization method is information desensitization, desensitization is performed on the amplitude spectrum of the speech frames of the specified number of frames after the sensitive word speech segment, or on the amplitude spectrum of each speech frame in the sensitive word speech segment and the amplitude spectrum of the speech frames of the specified number of frames after the sensitive word speech segment;
[0086] If the desensitization method is sensitive word desensitization, the amplitude spectrum of each speech frame in the sensitive word speech segment is desensitized.
[0087] Considering that the desensitization method may include directly desensitizing sensitive words, for example, desensitizing uncivilized language, or locating based on sensitive words and desensitizing the content behind the word, for example, locating words such as account number and password in the voice and desensitizing the subsequent part of the word. Based on the above content, the embodiment of the present invention locates the sensitive words and determines the desensitization method for the sensitive words.
[0088] Specifically, the speech mask of each speech frame output by the sensitive information monitoring model is used to determine whether the speech frame is a sensitive speech frame, and the sensitive word speech segment is obtained based on the condition of locating the sensitive word speech segment, and the corresponding desensitization method is found according to the amplitude spectrum of the sensitive word speech segment, wherein the desensitization method includes information desensitization and sensitive word desensitization. If the desensitization method is information desensitization, the amplitude spectrum of the speech frame of the specified number of frames after the sensitive word speech segment, or the amplitude spectrum of each speech frame in the sensitive word speech segment and the amplitude spectrum of the speech frame of the specified number of frames after the sensitive word speech segment are desensitized; if the desensitization method is sensitive word desensitization, the amplitude spectrum of each speech frame in the sensitive word speech segment is desensitized. It should be noted that the condition for locating a sensitive word speech segment can be that the speech segment is determined to be a sensitive speech segment based on the proportion of sensitive speech frames in multiple speech frames reaching a preset proportion, or the speech segment is determined to be a sensitive speech segment based on the number of consecutive sensitive speech frames reaching a preset number of frames. The embodiment of the present invention does not limit this. The desensitization method of the speech segment can be determined based on the correspondence between the preset speech segment amplitude spectrum and the desensitization method, and the speech segment amplitude spectrum can also be input into the desensitization method classification model, and the classification model outputs the desensitization method. The embodiment of the present invention does not limit this.
[0089] Based on the above embodiments, Figure 3 FIG. 1 is a flow chart of the method for determining sensitive speech segments provided by the present invention. Figure 3 As shown, in step 131, based on the voice mask of each voice frame, the sensitive word voice segment is located from the voice data, including:
[0090] Step 310, determining in the voice data, a voice frame whose voice mask is less than a preset voice mask threshold as a sensitive word voice frame;
[0091] Considering that the smaller the amplitude value of the amplitude spectrum is, the smaller the sound intensity is, in order to eliminate sensitive speech, it is necessary to eliminate the sensitive speech from the speech data, that is, it is necessary to change the amplitude value in the amplitude spectrum of the sensitive speech to 0 or close to 0. Therefore, a speech mask threshold is preset to distinguish between general speech and sensitive speech. Since sensitive speech is the language that needs to be muted, the speech mask of sensitive speech must be 0 or close to 0. Therefore, by setting a preset speech mask threshold and comparing the preset speech mask threshold with the speech mask, sensitive word speech frames can be screened out from each speech frame of the speech data.
[0092] Specifically, in the voice data, voice frames with a value less than a preset voice mask threshold are determined as sensitive word voice frames. It should be noted that the value of the voice mask can be the length of a vector or the mean of each element in the vector, which is not limited in the embodiment of the present invention.
[0093] Step 320: taking a plurality of continuous sensitive word speech frames whose frame number is greater than a preset frame number threshold as a sensitive word speech segment.
[0094] Considering that a single frame contains less data information, the sensitive speech detection model may be falsely triggered, and sensitive words will have a certain duration. Therefore, speech segments that are less than a preset number of frames can be considered false triggers.
[0095] Specifically, a plurality of continuous sensitive word speech frames whose frame number is greater than a preset frame number threshold can be regarded as a sensitive word speech segment. It should be noted that when processing frame by frame, if a sensitive word speech frame is detected after a general speech frame, the frame is regarded as the starting point, and a general speech frame is detected after the starting point as the end point. If the number of frames in the speech segment interval from the starting point to the end point (excluding the end point) is greater than the preset frame number threshold, the speech segment is a sensitive word speech segment.
[0096] Based on the above embodiments, Figure 4 : is a flow chart of determining a method for desensitizing a sensitive word speech segment provided by the present invention, such as Figure 4 As shown, a method for determining a sensitive word speech segment desensitization method provided by an embodiment of the present invention includes:
[0097] Step 410, intercepting a preset number of speech frames from the end of the sensitive word speech segment forward as the speech segment to be classified;
[0098] Considering the need to ensure the real-time performance of speech desensitization, the embodiment of the present invention intercepts a segment of speech frames from the tail of the sensitive word speech segment forward as the speech segment to be classified. At the same time, considering that the number of frames of the sample speech segment is fixed in order to facilitate the training of the speech classification model in step 420, the length of the predicted speech segment is also fixed to be the same as the number of frames of the sample speech segment.
[0099] It should be noted that the tail of the sensitive word speech segment is the last speech frame of the sensitive word speech segment; the preset number of intercepted speech frames can be set according to the requirements of the speech classification model in step 420.
[0100] Step 420, input the speech segment to be classified into a speech classification model to obtain a desensitization method of the sensitive word speech segment output by the speech classification model;
[0101] The speech classification model is trained based on sample sensitive word speech segments and their desensitization method labels.
[0102] Specifically, the speech segment to be classified obtained in step 410 is input into a speech classification model trained by sample sensitive word speech segments and their desensitization method labels, and the model predicts and outputs the desensitization method of the speech segment to be classified, so that the subsequent part can desensitize the speech data according to the desensitization method.
[0103] The method provided by the embodiment of the present invention intercepts a preset number of speech frames from the tail of the sensitive word speech segment to the front for determining the desensitization method, which helps to ensure the real-time processing efficiency of the sensitive information monitoring model without causing delay.
[0104] Based on the above embodiment, the sample sensitive word speech is obtained by adding noise to the original sensitive word speech based on the sample noise, and the sensitive mask is determined based on the amplitude spectrum of the sample noise and the amplitude spectrum of the original sensitive word speech.
[0105] Considering that sensitive words may appear in various environments, in order to train the sensitive speech model more accurately, it is necessary to simulate the appearance of sensitive words in a noisy environment. In the embodiment of the present invention, the original sensitive word speech is subjected to noise processing.
[0106] For the sample sensitive word speech obtained by the noise adding process, since the sample sensitive word speech is no longer a pure sensitive word speech, the corresponding sensitive mask also needs to be determined based on the amplitude spectrum of the sample noise and the amplitude spectrum of the original sensitive word speech.
[0107] For example, the sensitive mask can be determined by the following formula:
[0108]
[0109] Among them, S is the sensitive word speech amplitude spectrum, and N is the background noise speech amplitude spectrum. The loss function of the model training is the MSE (Mean Square Error) loss function, which is used to reduce the error between the predicted speech mask and the real speech mask.
[0110] Based on the above embodiments, Figure 5 This is a second flow chart of the method for speech desensitization provided by the present invention, such as Figure 5 As shown, a speech desensitization method provided by an embodiment of the present invention includes:
[0111] Step 510, performing sliding window framing on the speech to obtain a speech frame set of speech data;
[0112] Step 520, performing STFT (Short-time Fourier transform) on each speech frame in the speech frame set to obtain an amplitude spectrum of each speech frame;
[0113] Step 530: Input the amplitude spectrum of each frame of speech into the sensitive speech detection model frame by frame to obtain the speech mask of each frame. The speech mask of each frame of general speech is close to 1. Sensitive words or speech similar to sensitive words will have a speech mask close to 0, and determine the sensitive word speech segment according to steps 310 and 320;
[0114] Step 540, post-processing the sensitive word speech segment, may include directly multiplying the speech mask in the sensitive word speech segment by the original STFT amplitude spectrum corresponding to the speech mask, obtaining the STFT amplitude spectrum with the sensitive word eliminated and only the background sound retained, and then using ISTFT (Inverse Short-Time Fourier Transformation, short-time Fourier inverse transform) to inversely transform back to speech data, which can naturally filter the sensitive words; or, according to the detected time endpoints before and after the sensitive word, directly pre-processing the sensitive word, such as replacing it with muted audio, etc., and further processing the complex sensitive information that may appear after the sensitive word, for example, to prevent the sensitive word from being too long and affecting the comparison efficiency, a short sensitive word may be set, and after the sensitive word ends, the audio sub-frame with a duration of 1s after the end frame is replaced, and the silent frame with a duration of 1s prepared in advance is replaced with the original sub-frame with a duration of 1s after the end frame, so as to achieve a silent effect for the audio in this period of time, so as to achieve the purpose of actively hiding the sensitive word and the sensitive information after the sensitive word.
[0115] A speech desensitization method provided by an embodiment of the present invention applies a sensitive speech detection model to perform sensitive speech detection on the amplitude spectrum of an input speech frame to locate sensitive information in the speech data, thereby realizing speech desensitization. In this process, there is no process of converting speech to text, thereby avoiding the problems of easy leakage of sensitive information caused by speech transcription, excessive elimination of speech, and low transcription efficiency and recognition rate, thereby realizing real-time and accurate speech desensitization.
[0116] Based on the above embodiments, Figure 6 The training method of the sensitive speech detection model provided by the present invention is as follows: Figure 6 As shown, an embodiment of the present invention provides a training method for a sensitive speech detection model, comprising:
[0117] Step 610, performing sliding window frame processing on the original speech and performing STFT transformation. For example, for speech data with a sampling rate of 16k, the frame window length is 1024, the window shift is 512, and STFT transformation is performed to obtain the amplitude spectrum, and each frame of speech is converted into a 513-dimensional frequency domain feature vector;
[0118] Step 620, input the amplitude spectrum and label of each frame of the original speech into the initial sensitive speech detection model frame by frame, and output the corresponding speech mask. For general speech data, the output speech mask values are all 1. The speech mask multiplied by the original speech amplitude spectrum will not change the value of the amplitude spectrum, that is, the general speech will not be modified; for sensitive word speech data, the speech data will be randomly noise-processed to simulate the scene where sensitive words appear in a complex environment. The model inputs the amplitude spectrum of the sensitive word speech after noise addition, and the output speech mask is multiplied by the amplitude spectrum after noise addition to obtain the amplitude spectrum of the original noise. In other words, the speech mask only blocks the sensitive word component, while retaining the original background sound as much as possible. The formula for obtaining the speech mask as the model output training label is as follows:
[0119]
[0120] Among them, S is the sensitive word speech amplitude spectrum, and N is the background noise speech amplitude spectrum. The loss function of the model training is the MSE loss function, which is used to reduce the error between the predicted speech mask and the real speech mask.
[0121] At the same time, in order to improve the detection effect of the sensitive speech detection model, the labels trained by the sensitive speech detection model are delayed by several frames, which is equivalent to giving the classification results of the historical frames at the current frame time. In this way, even if the model does not have a right field of view, the given historical frame results are still equivalent to having a part of the right field of view (that is, the part from the historical frame features to the current frame features). For the CNN model, both sides of the field of view exist. Figure 7 Schematic diagram of the processing flow of the sensitive speech detection model provided by the present invention, such as Figure 7 As shown:
[0122] Assuming the delay is 2 frames, that is, 64ms, when the second speech frame is input, the sensitive speech detection model outputs the 0th speech frame, and then the training convergence is carried out through the MSE loss function. After completing the training of all frames, the delay alignment label number is performed.
[0123] The speech desensitization device provided by the present invention is described below. The speech desensitization device described below and the speech desensitization method described above can be referenced to each other.
[0124] Figure 8 : is a schematic diagram of the structure of the speech desensitization device provided by the present invention, such as Figure 8 As shown, the device includes: a determination module 810, a prediction module 820, and an elimination module 830.
[0125] in,
[0126] A determination module 810, used to determine the voice data to be desensitized;
[0127] The prediction module 820 is used to input the amplitude spectrum of each speech frame in the speech data into the sensitive speech detection model to obtain the speech mask of each speech frame output by the sensitive speech detection model; the sensitive speech detection model is trained based on the sample common speech and the common mask of each sample speech frame therein, and the sample sensitive word speech and the sensitive mask of each sample speech frame therein;
[0128] The elimination module 830 is used to eliminate sensitive information in the speech data based on the speech mask of each speech frame.
[0129] In an embodiment of the present invention, a determination module 810 is used to determine the speech data to be desensitized; a prediction module 820 is used to input the amplitude spectrum of each speech frame in the speech data into a sensitive speech detection model to obtain a speech mask for each speech frame output by the sensitive speech detection model; the sensitive speech detection model is trained based on sample general speech and the general mask of each sample speech frame therein, and sample sensitive word speech and the sensitive mask of each sample speech frame therein; an elimination module 830 is used to eliminate sensitive information in the speech data based on the speech mask of each speech frame, thereby realizing the use of the sensitive speech detection model to output a speech mask based on the amplitude spectrum of the input speech frame to locate the sensitive word, and desensitize the sensitive word, thereby reducing the process of converting between speech and text, improving recognition efficiency, overcoming the problems of easy leakage of sensitive information or excessive elimination of speech, as well as low efficiency and recognition rate, and realizing real-time and accurate desensitization of speech.
[0130] Based on any of the above embodiments, the prediction module 820 includes:
[0131] The streaming prediction submodule is used to input the amplitude spectrum of each speech frame in the speech data into the sensitive speech detection model frame by frame, and obtain the speech mask of each speech frame output by the sensitive speech detection model frame by frame;
[0132] Among them, the input speech frame and the output speech frame at the same time differ by a preset number of frames, the input speech frame is the speech frame corresponding to the amplitude spectrum of the input sensitive speech detection model, and the output speech frame is the speech frame corresponding to the speech mask output from the sensitive speech detection model.
[0133] Based on any of the above embodiments, the streaming prediction submodule inputs the amplitude spectrum of each speech frame in the speech data into the sensitive speech detection model frame by frame to obtain the speech mask of each speech frame output by the sensitive speech detection model frame by frame, including:
[0134] The amplitude spectrum of each speech frame in the speech data is input into the sensitive speech detection model frame by frame. The sensitive speech detection model encodes the state vector of each speech frame based on the amplitude spectrum of each speech frame, the amplitude spectrum of a preset number of consecutive speech frames after each speech frame, and the state vector of the frame before each speech frame. Sensitive speech detection is performed based on the state vector of each speech frame to obtain the speech mask of each speech frame output by the sensitive speech detection model frame by frame.
[0135] Based on any of the above embodiments, the elimination module 830 includes:
[0136] A desensitization submodule is used to perform desensitization processing on the amplitude spectrum of each speech frame in the speech data based on the speech mask of each speech frame to obtain desensitized amplitude spectrum data;
[0137] The inverse transformation submodule is used to perform an inverse transformation on the desensitized amplitude spectrum data to obtain the desensitized speech data.
[0138] Based on any of the above embodiments, the desensitization submodule includes:
[0139] A positioning submodule, which is used to locate sensitive word speech segments from the speech data based on the speech mask of each speech frame, and determine the desensitization method of each sensitive word speech segment;
[0140] A desensitization processing submodule, for performing desensitization processing on the amplitude spectrum of the speech frames of the specified number of frames after the sensitive word speech segment, or on the amplitude spectrum of each speech frame in the sensitive word speech segment and the amplitude spectrum of the speech frames of the specified number of frames after the sensitive word speech segment if the desensitization mode is information desensitization;
[0141] If the desensitization method is sensitive word desensitization, the amplitude spectrum of each speech frame in the sensitive word speech segment is desensitized.
[0142] Based on any of the above embodiments, the positioning submodule includes:
[0143] A sensitive frame determination submodule, used to determine, in the voice data, a voice frame whose voice mask is less than a preset voice mask threshold as a sensitive word voice frame;
[0144] The sensitive speech segment determination submodule is used to take a plurality of consecutive sensitive word speech frames whose frame number is greater than a preset frame number threshold as a sensitive word speech segment.
[0145] Based on any of the above embodiments, the positioning submodule further includes:
[0146] Determine a speech segment submodule to be classified, which is used to intercept a preset number of speech frames from the tail of the sensitive word speech segment forward as the speech segment to be classified;
[0147] A method prediction submodule is used to input the speech segment to be classified into the speech classification model to obtain the desensitization method of the sensitive word speech segment output by the speech classification model;
[0148] Classification model training module, used for speech classification model training based on sample sensitive word speech segments and their desensitization method labels
[0149] Based on any of the above embodiments, in the prediction module 820, the sample sensitive word speech is obtained by adding noise to the original sensitive word speech based on the sample noise, and the sensitive mask is determined based on the amplitude spectrum of the sample noise and the amplitude spectrum of the original sensitive word speech.
[0150] Fig. 9 An example of a physical structure diagram of an electronic device is shown in FIG. Fig. 9 As shown, the electronic device may include: a processor 910, a communication interface 920, a memory 930 and a communication bus 940, wherein the processor 910, the communication interface 920 and the memory 930 communicate with each other through the communication bus 940. The processor 910 may call the logic instructions in the memory 930 to execute the voice desensitization method, which includes: determining the voice data to be desensitized; inputting the amplitude spectrum of each voice frame in the voice data into the sensitive voice detection model to obtain the voice mask of each voice frame output by the sensitive voice detection model; the sensitive voice detection model is trained based on the sample general voice and the general mask of each sample voice frame, and the sample sensitive word voice and the sensitive mask of each sample voice frame; based on the voice mask of each voice frame, the sensitive information in the voice data is eliminated.
[0151] In addition, the logic instructions in the above-mentioned memory 930 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0152] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the speech desensitization method provided by the above methods, which includes: determining the speech data to be desensitized; inputting the amplitude spectrum of each speech frame in the speech data into a sensitive speech detection model to obtain a speech mask for each speech frame output by the sensitive speech detection model; the sensitive speech detection model is trained based on sample general speech and the general mask of each sample speech frame therein, and sample sensitive word speech and the sensitive mask of each sample speech frame therein; based on the speech mask of each speech frame, eliminating sensitive information in the speech data.
[0153] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the speech desensitization method provided by the above-mentioned methods, the method comprising: determining the speech data to be desensitized; inputting the amplitude spectrum of each speech frame in the speech data into a sensitive speech detection model to obtain a speech mask for each speech frame output by the sensitive speech detection model; the sensitive speech detection model is trained based on sample general speech and the general mask of each sample speech frame therein, and sample sensitive word speech and the sensitive mask of each sample speech frame therein; based on the speech mask of each speech frame, eliminating sensitive information in the speech data.
[0154] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0155] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0156] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A speech desensitization method, characterized in that: include: Determine the voice data to be desensitized; Inputting the amplitude spectrum of each speech frame in the speech data into a sensitive speech detection model to obtain a speech mask of each speech frame output by the sensitive speech detection model; The sensitive speech detection model is trained based on the sample general speech and the general mask of each sample speech frame, and the sample sensitive word speech and the sensitive mask of each sample speech frame; Eliminating sensitive information in the voice data based on the voice mask of each voice frame; The method of eliminating sensitive information in the voice data based on the voice mask of each voice frame includes: Based on the voice mask of each voice frame, sensitive word voice segments are located from the voice data, and a desensitization method for each sensitive word voice segment is determined; the voice mask of each voice frame is a judgment label used to characterize whether each voice frame is a voice frame containing sensitive information; If the desensitization method is information desensitization, desensitization is performed on the amplitude spectrum of the speech frames of the specified number of frames after the sensitive word speech segment, or on the amplitude spectrum of each speech frame in the sensitive word speech segment and the amplitude spectrum of the speech frames of the specified number of frames after the sensitive word speech segment; If the desensitization method is sensitive word desensitization, desensitization processing is performed on the amplitude spectrum of each speech frame in the sensitive word speech segment; The desensitized amplitude spectrum data is inversely transformed to obtain the desensitized speech data.
2. The speech desensitization method according to claim 1, characterized in that: The step of inputting the amplitude spectrum of each speech frame in the speech data into a sensitive speech detection model to obtain a speech mask of each speech frame output by the sensitive speech detection model comprises: Inputting the amplitude spectrum of each speech frame in the speech data into the sensitive speech detection model frame by frame, and obtaining the speech mask of each speech frame output by the sensitive speech detection model frame by frame; Among them, the input speech frame and the output speech frame at the same moment differ by a preset number of frames, the input speech frame is the speech frame corresponding to the amplitude spectrum input into the sensitive speech detection model, and the output speech frame is the speech frame corresponding to the speech mask output from the sensitive speech detection model.
3. The speech desensitization method according to claim 2, characterized in that: The step of inputting the amplitude spectrum of each speech frame in the speech data to the sensitive speech detection model frame by frame to obtain the speech mask of each speech frame output by the sensitive speech detection model frame by frame includes: The amplitude spectrum of each speech frame in the speech data is input into the sensitive speech detection model frame by frame. The sensitive speech detection model encodes the state vector of each speech frame based on the amplitude spectrum of each speech frame, the amplitude spectrum of a preset number of consecutive speech frames after each speech frame, and the state vector of a frame before each speech frame, and performs sensitive speech detection based on the state vector of each speech frame to obtain the speech mask of each speech frame output by the sensitive speech detection model frame by frame.
4. The speech desensitization method according to claim 1, wherein the sensitive word speech segment is located from the speech data based on the speech mask of each speech frame, comprising: Determine, in the voice data, a voice frame whose voice mask is less than a preset voice mask threshold as a sensitive word voice frame; A plurality of continuous sensitive word speech frames whose frame number is greater than a preset frame number threshold is regarded as a sensitive word speech segment.
5. According to the speech desensitization method of claim 1, the step of determining the desensitization method of each sensitive word speech segment comprises: A preset number of speech frames are intercepted from the end of the sensitive word speech segment to serve as the speech segment to be classified; Inputting the speech segment to be classified into a speech classification model to obtain a desensitization method of the sensitive word speech segment output by the speech classification model; The speech classification model is trained based on sample sensitive word speech segments and their desensitization method labels.
6. According to the speech desensitization method according to any one of claims 1 to 5, the sample sensitive word speech is obtained by adding noise to the original sensitive word speech based on sample noise, and the sensitive mask is determined based on the amplitude spectrum of the sample noise and the amplitude spectrum of the original sensitive word speech.
7. A speech desensitization device, characterized in that: include: A determination module, used to determine the voice data to be desensitized; A prediction module, used for inputting the amplitude spectrum of each speech frame in the speech data into a sensitive speech detection model to obtain a speech mask of each speech frame output by the sensitive speech detection model; The sensitive speech detection model is trained based on the sample general speech and the general mask of each sample speech frame, and the sample sensitive word speech and the sensitive mask of each sample speech frame; An elimination module, configured to eliminate sensitive information in the speech data based on the speech mask of each speech frame; The elimination module is specifically used for: Based on the voice mask of each voice frame, sensitive word voice segments are located from the voice data, and a desensitization method for each sensitive word voice segment is determined; the voice mask of each voice frame is a judgment label used to characterize whether each voice frame is a voice frame containing sensitive information; If the desensitization method is information desensitization, desensitization is performed on the amplitude spectrum of the speech frames of the specified number of frames after the sensitive word speech segment, or on the amplitude spectrum of each speech frame in the sensitive word speech segment and the amplitude spectrum of the speech frames of the specified number of frames after the sensitive word speech segment; If the desensitization method is sensitive word desensitization, desensitization processing is performed on the amplitude spectrum of each speech frame in the sensitive word speech segment; The desensitized amplitude spectrum data is inversely transformed to obtain the desensitized speech data.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the speech desensitization method as described in any one of claims 1 to 6 are implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the speech desensitization method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Voice sensitive information detecting and filtering method based on unspecified people
CN105006230A
Sensitive content identification method, device and terminal based on voice analysis and medium
CN109637520A
Reverberation elimination method and device, computer equipment and storage medium
CN111312273A