Sensitive speech processing method and related device

Through the methods of speech noise reduction processing, text conversion, sensitive type recognition and desensitization strategies, the problem of difficult to eliminate sensitive information in speech information is solved, and efficient and accurate speech desensitization processing is achieved.

CN119446147APending Publication Date: 2025-02-14BANK OF CHINA
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411528210.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

How to effectively eliminate sensitive information in voice information, especially when the way voice propagation is more easily overlooked, leads to a wider impact.

Method used

By obtaining voice information, performing speech noise reduction processing and converting it into text, determining the sensitive type of text, selecting appropriate desensitization strategies based on this type, desensitizing the text, and finally converting the desensitization text back to voice to eliminate sensitivity information.

Benefits of technology

It realizes the accurate elimination of sensitive information in voice information, improves the accuracy and effectiveness of desensitization operations, and ensures the safety of voice propagation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119446147A_ABST
    Figure CN119446147A_ABST
Patent Text Reader

Abstract

The invention provides a sensitive speech processing method and a related device, which can be applied to the field of artificial intelligence or finance. The method comprises the following steps: after acquiring voice information, converting the voice information into a target text, determining a sensitive type corresponding to the target text, determining a target strategy for desensitizing the target text based on the sensitive type, desensitizing the target text by using the target strategy to obtain a desensitized text, and sending the desensitized text to a user. Therefore, sensitive information in the voice is eliminated. And during desensitization, the determined target strategy is matched with the sensitive type corresponding to the target text, so that the accuracy of desensitization strategy determination is high, and the accuracy of desensitization operation is improved. In addition, in the application, voice noise reduction processing is performed on the voice information, the noise influence is eliminated, and the accuracy of converting the voice into the text is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of financial technology, and in particular to a sensitive speech processing method and related devices. Background Art

[0002] With the rapid development of the Internet, it has become very easy to spread highly sensitive information on the Internet. While the Internet provides a large amount of learning materials for young people, it also brings harm to their healthy growth that cannot be ignored.

[0003] At present, in addition to embedding sensitive information in text for dissemination, it can also be disseminated through voice carrying sensitive information. Voice dissemination is more likely to be ignored, thus causing a wider impact. So how to eliminate sensitive information in voice information is a technical problem that technicians in this field need to solve urgently. Summary of the invention

[0004] In view of the above problems, the present application provides a sensitive voice processing method and related devices to achieve the purpose of eliminating sensitive information in voice information. The specific scheme is as follows: The first aspect of the present application provides a sensitive speech processing method, comprising: Acquire speech information to be processed, perform speech noise reduction processing on the speech information, and obtain target speech; Converting the target speech into target text; Determine a sensitive type corresponding to the target text; the sensitive type includes at least one of a non-sensitive voice and a plurality of preset sensitive voices; Based on the sensitive type, determining a target strategy for desensitizing the target text; Performing desensitization processing on the target text using the target strategy to obtain a desensitized text; The desensitized text is converted into corresponding speech.

[0005] In a possible implementation, converting the target speech into a target text includes: Performing a preprocessing operation on the target speech to obtain a designated speech; the preprocessing operation includes: pre-emphasis, framing and windowing operations; Performing a speech signal feature extraction operation on the specified speech to obtain a static speech feature; Performing differential processing on the static speech features to obtain dynamic speech features; The static speech feature and the dynamic speech feature are used to perform a speech decoding operation on the designated speech to obtain a target text.

[0006] In a possible implementation, determining the sensitive type corresponding to the target text includes: Inputting the target text into a sensitive type determination model to obtain a sensitive type; The training process of the sensitive type determination model includes: Get the pre-configured sensitive word library; Determining sensitive sentences including sensitive words in the sensitive word library; The polynomial naive Bayes model is trained using the sensitive sentences and the sensitive types of the sensitive words in the sensitive sentences to obtain a sensitive type determination model.

[0007] In a possible implementation, determining a target strategy for desensitizing the target text based on the sensitive type includes: In a case where the sensitive type is at least one of a plurality of preset sensitive voices, selecting a desensitization strategy corresponding to the sensitive type from pre-configured desensitization strategies as a target strategy; or, Use each desensitization strategy to perform a desensitization identification operation on the target text to obtain the number of identified sensitive words, and use the desensitization strategy with the largest number of corresponding sensitive words as the target strategy.

[0008] In a possible implementation, desensitizing the target text using the target strategy to obtain the desensitized text includes: Performing a stop word removal operation on the target text to obtain a text to be processed; Searching the text to be processed in the sensitive word tree corresponding to the target strategy to obtain sensitive words; The sensitive words are replaced with preset words to obtain desensitized text.

[0009] In a possible implementation, performing speech noise reduction processing on the speech information to obtain a target speech includes: Performing speech noise reduction processing on the speech information using spectral subtraction to obtain initial speech; The initial speech is subjected to speech noise reduction processing using a wavelet transform algorithm to obtain a target speech.

[0010] A second aspect of the present application provides a sensitive speech processing device, comprising: A speech noise reduction module is used to obtain speech information to be processed, perform speech noise reduction processing on the speech information, and obtain a target speech; A speech processing module, used for converting the target speech into a target text; A type determination module, used to determine the sensitive type corresponding to the target text; the sensitive type includes at least one of non-sensitive voice and multiple preset sensitive voices; A strategy determination module, used to determine a target strategy for desensitizing the target text based on the sensitive type; A desensitization processing module, used to perform desensitization processing on the target text using the target strategy to obtain a desensitized text; The speech conversion module is used to convert the desensitized text into corresponding speech.

[0011] A third aspect of the present application provides a computer program product, comprising computer-readable instructions, which, when executed on an electronic device, enables the electronic device to implement the above-mentioned sensitive speech processing method.

[0012] A fourth aspect of the present application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the above-mentioned sensitive voice processing method.

[0013] A fifth aspect of the present application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the above-mentioned sensitive speech processing method.

[0014] By means of the above technical scheme, the present application provides a sensitive speech processing method and related devices. In the present application, after acquiring the voice information, it is converted into a target text, the sensitive type corresponding to the target text is determined, and based on the sensitive type, a target strategy for desensitizing the target text is determined, and the target text is desensitized using the target strategy to obtain a desensitized text to eliminate sensitive information in the speech. And when desensitizing, the present application determines that the target strategy matches the sensitive type corresponding to the target text, so that the accuracy of the desensitization strategy is high, thereby improving the accuracy of the desensitization operation. In addition, in the present application, the voice information is subjected to voice noise reduction processing to eliminate the influence of noise and improve the accuracy of voice conversion to text. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0016] Figure 1 A schematic diagram of a system architecture provided for this application; Figure 2 A schematic diagram of a terminal structure provided for this application; Figure 3 A schematic diagram of a server structure provided for this application; Figure 4 A flowchart of a sensitive speech processing method provided for this application; Figure 5 A network structure diagram of a naive Bayes model provided for this application; Figure 6 A schematic diagram of the training and application of a naive Bayes model provided for this application; Figure 7 A desensitization schematic diagram provided for this application; Figure 8 A schematic diagram of the structure of a PaddlePaddle model provided in this application; Fig. 9 A structural diagram of a sensitive speech processing device provided in this application; Fig.10 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION

[0017] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.

[0018] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0019] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0020] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0021] See also Figure 1 , Figure 1 A schematic diagram of a system architecture is shown. The system may include a terminal 100 and a server 200. The server 200 may include one or more servers ( Figure 1 In the example, a server is included, and the server 200 can provide the method provided in the embodiment of the present application for one or more terminals.

[0022] Among them, the terminal 100 can obtain the user voice and send the user voice to the server 200. The server 200 can perform desensitization processing based on the received voice, obtain the processing result, and return the processing result to the terminal 100.

[0023] It should be understood that in some optional implementations, the terminal 100 can also perform desensitization processing on the received voice by itself without the need for cooperation from the server, and the embodiments of the present application are not limited thereto.

[0024] Next describe Figure 1 The product form of the mid-terminal 100; The terminal 100 in the embodiment of the present application can be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc., and the embodiment of the present application does not impose any limitation on this.

[0025] Figure 2 An optional hardware structure diagram of the terminal 100 is shown.

[0026] refer to Figure 2As shown, the terminal 100 may include a radio frequency unit 110, a memory 120, an input unit 130, a display unit 140, a camera 150 (optional), an audio circuit 160 (optional), a speaker 161 (optional), a microphone 162 (optional), an earphone jack 163 (optional), a processor 170, an external interface 180, a power supply 190 and other components. Those skilled in the art will appreciate that Figure 2 These are merely examples of terminals or multi-function devices and do not constitute limitations on the terminals or multi-function devices, which may include more or fewer components than those shown in the figures, or combinations of certain components, or different components.

[0027] The input unit 130 can be used to receive input digital or character information, and generate key signal input related to the user settings and function control of the portable multifunctional device. Specifically, the input unit 130 may include a touch screen 131 (optional) and / or other input devices 132. The touch screen 131 can collect the user's touch operations on or near it (such as the user's operation on or near the touch screen using any suitable object such as fingers, joints, stylus, etc.), and drive the corresponding connection device according to a pre-set program. The touch screen can detect the user's touch action on the touch screen, convert the touch action into a touch signal and send it to the processor 170, and can receive and execute the command sent by the processor 170; the touch signal at least includes the touch point coordinate information. The touch screen 131 can provide an input interface and an output interface between the terminal 100 and the user. In addition, the touch screen can be implemented using multiple types such as resistive, capacitive, infrared and surface acoustic wave. In addition to the touch screen 131, the input unit 130 can also include other input devices. Specifically, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, and the like.

[0028] Among them, the input device 132 can receive input data and the like.

[0029] The display unit 140 can be used to display information input by the user or information provided to the user, various menus of the terminal 100, interactive interfaces, file displays and / or playback of any multimedia files. In an embodiment of the present application, the display unit 140 can be used to display a voice desensitization interface, processing results, etc.

[0030] The memory 120 can be used to store instructions and data. The memory 120 can mainly include an instruction storage area and a data storage area. The data storage area can store various data, such as multimedia files, texts, etc.; the instruction storage area can store software units such as operating systems, applications, instructions required for at least one function, or their subsets and extensions. It can also include a non-volatile random access memory; provide the processor 170 with hardware, software and data resources including management of computing and processing equipment, and support control software and applications. It is also used for the storage of multimedia files, and the storage of running programs and applications.

[0031] The processor 170 is the control center of the terminal 100. It uses various interfaces and lines to connect various parts of the entire terminal 100. By running or executing instructions stored in the memory 120 and calling data stored in the memory 120, it executes various functions of the terminal 100 and processes data, thereby controlling the terminal device as a whole. Optionally, the processor 170 may include one or more processing units; preferably, the processor 170 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application program, and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 170. In some embodiments, the processor and the memory may be implemented on a single chip, and in some embodiments, they may also be implemented separately on separate chips. The processor 170 may also be used to generate corresponding operation control signals, send them to corresponding components of the computing and processing device, read and process data in the software, especially read and process data and programs in the memory 120, so that each functional module therein performs corresponding functions, thereby controlling the corresponding components to act according to the requirements of the instructions.

[0032] Among them, the memory 120 can be used to store software codes related to the sensitive voice processing method, the processor 170 can execute the steps of the sensitive voice processing method, and can also schedule other units (such as the above-mentioned input unit 130 and display unit 140) to achieve corresponding functions.

[0033] The radio frequency unit 110 (optional) can be used for receiving and sending information or receiving and sending signals during a call, for example, after receiving the downlink information of the base station, it is sent to the processor 170 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, etc. In addition, the radio frequency unit 110 can also communicate with network devices and other devices through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (Global System of Mobile communication, GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE), email, Short Messaging Service (SMS), etc.

[0034] In this embodiment of the present application, the RF unit 110 can send data to the server 200 and receive processing results sent by the server 200.

[0035] It should be understood that the radio frequency unit 110 is optional and can be replaced by other communication interfaces, such as a network port.

[0036] The terminal 100 also includes a power supply 190 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 170 through a power management system, so that the power management system can manage functions such as charging, discharging, and power consumption.

[0037] The terminal 100 further includes an external interface 180 , which may be a standard Micro USB interface or a multi-pin connector, and may be used to connect the terminal 100 to communicate with other devices, or to connect a charger to charge the terminal 100 .

[0038] Although not shown, the terminal 100 may also include a flashlight, a wireless fidelity (WiFi) module, a Bluetooth module, sensors with different functions, etc., which are not described in detail here. Some or all of the methods described below may be applied in the following embodiments. Figure 2 In the terminal 100 shown.

[0039] Next describe Figure 1 The product form of the server 200; Figure 3 A structural diagram of a server 200 is provided, such as Figure 3 As shown, the server 200 includes a bus 201, a processor 202, a communication interface 203, and a memory 204. The processor 202, the memory 204, and the communication interface 203 communicate with each other via the bus 201.

[0040] The bus 201 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0041] The processor 202 may be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0042] The memory 204 may include a volatile memory, such as a random access memory (RAM). The memory 204 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard drive (HDD), or a solid state drive (SSD).

[0043] The memory 204 may be used to store software codes related to the sensitive voice processing method, and the processor 202 may execute the steps of the sensitive voice processing method of the chip, and may also schedule other units to implement corresponding functions.

[0044] It should be understood that the above-mentioned terminal 100 and server 200 can be centralized or distributed devices, and the processors in the above-mentioned terminal 100 and server 200 (such as processor 170 and processor 202) can be hardware circuits (such as application specific integrated circuit (ASIC), field-programmable gate array (FPGA), general-purpose processor, digital signal processor (DSP), microprocessor or microcontroller, etc.), or a combination of these hardware circuits. For example, the processor can be a hardware system with an instruction execution function, such as a CPU, DSP, etc., or a hardware system without an instruction execution function, such as an ASIC, FPGA, etc., or a combination of the above-mentioned hardware systems without an instruction execution function and hardware systems with an instruction execution function.

[0045] With the rapid development of the Internet, it has become very easy to spread highly sensitive information on the Internet. While the Internet provides a large amount of learning materials for young people, it also brings harm to their healthy growth that cannot be ignored.

[0046] At present, in addition to embedding sensitive information in text for dissemination, sensitive information can also be disseminated through voice carrying sensitive information. Voice dissemination methods (such as voice live broadcast) are more easily ignored, and the impact will be more extensive. Therefore, it is necessary to use technical means to prevent the spread of these sensitive audios. Then how to eliminate sensitive information in voice information is a technical problem that technical personnel in this field urgently need to solve.

[0047] In order to solve this problem, the voice can be subjected to sensitivity detection to determine the sensitive type, and then a target strategy matching the sensitive type is selected for desensitization processing to eliminate sensitive information in the voice. In addition, in the present invention, when determining the target strategy, a plurality of desensitization strategies are pre-configured to select a suitable target strategy from them, so that the selection range is wider and the accuracy of the final selected strategy is higher.

[0048] Furthermore, in order to be able to identify sensitive types, it is necessary to convert the speech into text in advance and perform noise reduction processing before the conversion to ensure the accuracy of speech-to-text conversion, and then use the text for sensitive type identification.

[0049] Furthermore, in order to improve the recognition accuracy when identifying sensitive types, the present invention can be implemented based on a naive Bayes model. The model is obtained through a large number of sample training. Using this model for sensitive type recognition can improve the accuracy. Furthermore, in order to avoid the recognition probability of feature words that do not appear in the training sample set being zero, the naive Bayes is improved, and a polynomial naive Bayes model is used to ensure that the probability of feature words that do not appear in the recognition result is a small value rather than zero.

[0050] On the basis of the above content, the present application provides a sensitive speech processing method and related devices. In the present application, after acquiring the voice information, it is converted into a target text, the sensitive type corresponding to the target text is determined, and based on the sensitive type, the target strategy for desensitizing the target text is determined, and the target text is desensitized using the target strategy to obtain a desensitized text to eliminate sensitive information in the speech. And when desensitizing, the present application determines that the target strategy matches the sensitive type corresponding to the target text, so that the accuracy of the desensitization strategy is high, and the accuracy of the desensitization operation is improved. In addition, in the present application, the voice information is subjected to voice noise reduction processing to eliminate the influence of noise and improve the accuracy of voice conversion to text.

[0051] It should be noted that the sensitive speech processing method and related device provided by the present invention can be used in the field of artificial intelligence or finance. The above is only an example and does not limit the application field of the sensitive speech processing method and related device provided by the present invention.

[0052] In order to solve the above problems, the embodiment of the present application provides a sensitive voice processing method. The execution subject of the sensitive voice processing method can be the terminal 100 or the server 200 mentioned above. When it is the terminal 100, the terminal 100 can receive the user voice and perform desensitization processing on it. When it is the server 200, the terminal 100 can send the received user voice to the server 200, so that the server 200 performs desensitization processing on the voice. The server 200 can also receive the user voice collected by itself and perform desensitization processing on it.

[0053] The following is a detailed description of the sensitive speech processing method of the embodiment of the present application in conjunction with the accompanying drawings. Figure 4 , Figure 4 A flow chart of a sensitive speech processing method provided in an embodiment of the present application is shown as follows: Figure 4 As shown, a sensitive speech processing method provided in an embodiment of the present application may include: S11. Acquire speech information to be processed, perform speech noise reduction processing on the speech information, and obtain target speech.

[0054] In this embodiment, the voice information to be processed may be live voice information, or pre-recorded or real-time recorded voice information. In this embodiment, there is no limitation on the source of the voice information, as long as it contains voice content.

[0055] After acquiring the voice information, the voice information is usually mixed with noise when it is generated and may be affected by the surrounding environmental noise, so that the collected voice information includes not only useful information but also useless environmental noise. In some cases where the background sound is loud and the environment is noisy, the speech recognition accuracy of the subsequent speech-to-text model will also be affected. Therefore, in order to avoid the influence of subsequent environmental noise on desensitization, it is necessary to filter the environmental noise.

[0056] When filtering, the voice information can be processed for voice noise reduction and enhancement to eliminate the influence of voice background noise and extract the purest voice signal as much as possible, thereby improving voice quality, eliminating background noise, and improving voice intelligibility.

[0057] In specific noise reduction, a fusion of multiple noise reduction algorithms can be used for noise reduction processing, such as superposition of spectral subtraction and wavelet transform algorithms.

[0058] Specifically, the speech information is first subjected to speech noise reduction processing using spectral subtraction to obtain initial speech.

[0059] Spectral subtraction is to subtract the spectrum of the noise signal (which can also be the amplitude spectrum and power spectrum) from the spectrum of the noisy signal. is the over-reduction factor, satisfying .when When it increases, more noise components will be subtracted. When the noise components are reduced, the output signal-to-noise ratio can be improved, the narrowband spectrum amplitude of the noise can be reduced, the residual noise can be more effectively suppressed, and the pure speech part can be highlighted. is the compensation factor, satisfying .

[0060] After using spectral subtraction to perform speech denoising, an initial speech is obtained. Then, a wavelet transform algorithm is used to perform speech denoising processing on the initial speech to obtain a target speech.

[0061] Among them, the essence of wavelet threshold denoising in the wavelet transform algorithm is to suppress the useless parts of the signal and enhance the useful parts.

[0062] Wavelet threshold denoising mainly includes three aspects of selection: wavelet basis, threshold and threshold function.

[0063] 1) Selection of wavelet basis: symN (moments for psi N 3Symlet, approximately symmetrical compactly supported orthogonal wavelet) is selected. symN can reduce the phase distortion when analyzing and reconstructing the signal to a certain extent. N represents the vanishing moment (N = 2, 3,, 8) and its support range is 2N-1.

[0064] 2) Wavelet threshold selection: The selection of the threshold will directly affect the denoising effect. The values ​​of the wavelet threshold in this embodiment are as follows: 3) Wavelet threshold function selection: In order to improve the denoising effect, the wavelet threshold function selected in this embodiment is as follows: in, is the original wavelet coefficient, are the estimated wavelet coefficients, is the scale of decomposition, is the wavelet threshold, It is a constant, ranging from 1.5 to 3.

[0065] After determining the wavelet basis, threshold and threshold function, the wavelet threshold denoising process in the wavelet transform algorithm can be used to obtain the target speech. Specifically, the speech signal is decomposed by scale wavelet, quantized by wavelet threshold and reconstructed by wavelet coefficient to obtain the denoised signal, which is the target speech.

[0066] In this embodiment, the speech noise reduction process is performed by combining spectral subtraction and wavelet transform algorithm, which can eliminate the influence of noise and improve the accuracy and reliability of subsequent speech-to-text conversion.

[0067] S12: Convert the target speech into target text.

[0068] In this embodiment, in order to be able to perform sensitive type recognition later, the speech needs to be converted into text. During the conversion, a speech-to-text algorithm can be used. In this embodiment, the PaddleSpeech speech recognition model is used. The PaddleSpeech model is an open source model library based on the speech direction of PaddlePaddle.

[0069] In the above noise reduction process, wavelet transform and spectral subtraction can also be integrated into the PaddleSpeech model to improve the accuracy and practicality of the model.

[0070] S13: Determine the sensitive type corresponding to the target text.

[0071] The sensitive type includes at least one of non-sensitive voices and multiple preset sensitive voices.

[0072] Non-sensitive speech refers to non-sensitive speech, and the multiple preset sensitive speech can be speech of various sensitive types. In practical applications, for the target text, there may be one or more sensitive types involved, such as the presence of the first type and the second type of speech at the same time.

[0073] In addition to being able to identify the category of preset sensitive speech, in the present invention, it is also possible to only determine whether the sensitive type of the target text is non-sensitive speech or sensitive speech. If it is non-sensitive speech, desensitization processing is not performed. If it is sensitive speech, desensitization processing is performed and audio segments are replaced for sensitive audio.

[0074] In practical applications, in order to identify the sensitive type of the target text, a model can be used. The model in this embodiment can be a Naive Bayes model (NB model). In text classification, the Naive Bayes model calculates the posterior probability of the sample belonging to each category through the prior probability of each category and the class conditional probability of the sample, and selects the category with the largest posterior probability as the category of the sample.

[0075] The Naive Bayes algorithm assumes that the feature terms are independent of each other, avoiding the obstacle of the joint probability distribution of the feature terms, that is, each feature term independently affects the classification result. In the Naive Bayes algorithm, there are two assumptions: conditional independence and positional independence. Among them, the conditional independence assumption is that the feature terms are independent of each other; the positional independence assumption is that the position of the feature term in the text has no effect on the probability calculation. The network structure diagram of Naive Bayes is as follows Figure 5 shown.

[0076] After the polynomial NB model is obtained, the model can be used as a sensitive type determination model, and the target text is input into the sensitive type determination model to obtain a sensitive type.

[0077] The training process of the sensitive type determination model includes: 1) Obtain a pre-configured sensitive word library.

[0078] Among them, the constructed sensitive word library includes various sensitive words, and the sensitive words can be configured according to actual conditions.

[0079] 2) Determine sensitive sentences including sensitive words in the sensitive word library.

[0080] In this embodiment, combined with Figure 6 As shown, constructing a sensitive sentence is text data, and the text data may include only the sensitive word, or may be a sensitive sentence constructed from the sensitive word.

[0081] 3) Using the sensitive sentences and the sensitive types of the sensitive words in the sensitive sentences, a multinomial naive Bayes model is trained to obtain a sensitive type determination model.

[0082] Specific training phases refer to Figure 6 As shown, after the training is completed, the target text can be input into the sensitive type determination model to obtain the sensitive type.

[0083] S14. Based on the sensitive type, determine a target strategy for desensitizing the target text.

[0084] In this embodiment, in order to achieve voice desensitization, multiple desensitization strategies are pre-configured, such as Aho-Corasick automaton (AC automaton), Deterministic Finite Automaton (DFA) filtering algorithm, etc.

[0085] In actual applications, after pre-configuring multiple desensitization strategies, if the sensitive type is at least one of multiple preset sensitive voices, it means that there are sensitive words in the voice. At this time, a desensitization strategy corresponding to the sensitive type can be selected from the pre-configured desensitization strategies as the target strategy.

[0086] For example, if the sensitive type is a certain type, the desensitization strategy can be used to perform desensitization processing. If the sensitive type is another type, the desensitization strategy can be used to perform desensitization processing.

[0087] If there are multiple sensitive types, such as including the first and second types at the same time, one of the strategies specifically for desensitizing the first or second type can be randomly selected for desensitization processing.

[0088] In actual applications, if the sensitive type is non-sensitive speech or sensitive speech, only the sensitive speech is identified, and the sensitive type is not specifically identified. At this time, each desensitization strategy can be used to perform a desensitization identification operation on the target text to obtain the number of identified sensitive words. If the number is larger, it means that the number of identified sensitive words is larger and the desensitization effect is better. The desensitization strategy with the largest number of corresponding sensitive words can be used as the target strategy.

[0089] In this embodiment, the method of selecting the target policy may be based on actual configuration.

[0090] S15. Desensitizing the target text using the target strategy to obtain a desensitized text.

[0091] In this embodiment, after obtaining the target policy, the policy is directly used to perform desensitization processing to obtain the desensitized text.

[0092] In detail, step S15 may include: 1) Remove stop words from the target text to obtain a text to be processed.

[0093] In practical applications, stop words mainly refer to @ and some punctuation marks (such as commas, periods, question marks, exclamation marks, etc.), which are not sensitive information. Therefore, before desensitizing, preprocessing the text and deleting stop words can increase the amount of data processed during subsequent desensitization and improve processing efficiency.

[0094] 2) The text to be processed is searched in the sensitive word tree corresponding to the target strategy to obtain sensitive words.

[0095] In actual applications, if the selected target strategy is the DFA filtering algorithm, then the DFA filtering algorithm is configured with a sensitive word tree pre-built based on the sensitive vocabulary library. The text content to be processed is matched and searched in the sensitive word tree in sequence, and the retrieved sensitive words are stored in the result set, and finally a result set including sensitive words is obtained.

[0096] If the target strategy is AC automaton, AC automaton consists of a dictionary tree + kmp (The Knuth-Morris-Pratt Algorithm, an improved string matching algorithm) algorithm + a fail pointer. The AC automaton builds a sensitive word tree based on sensitive words, such as a dictionary tree Trie. Add a fail pointer to the Trie.

[0097] During the use of the AC automaton, the text string to be filtered, that is, the above-mentioned text to be processed, is input, the BFS (Breath First Search) breadth-first search algorithm is used to traverse the Trie tree, and the kmp algorithm is used to match and retrieve to obtain a result set including sensitive words.

[0098] 3) The sensitive words are replaced with preset words to obtain desensitized text.

[0099] In this embodiment, the detected sensitive words can be replaced with other symbols such as "**" or encrypted to output a desensitized text without sensitive words.

[0100] S16: Convert the desensitized text into corresponding speech.

[0101] In this embodiment, in order to use the voice later, it is also necessary to convert the desensitized text into the corresponding voice. In this embodiment, the pyttsx3 text-to-speech algorithm is used to replace the original sensitive audio and generate a new voice without sensitive words. For details, refer to Figure 7, the desensitized voice can be used for transmission and other operations later.

[0102] In this embodiment, after acquiring the voice information, it is converted into a target text, the sensitive type corresponding to the target text is determined, and based on the sensitive type, a target strategy for desensitizing the target text is determined, and the target text is desensitized using the target strategy to obtain a desensitized text to eliminate sensitive information in the voice. And when desensitizing, the target strategy determined in this application matches the sensitive type corresponding to the target text, so that the accuracy of the desensitization strategy is high, and the accuracy of the desensitization operation is improved. In addition, in this application, the voice information is subjected to voice noise reduction processing to eliminate the influence of noise and improve the accuracy of voice conversion to text.

[0103] In the above embodiment, the target speech is converted into the target text, and its specific process is first introduced. In practical applications, step S12 may specifically include: 1) Preprocessing the target speech to obtain a designated speech.

[0104] The preprocessing operation includes: pre-emphasis, framing and windowing operations.

[0105] Specifically, the PaddleSpeech model framework includes preprocessing, feature extraction, acoustic model, language model and other modules. Figure 8 .

[0106] Before the PaddleSpeech model processes and analyzes the speech signal, it needs to perform pre-processing operations such as pre-emphasis, framing, and windowing to eliminate the impact of aliasing, high frequency, and noise that may be caused by the place, equipment, and human vocal organs of the speech signal collection. The pre-processed speech signal should be as smooth as possible, with better parameters and better quality.

[0107] Among them, for pre-emphasis, since the voice signal has the characteristics of high energy in the high frequency band and low energy in the low frequency band. However, the frequency of the noise output by the discriminator shows the rule that the low frequency noise is large and the high frequency noise is small, resulting in a large signal-to-noise ratio at the low frequency and an obviously insufficient signal-to-noise ratio at the high frequency, which leads to the problem of difficulty in high frequency transmission. Therefore, before transmission, the high frequency part of the signal needs to be emphasized to make the spectrum of the signal flat and effectively improve the signal-to-noise ratio.

[0108] Frame division: Generally speaking, a complete speech signal is often non-steady-state, and its characteristics change with time. However, due to the inertia of human voice production, considering that the vocal cords vibrate regularly when voiced sounds are produced, that is, the fundamental frequency is relatively fixed in a short time range, it can be considered that the speech signal has short-term stability. It is generally believed that within a short time range (between 10 and 30 ms), its characteristics will basically not change. Therefore, in the actual processing of speech signals, it is necessary to process them frame by frame, and the frame length is generally 10 to 30 ms.

[0109] After framing, the speech signal is windowed to make the amplitude of a frame gradually change to 0 at both ends, which can reduce the signal discontinuity problem at the beginning and end of the frame, make the peaks on the spectrum thinner, and reduce spectrum leakage.

[0110] 2) Performing a speech signal feature extraction operation on the specified speech to obtain a static speech feature.

[0111] Specifically, the specified speech is a time series signal of indefinite length and is not suitable to be directly used as the input of the traditional machine learning algorithm. It generally needs to be converted into a specific feature vector representation, and the vector representation is obtained by speech feature extraction.

[0112] Specifically, the designated speech is subjected to a short-time Fourier transform (STFT) to obtain its spectrum.

[0113] Then, the square of the spectrum, i.e., the energy spectrum, is calculated. Then, the energy in each filter band is superimposed. The output power spectrum of the kth filter is X k[ ]. Take the logarithm of X k[ ] to obtain the logarithmic power spectrum of the corresponding filter band. Based on the logarithmic power spectrum, perform an inverse discrete cosine transform to obtain L MFCC (Mel Frequency Cepstrum Coefficient, Mel frequency cepstrum coefficient) coefficients. The L MFCC coefficients are the static speech features.

[0114] 3) Performing differential processing on the static speech features to obtain dynamic speech features.

[0115] Specifically, first-order and second-order differences are performed on the static speech features to obtain dynamic speech features.

[0116] 4) Performing a speech decoding operation on the designated speech using the static speech feature and the dynamic speech feature to obtain a target text.

[0117] Specifically, after the static features and the dynamic features are obtained, the static features and the dynamic features, the pre-built acoustic model, the pronunciation dictionary and the language model are used to perform a speech decoding operation on the designated speech to obtain the target text.

[0118] In this embodiment, based on the PaddleSpeech speech recognition model, the accuracy of the recognition model is improved through preprocessing operations.

[0119] In addition, the present invention can also add a speech denoising algorithm before the PaddleSpeech speech recognition model performs speech recognition, such as adding spectral subtraction and wavelet threshold denoising to the PaddleSpeech speech recognition model. After using spectral subtraction and wavelet transform to perform speech enhancement and denoising on each speech data, the impact of noise on the speech recognition result can be reduced. By simply improving the PaddleSpeech speech recognition model, the accuracy and practicality of the recognition model can be improved.

[0120] In summary, the present invention uses the PaddleSpeech speech recognition model to perform noise reduction and speech conversion, and then performs sensitive classification of audio based on the polynomial naive Bayes model, combines the AC automaton or DFA filtering method to replace and shield the sensitive information in the sensitive audio, and finally introduces the text-to-speech technology ppytsx to convert the desensitized speech, thereby realizing the desensitization processing of the speech.

[0121] In order to enable those skilled in the art to more clearly understand the present invention, the present invention is now described by way of example. In voice dialogue, such as manual customer service, the sensitive words in the user's voice can be desensitized to obtain a voice without sensitive words, which is convenient for the dissemination of voice civilization.

[0122] A sensitive speech processing method provided in an embodiment of the present application is introduced above, and a device for executing the sensitive speech processing method is introduced below.

[0123] See also Fig. 9 , Fig. 9 This is a schematic diagram of the structure of a sensitive speech processing device provided in an embodiment of the present application. Fig. 9 As shown, the sensitive voice processing device comprises: The speech noise reduction module 11 is used to obtain the speech information to be processed, perform speech noise reduction processing on the speech information, and obtain the target speech; A speech processing module 12, used for converting the target speech into a target text; A type determination module 13 is used to determine the sensitive type corresponding to the target text; the sensitive type includes at least one of non-sensitive speech and multiple preset sensitive speech; A strategy determination module 14, used to determine a target strategy for desensitizing the target text based on the sensitive type; A desensitization processing module 15 is used to perform desensitization processing on the target text using the target strategy to obtain a desensitized text; The speech conversion module 16 is used to convert the desensitized text into corresponding speech.

[0124] In a possible implementation, the speech processing module 12 includes: A preprocessing operation submodule is used to perform a preprocessing operation on the target speech to obtain a specified speech; the preprocessing operation includes: pre-emphasis, framing and windowing operations; A feature extraction submodule is used to perform a voice signal feature extraction operation on the specified voice to obtain a static voice feature; A differential processing submodule, used for performing differential processing on the static speech features to obtain dynamic speech features; The speech decoding submodule is used to perform speech decoding operation on the specified speech by using the static speech feature and the dynamic speech feature to obtain the target text.

[0125] In a possible implementation, the type determination module 13 is specifically used to: The target text is input into a sensitive type determination model to obtain a sensitive type.

[0126] The sensitive speech processing device further includes: a model training module, which includes: The vocabulary acquisition submodule is used to obtain the pre-configured sensitive vocabulary; A sentence determination submodule, used to determine sensitive sentences including sensitive words in the sensitive word library; The training submodule is used to train the polynomial naive Bayes model using the sensitive sentences and the sensitive types of the sensitive words in the sensitive sentences to obtain a sensitive type determination model.

[0127] In a possible implementation, the policy determination module 14 is specifically configured to: In the case where the sensitive type is at least one of a plurality of preset sensitive voices, a desensitization strategy corresponding to the sensitive type is selected from pre-configured desensitization strategies as a target strategy, or each desensitization strategy is used to perform a desensitization recognition operation on the target text to obtain the number of recognized sensitive words, and the desensitization strategy corresponding to the largest number of sensitive words is selected as the target strategy.

[0128] In a possible implementation, the desensitization processing module 15 includes: A stop word processing submodule is used to remove stop words from the target text to obtain a text to be processed; A retrieval submodule, used to search the text to be processed in the sensitive word tree corresponding to the target strategy to obtain sensitive words; The word replacement submodule is used to replace the sensitive words with preset words to obtain desensitized text.

[0129] In a possible implementation, the speech noise reduction module 11 includes: A first denoising submodule, configured to perform denoising processing on the speech information using spectral subtraction to obtain an initial speech; The second noise reduction submodule is used to perform noise reduction processing on the initial speech using a wavelet transform algorithm to obtain a target speech.

[0130] In this embodiment, after acquiring the voice information, it is converted into a target text, the sensitive type corresponding to the target text is determined, and based on the sensitive type, a target strategy for desensitizing the target text is determined, and the target text is desensitized using the target strategy to obtain a desensitized text to eliminate sensitive information in the voice. And when desensitizing, the target strategy determined in this application matches the sensitive type corresponding to the target text, so that the accuracy of the desensitization strategy is high, and the accuracy of the desensitization operation is improved. In addition, in this application, the voice information is subjected to voice noise reduction processing to eliminate the influence of noise and improve the accuracy of voice conversion to text.

[0131] It should be noted that, for the working process of each module and sub-module in this embodiment, please refer to the corresponding description in the above embodiment, which will not be repeated here.

[0132] The present application also provides an electronic device in an embodiment. Fig.10 As shown, it shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiment of the present application. The electronic device in the embodiment of the present application may include but is not limited to fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Fig.10 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0133] like Fig.10 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 to a random access memory (RAM) 603 to implement the above-mentioned sensitive voice processing method. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0134] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a memory card, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Fig.10 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0135] An embodiment of the present application also provides a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any sensitive speech processing method provided in the embodiment of the present application.

[0136] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any sensitive speech processing method provided in the embodiment of the present application.

[0137] It should also be noted that the device embodiments described above are merely schematic, 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 over 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. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.

[0138] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0139] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0140] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.

Claims

1. A sensitive speech processing method, characterized in that: include: Acquire speech information to be processed, perform speech noise reduction processing on the speech information, and obtain target speech; Converting the target speech into target text; Determine a sensitive type corresponding to the target text; the sensitive type includes at least one of a non-sensitive voice and a plurality of preset sensitive voices; Based on the sensitive type, determining a target strategy for desensitizing the target text; Performing desensitization processing on the target text using the target strategy to obtain a desensitized text; The desensitized text is converted into corresponding speech.

2. The sensitive speech processing method according to claim 1, characterized in that: Converting the target speech into target text includes: Performing a preprocessing operation on the target speech to obtain a designated speech; the preprocessing operation includes: pre-emphasis, framing and windowing operations; Performing a speech signal feature extraction operation on the specified speech to obtain a static speech feature; Performing differential processing on the static speech features to obtain dynamic speech features; The static speech feature and the dynamic speech feature are used to perform a speech decoding operation on the designated speech to obtain a target text.

3. The sensitive speech processing method according to claim 1, characterized in that: Determine the sensitive type corresponding to the target text, including: Inputting the target text into a sensitive type determination model to obtain a sensitive type; The training process of the sensitive type determination model includes: Get the pre-configured sensitive word library; Determining sensitive sentences including sensitive words in the sensitive word library; The polynomial naive Bayes model is trained using the sensitive sentences and the sensitive types of the sensitive words in the sensitive sentences to obtain a sensitive type determination model.

4. The sensitive speech processing method according to claim 1, characterized in that: Based on the sensitive type, a target strategy for desensitizing the target text is determined, including: In a case where the sensitive type is at least one of a plurality of preset sensitive voices, selecting a desensitization strategy corresponding to the sensitive type from pre-configured desensitization strategies as a target strategy; or, Use each desensitization strategy to perform a desensitization identification operation on the target text to obtain the number of identified sensitive words, and use the desensitization strategy with the largest number of corresponding sensitive words as the target strategy.

5. The sensitive speech processing method according to claim 1, characterized in that: Using the target strategy to perform desensitization processing on the target text to obtain the desensitized text includes: Performing a stop word removal operation on the target text to obtain a text to be processed; Searching the text to be processed in the sensitive word tree corresponding to the target strategy to obtain sensitive words; The sensitive words are replaced with preset words to obtain desensitized text.

6. The sensitive speech processing method according to claim 1, characterized in that: Performing speech noise reduction processing on the speech information to obtain a target speech, including: Performing speech noise reduction processing on the speech information using spectral subtraction to obtain initial speech; The initial speech is subjected to speech noise reduction processing using a wavelet transform algorithm to obtain a target speech.

7. A sensitive speech processing device, characterized in that: include: A speech noise reduction module is used to obtain speech information to be processed, perform speech noise reduction processing on the speech information, and obtain a target speech; A speech processing module, used for converting the target speech into a target text; A type determination module, used to determine the sensitive type corresponding to the target text; the sensitive type includes at least one of non-sensitive voice and multiple preset sensitive voices; A strategy determination module, used to determine a target strategy for desensitizing the target text based on the sensitive type; A desensitization processing module, used to perform desensitization processing on the target text using the target strategy to obtain a desensitized text; The speech conversion module is used to convert the desensitized text into corresponding speech.

8. A computer program product, characterized in that It comprises computer-readable instructions, and when the computer-readable instructions are executed on an electronic device, the electronic device implements the sensitive speech processing method as claimed in any one of claims 1 to 6.

9. An electronic device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the sensitive speech processing method as described in any one of claims 1 to 6.

10. A computer storage medium, characterized in that: The storage medium carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can implement the sensitive speech processing method as described in any one of claims 1 to 6.

Citation Information

Cited By

  • Voice call data processing method and device, electronic equipment and storage medium

    CN121078426A