Voice processing method, device, computer equipment and storage medium
By clipping the silent period signals in the speech and synthesizing the speech fragments for recognition, the discontinuity problem caused by pauses in speech recognition is solved, and the recognition efficiency and accuracy are improved.
Patent Information
- Application Number
- CN201910374806.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-05-07
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2039-05-07
Smart Images

Figure CN110148402B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of speech recognition technology, and in particular to a speech processing method, apparatus, computer equipment and computer-readable storage medium. Background Art
[0002] When recording voice for voice recognition, especially when the recorded voice is long, there will be pauses in the recording process, resulting in blank periods in the middle of the recorded voice. The obtained voice signal is discontinuous, and the acoustic model and voice model of voice recognition cannot be effectively used during voice recognition, thereby reducing the efficiency of voice recognition. For example, in some business scenarios, it is often necessary to verify the ID card number. Submitting the ID card number through voice recognition is a convenient and quick way, but because the ID card number is long, there will usually be interruptions when the user reads the ID card number. If the collected audio is directly uploaded to the server for recognition in a stream, although the results can be obtained in real time, it cannot fully utilize the acoustic model and language model based on the ID card number, and it is easy to make errors, which reduces the efficiency of voice recognition of the ID card number. Summary of the invention
[0003] The embodiments of the present application provide a speech processing method, apparatus, computer device and computer-readable storage medium, which can solve the problem of low efficiency in speech recognition in traditional technologies.
[0004] In a first aspect, an embodiment of the present application provides a speech processing method, the method comprising: acquiring non-streaming speech through an input device; determining whether the speech contains an abnormal sound signal, the abnormal sound signal comprising a silence period signal; if the speech contains the abnormal sound signal, trimming the speech through speech activity detection to delete the abnormal sound signal to obtain a plurality of speech segments; performing speech synthesis on the plurality of speech segments in their original order in the speech to obtain a new speech; and performing speech recognition on the new speech.
[0005] In the second aspect, an embodiment of the present application also provides a speech processing device, including: an acquisition unit, used to acquire non-streaming speech through an input device; a judgment unit, used to judge whether the speech contains abnormal sound signals, and the abnormal sound signals include silence period signals; a cropping unit, used to crop the speech to delete the abnormal sound signals through speech activity detection if the speech contains the abnormal sound signals, so as to obtain multiple speech segments; a synthesis unit, used to perform speech synthesis on the multiple speech segments according to their original order in the speech to obtain new speech; and a recognition unit, used to perform speech recognition on the new speech.
[0006] In a third aspect, an embodiment of the present application further provides a computer device, which includes a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the speech processing method when executing the computer program.
[0007] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the speech processing method.
[0008] The embodiments of the present application provide a speech processing method, device, computer equipment and computer-readable storage medium. When the embodiments of the present application implement speech recognition, a non-streaming method is used to obtain speech in a non-streaming manner after a person records all the speech at one time. First, it is determined whether the speech contains abnormal sound signals, and the abnormal sound signals include silent period signals. If the speech contains the abnormal sound signals, the abnormal sound signals are detected by voice activity, and then the speech is trimmed, and the abnormal sound signals are deleted to obtain multiple speech segments. The multiple speech segments are speech synthesized according to their original order in the speech to obtain new speech, and then the new speech is speech recognized by the speech recognition server in the form of whole sentence recognition, so that the new speech in the form of a whole sentence can effectively utilize the acoustic model and language model in speech recognition, and effectively improve the recognition accuracy and efficiency of speech. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0010] Figure 1 A schematic diagram of an application scenario of the speech processing method provided in an embodiment of the present application;
[0011] Figure 2 A flowchart of a speech processing method provided in an embodiment of the present application;
[0012] Figure 3 A waveform diagram of a speech in the speech processing method provided in an embodiment of the present application;
[0013] Figure 4 A flow chart of the speech recognition principle in the speech processing method provided in the embodiment of the present application;
[0014] Figure 5 A schematic block diagram of a speech processing device provided in an embodiment of the present application;
[0015] Figure 6 Another schematic block diagram of a speech processing device provided in an embodiment of the present application; and
[0016] Figure 7 A schematic block diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0017] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0018] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0019] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0020] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0021] See also Figure 1 , Figure 1 A schematic diagram of an application scenario of the speech processing method provided in an embodiment of the present application.
[0022] The application scenarios include:
[0023] (1) Terminal: The terminal can also be called a front end. The terminal is equipped with a microphone or other voice input component to receive the voice input by the user. The terminal can be an electronic device such as a laptop, a smart watch, a tablet computer or a desktop computer. Figure 1 The terminal in is connected to the server.
[0024] (2) Server: The server mainly performs speech recognition. The server can be a single server, a server cluster or a cloud server. If the server is a server cluster, it can also include a master server and a slave server.
[0025] Please continue reading Figure 1 ,like Figure 1 As shown, in the embodiment of the present application, the technical solution of the speech processing method of the present application is mainly explained by taking the steps of executing the speech processing method on the server side as an example. Figure 1 The working process of each main body in the invention is as follows: the terminal receives the complete speech input by the user through the speech input device, and sends the speech to the server so that the server obtains the speech in a non-streaming manner; the server determines whether the speech contains an abnormal sound signal, and the abnormal sound signal includes a silent period signal. If the speech contains the abnormal sound signal, the speech is trimmed through speech activity detection to delete the abnormal sound signal to obtain multiple speech segments, and the multiple speech segments are speech synthesized according to their original order in the speech to obtain a new speech. Finally, the server performs speech recognition on the new speech to obtain a speech recognition result.
[0026] It should be noted that the speech processing method in the embodiment of the present application can be applied to a terminal or a server, as long as the speech is processed before the server recognizes the speech. Figure 1 In the application environment shown, the speech processing method and speech recognition can also be applied together in computer devices such as terminals, as long as they are performed before the computer device performs speech recognition. The application scenario of the above-mentioned speech processing method is only used to illustrate the technical solution of the present application, and is not used to limit the technical solution of the present application. The above-mentioned connection relationship can also have other forms.
[0027] Figure 2 A schematic flow chart of a speech processing method provided in an embodiment of the present application. The speech processing method is applied to Figure 1 In the computer equipment at the middle and front end, all or part of the functions of the speech processing method are completed.
[0028] See also Figure 2 , Figure 2 is a flow chart of the speech processing method provided in the embodiment of the present application. Figure 2 As shown, the method includes the following steps S210-S250:
[0029] S210: Acquire non-streaming voice through an input device.
[0030] The streaming method refers to that the speech recognition device obtains the audio stream to which the speech belongs in real time, and performs speech recognition while obtaining the audio stream.
[0031] The non-streaming method means that after the speech recognition device obtains speech within a preset time or a preset length of speech, it performs complete speech recognition in the form of a whole sentence or a whole paragraph of speech.
[0032] Specifically, the input device can be a terminal or a voice input component such as a microphone. After the user inputs the voice through the input device, the whole sentence or the whole paragraph of the voice is uploaded to the server, so that the server obtains the non-streaming voice through the input device. For example, in some business scenarios, it is often necessary to verify the ID card number. Submitting the ID card number through voice recognition is a convenient and fast way. If the collected audio is directly uploaded to the voice recognition server in a streaming manner for recognition, the voice recognition server can obtain the voice of the ID card number in real time. The voice recognition server obtains the voice of the ID card number and recognizes it repeatedly, and can output the voice recognition result of the ID card number in real time. For example, the voice recognition server recognizes that the ID card number contains "ABCDEFGH". After receiving the voice of "A", the voice recognition server recognizes "A", after receiving the voice of "B", it recognizes "B", after receiving the voice of "C", it recognizes "C", and so on. The voices of ID card numbers such as "A", "B", and "C" are uploaded separately, and the audio received in real time is recognized one by one. The voice recognition result of the ID card number can be output in real time, the recognition result of "A" can be output in real time, the recognition result of "B" can be output in real time, and the recognition result of "B" can be output in real time, and the recognition result of "B" can be output in real time, and so on.
[0033] If the collected audio is uploaded to the speech recognition server for recognition in a non-streaming manner, the speech recognition server obtains the complete voice of the ID card number at one time, and then performs the speech recognition of the ID card number to obtain the complete speech recognition result of the ID card number. Specifically, after a person records the voice of all ID card numbers at one time, the voice of the complete ID card number is uploaded in a centralized manner. Then the uploaded ID card voice is cropped, the voice segments are retained and spliced together, and then transmitted to the speech recognition server for recognition to obtain the complete speech recognition result of the ID card number. For example, the speech recognition server recognizes that the ID card number contains "ABCDEFGH", which means that the speech recognition server obtains the complete voice of the ID card number "ABCDEFGH" at one time, and then performs the speech recognition of the ID card number to obtain the complete speech recognition result of the ID card number "ABCDEFGH". Specifically, after a person records the voice of all ID card numbers "ABCDEFGH" at one time, the voice of the ID card number "ABCDEFGH" is uploaded to the speech recognition server in a centralized manner, instead of uploading "A", "B", "C", etc. separately. Then the uploaded ID card voice "ABCDEFGH" is cropped, the voice segments are retained and spliced together, and then transmitted to the voice recognition server for recognition to obtain the complete ID card number "ABCDEFGH" voice recognition result.
[0034] S220: Determine whether the speech contains an abnormal sound signal, where the abnormal sound signal includes a silent period signal.
[0035] Among them, abnormal sound signals refer to waveform segments with steep changes in the audio waveform, including silent period signals. Silence refers to the time when there is silence in the speech. The situations in which silence occurs include: one is when you are listening to the other party speaking in the interaction; the second is the pause between sentences caused by thinking or taking a short break; the third is the pause in the middle of the speech, such as hesitation, breathing, stuttering, etc. In the first case, the pause gap is long and the frequency of occurrence is low; in the third case, the pause gap is short and the frequency of occurrence is high; the second case is between the first and third cases. This characteristic of the speech source is called the switching characteristic, sometimes also called the voice / silence characteristic. Please refer to Figure 3 , Figure 3 A waveform diagram of a speech in the speech processing method provided in the embodiment of the present application, such as Figure 3 As shown, for example, there is an audio waveform L, and the L2 position in the waveform is the silent period.
[0036] Specifically, waveform sound is the most commonly used Windows multimedia feature. The waveform sound device can capture sound through a microphone, convert it into numerical values, and then store them in a wave file in memory or on disk. Sound is vibration. When sound changes the pressure of the air on the eardrum, we feel the sound. The microphone can sense these vibrations and convert them into electric current. Similarly, the electric current passes through the amplifier and the loudspeaker and becomes sound again. Traditionally, sound is stored in analog form (such as recording tapes and records), and these vibrations are stored in magnetic pulses or contour grooves. When sound is converted into electric current, it can be represented by a waveform that vibrates over time. The most natural form of vibration can be represented by a sine wave. A sine wave has two parameters, one is amplitude, which is the maximum amplitude in a cycle, and the other is frequency. Amplitude is volume and frequency is pitch. Generally speaking, the range of sine waves that the human ear can perceive is from low-frequency sounds of 20 Hz (cycles per second) to high-frequency sounds of 20,000 Hz. The amplitude, that is, the volume, can be detected to determine whether the speech contains abnormal sound signals, which are manifested in the waveform of the speech, that is, the steeply changing waveform segments in the audio waveform, that is, to determine whether the speech contains silent time periods, or shock waves of harsh high-volume speech that obviously exceeds the volume of normal speech. Due to the characteristics of speech, the speech contains more silent period signals. Therefore, detecting abnormal signals mainly involves detecting silent period signals in the speech.
[0037] Furthermore, in one embodiment, the step of determining whether the speech contains an abnormal sound signal comprises:
[0038] Detecting whether the audio waveform of the speech includes a waveform whose audio amplitude is less than a first preset threshold;
[0039] If the audio waveform includes a waveform whose audio amplitude is smaller than the first preset threshold, it is determined that the speech includes the abnormal sound signal.
[0040] The first preset threshold is a volume lower than normal human hearing, and the sound described by the audio waveform with an audio amplitude less than the first preset threshold is bass or silence.
[0041] Specifically, since the volume range of human hearing is an amplitude of 20 to 20,000 Hz (Hz, in English HZ), for general human voice communication, a volume below 20 Hz is a silent period with no sound, and a volume above 20,000 Hz is a volume beyond human hearing. Therefore, in general, a volume below 20 Hz or above 20,000 Hz is manifested as a steeply changing waveform segment in the audio waveform, that is, an abnormal sound signal contained in the speech. Whether the speech contains a silent period signal can be determined by detecting whether the audio waveform of the speech contains a waveform with an audio amplitude less than a first preset threshold. If the audio waveform contains a waveform with an audio amplitude less than the first preset threshold, it is determined that the abnormal sound signal contained in the speech is a sound signal of a silent period signal.
[0042] Furthermore, the abnormal sound signal also includes a shock wave signal. Shock wave is a discontinuous peak propagating in a medium. This discontinuous peak causes a jump-like change in the physical properties of the medium, such as pressure, temperature and density. When the speed of any wave source exceeds the propagation speed of its wave, this wave form can be called a shock wave, or shock wave. Please continue to refer to Figure 3 ,like Figure 3 As shown, for example, there is an audio waveform L, and the L1 position in the waveform is the shock wave.
[0043] In one embodiment, the step of determining whether the speech contains an abnormal sound signal comprises:
[0044] It is also possible to detect whether the audio waveform of the speech contains a waveform whose audio amplitude is greater than a second preset threshold.
[0045] The second preset threshold is a volume that exceeds normal human hearing, and the sound described by the audio waveform with an audio amplitude greater than the second preset threshold is a shock wave or a high pitch.
[0046] Specifically, the volume higher than 20000 Hz is also shown as a waveform segment with steep changes in the audio waveform, that is, the abnormal sound signal contained in the speech. Whether the speech contains a shock wave signal can be determined by detecting whether the audio waveform of the speech contains a waveform with an audio amplitude greater than a second preset threshold. If the audio waveform contains a waveform with an audio amplitude greater than the second preset threshold, it is determined that the speech contains the abnormal sound signal, so as to further filter out the noise in the speech and improve the accuracy of speech recognition.
[0047] S230: If the speech contains the abnormal sound signal, trim the speech through voice activity detection to delete the abnormal sound signal, and obtain multiple speech segments.
[0048] Among them, voice activity detection, abbreviated as VAD, also known as voice endpoint detection and voice boundary detection, can identify and eliminate long periods of silence from the sound signal stream.
[0049] Trimming a waveform segment is similar to deleting a waveform segment. The difference is that deleting a waveform segment deletes the selected waveform, while trimming a waveform segment deletes the unselected waveform. The two have opposite effects. For example, when using GoldWave for trimming, GoldWave is a digital recording and editing software. The button used to trim a waveform segment is Trim. After trimming, GoldWave will automatically enlarge the remaining waveform for display.
[0050] Specifically, since clipping is a special term in the field of waveform splicing technology, the meaning of the expression specifically refers to deleting the unselected waveform. After detecting abnormal sound signals through voice activity, the abnormal sound signals are deselected, and normal sound signals other than the abnormal sound signals are selected, so that the waveforms of the unselected abnormal sound signals are deleted by clipping, or it is called cutting off, and what is left is the selected non-abnormal sound signal, that is, the normal sound signal. The server obtains non-streaming voice, and identifies abnormal sound signals in the voice through voice activity detection, such as identifying whether the voice contains silent period signals and shock wave signals. If the voice contains abnormal sound signals such as silent period signals and shock wave signals, the abnormal sound signals such as silent period signals and shock wave signals are deselected, and normal sound signals other than abnormal sound signals such as silent period signals and shock wave signals are selected, and then the voice is clipped to delete abnormal sound signals such as silent period signals and shock signals in the voice, and multiple voice segments of normal sound signals are obtained. If the voice does not contain abnormal sound signals such as silent period signals and shock wave signals, the voice is continuous. Please continue reading Figure 3 ,like Figure 3 L is the audio waveform of the ID card number "ABCDEFGH". After obtaining the voice L of the ID card number, detect whether L contains abnormal sound signals L1 and L2. If the voice contains L1 and L2, for example, L is ABCL1DEFL2GH, identify the abnormal sound signals L1 and L2 in L through voice activity detection. When cropping the waveform segments by cropping, L1 and L2 are not selected, and the normal sound signal "ABCDEFGH" other than L1 and L2 is selected. When cropping the voice waveform, the unselected abnormal sound signal waveforms L1 and L2 are deleted, leaving the audio waveform of the selected normal sound signal "ABCDEFGH", thereby deleting the abnormal sound signals L1 and L2 in the voice, and obtaining the voice segments ABC, DEF and GH of multiple normal sound signals.
[0051] S240: Perform speech synthesis on the plurality of speech segments according to their original order in the speech to obtain a new speech.
[0052] Among them, speech synthesis includes parameter synthesis and speech splicing. Speech is presented in the form of waveform, which is waveform splicing. Waveform splicing refers to splicing between speech waveform segments to output a continuous speech stream. The PSOLA algorithm is a type of waveform splicing technology.
[0053] Specifically, the multiple speech segments are synthesized according to their original order in the speech to obtain a new speech, which can be the waveform splicing of the multiple speech segments according to their original order in the speech to obtain a new speech, that is, the multiple speech segments are spliced together according to their original order in the speech to perform speech recognition. Figure 3 , the speech is cropped through voice activity detection to cut out the two abnormal sound signals L1 and L2 in the speech, and multiple voice segments ABC, DEF and GH are obtained. The voice segments ABC, DEF and GH are spliced together to obtain voice ABCDEFGH, which is a complete and continuous audio of the ID card number "ABCDEFGH", so that the acoustic model and language model based on the ID card number can be fully and effectively utilized. The method of performing whole-sentence recognition on the ID card voice in the embodiment of the present application can effectively utilize the acoustic model and language model in speech recognition, and effectively improve the recognition accuracy of the ID card voice.
[0054] Furthermore, the waveform splicing speech synthesis technology directly cascades the waveforms in the speech waveform database and outputs a continuous speech stream. These speech waveforms take words and sentences from natural speech, implicitly affecting the tone, stress, and pronunciation speed, and the synthesized speech is clear and natural. The waveform splicing speech synthesis technology includes the PSOLA algorithm and the time-frequency interpolation method. Among them, the time-frequency interpolation method, also known as the time-frequency domain interpolation method, is called Time Frequency Interpolation in English, abbreviated as TFI, to achieve waveform splicing. This method obtains the excitation source of the speech signal through the LPC inverse filter, further annotates the fundamental tone, transforms it into the frequency domain, and calls it the prototype. The prototype is stored, and when synthesized, the prototype is taken out for corresponding analysis and rhythm adjustment, and then transformed back to the time domain signal, and the synthesized speech is obtained through the LPC synthesis filter.
[0055] The PSOLA algorithm is a type of waveform splicing technology, also known as the gene synchronization superposition technology PSOLA. It is mainly used between the splicing of speech waveform segments. First, the rhythmic features of the splicing unit are adjusted using the PSOLA algorithm according to the semantics, so that the synthesized waveform can not only maintain the main segmental features of the original speech primitives, but also make the rhythmic features of the splicing unit conform to the semantics, thereby achieving high intelligibility and naturalness. When adjusting the rhythmic features of the splicing unit, the waveform is modified in units of the fundamental pitch period, and the integrity of the fundamental pitch period is used as the basic premise to ensure the smoothness and continuity of the waveform and spectrum. The PSOLA algorithm includes TD-PSOLA and FD-PSOLA. Among them, TD-PSOLA includes the following steps:
[0056] 1) Pitch synchronization superposition analysis. Accurately mark the original speech signal with pitch synchronization, and multiply the original speech signal with a series of pitch synchronization window functions to obtain a series of overlapping short-time analysis signals. The window function uses a standard Hanning window or Hamming window with a window length of two pitch periods. There is a 50% overlap between adjacent short-time analysis signals. The accuracy and starting position of the pitch period are very important, which will have a great impact on the quality of the synthesized speech.
[0057] 2) Modify the intermediate representation. First, according to the pitch curve and suprasegmental features of the original speech waveform and the requirements for the correction of the target pitch curve and suprasegmental features, a mapping relationship between the pitch period of the synthesized waveform and the original waveform is established, and then the short-time synthetic signal sequence required for synthesis is determined based on this mapping relationship.
[0058] 3) Pitch synchronization superposition processing: The synthesized short-time signal sequence is synchronously arranged with the target pitch period, and the synthesized waveform is obtained by overlapping and adding. At this time, the synthesized speech waveform has the desired suprasegmental characteristics.
[0059] The FD-PSOLA algorithm is similar to the TD-PSOLA algorithm, which is roughly divided into three processes: fundamental frequency synchronization superposition analysis, modification of the intermediate representation, and fundamental frequency synchronization superposition processing. In TD-PSOLA, the changes are based on the time domain, which is more suitable for the change of the sound length; but when it involves the change of the fundamental frequency, especially when the amplitude changes greatly, it is easy to cause aliasing of the superposition unit. In the FD-PSOLA algorithm, not only can the time scale be changed, but also the signal can be appropriately adjusted in the frequency domain. The specific steps are as follows:
[0060] 1) Perform discrete Fourier transform on the short-time analysis signal to obtain the analysis Fourier spectrum of the signal.
[0061] 2) Use homomorphic filtering to obtain the spectral envelope of the short-time analysis Fourier spectrum and the separated excitation source spectrum.
[0062] 3) Compress and stretch the spectrum. Use linear interpolation to compress and stretch the excitation source spectrum, but this processing method is prone to losing information in linear interpolation. Drawing on the sine model method, the excitation source spectrum and spectrum envelope are sampled at new frequency points to achieve compression and stretching of the excitation source spectrum and obtain a new Fourier spectrum. Avoid interpolation of complex values of the spectrum, and modify the frequency axis coordinates and spectrum envelope interpolation to achieve the purpose of modifying the Fourier spectrum.
[0063] 4) Obtain a short-time synthetic signal.
[0064] S250: Perform speech recognition on the new speech.
[0065] Among them, speech recognition, called Automatic Speech Recognition in English, generally referred to as ASR, is the process of converting sound into text.
[0066] Specifically, see Figure 4 , Figure 4 The speech recognition principle flow chart in the speech processing method provided in the embodiment of the present application includes:
[0067] 1) Voice input, that is, obtaining voice, for example, obtaining new voice after voice synthesis;
[0068] 2) Encoding, that is, encoding the input speech, and extracting features from the speech through encoding, for example, encoding and extracting new speech, that is, extracting features from the new speech;
[0069] 3) Decoding. The extracted speech features are decoded by the acoustic model and the language model. The acoustic model is trained with training data 1 to achieve the desired effect, and the language model is trained with training data 2 to achieve the desired effect. Speech recognition is the conversion of speech sound waves into text. Given the training data of the target speech, a statistical model for recognition can be trained. For example, the new speech is decoded.
[0070] 4) Text output. The speech features decoded by the acoustic model and the language model are converted into text output, for example, new speech is converted into text to realize speech recognition, thereby realizing speech recognition that converts speech into text.
[0071] When implementing speech recognition in the embodiment of the present application, a non-streaming method is used to allow a person to record all the speech at one time, and then the non-streaming speech is obtained. First, it is determined whether the speech contains an abnormal sound signal, and the abnormal sound signal includes a silent period signal. If the speech contains the abnormal sound signal, the abnormal sound signal is detected through voice activity, and then the speech is cropped to cut off the abnormal sound signal to obtain multiple speech segments. The multiple speech segments are speech synthesized according to their original order in the speech to obtain a new speech, and then the speech recognition server is used to perform speech recognition on the new speech in a whole sentence recognition manner, so that the new speech in the form of a whole sentence can effectively utilize the acoustic model and language model in speech recognition, thereby effectively improving the recognition accuracy and efficiency of speech.
[0072] In one embodiment, before the step of determining whether the speech contains an abnormal sound signal, the method further includes:
[0073] Detecting whether the speech contains sound by detecting the volume of the speech;
[0074] If the speech contains sound, determining whether the speech contains an abnormal sound signal;
[0075] If the speech does not contain any sound, a prompt to re-input the speech is output.
[0076] Specifically, when performing speech recognition, the speech recording may have started, but no sound was made due to various reasons. However, if the recording time exceeds a certain time, the blank speech will also be treated as recorded speech for speech recognition. However, this speech actually has no content and no meaning. Therefore, it is possible to first detect whether the obtained speech contains sound. If the speech does not contain sound, that is, no sound is made, it is a blank sound, and there is no need to perform abnormal sound signal detection on the speech, so as to avoid the subsequent step of detecting abnormal sound signals in normal speech to eliminate abnormal sound signals in the speech. Whether there is sound in the speech can be determined by judging the volume of the speech. If the volume of the speech is lower than the volume that people can hear, that is, the audio amplitude in the audio waveform of the speech is less than the first preset threshold, the speech is judged to be silent without sound, and there is no need to further perform voice activity detection to detect abnormal sound signals from the speech, and there is no need to perform speech recognition. If it is determined that the speech does not contain sound, a prompt to re-enter the speech is output, allowing the user to re-record the speech to shorten the speech recognition process and improve the efficiency and accuracy of speech recognition. If the speech contains sound, it is further determined whether the speech contains abnormal sound signals. If the speech contains abnormal sound signals, speech recognition is processed to obtain new speech, and then speech recognition is performed, thereby achieving the accuracy of speech recognition. By first determining whether the speech contains sound, abnormal situations without sound can be discovered as early as possible, and the recognition of abnormal speech situations can be improved, thereby improving the efficiency of speech recognition.
[0077] Furthermore, it is also possible to: detect whether the speech contains natural language.
[0078] Among them, natural language is human voice.
[0079] Specifically, the Mel Frequency Cepstral Coefficients can be applied to the Hidden Markov Model to determine whether the speech is a sound signal. Among them, MFCCs, English Mel Frequency Cepstral Coefficents, referred to as MFCCs, can also be abbreviated as MFCC, is a feature widely used in automatic speech and speaker recognition, HMM, English HiddenMarkov Model, referred to as HMM, is a statistical model, which is used to describe a Markov process containing hidden unknown parameters. MFCCs are used in the training (and recognition) process of HMM, because there is a feature vector for each frame of speech (or each phoneme) in HMM, and MFCC can be selected to determine whether there is a sound signal in the speech. If there is no sound signal in the speech, there is no need to further perform voice activity detection to detect abnormal sound signals from the speech, and there is no need to perform speech recognition. If the speech contains a sound signal, it is further determined whether the speech contains an abnormal sound signal. If the speech contains an abnormal sound signal, the speech is processed to obtain a new speech, and then speech recognition is performed. By first determining whether the speech contains natural language, abnormal situations where there is no human voice can be discovered as early as possible, and the recognition of abnormal speech situations can be further improved, thereby improving the efficiency of speech recognition.
[0080] In one embodiment, the voice includes an ID card number, and the step of performing voice recognition on the new voice includes:
[0081] Perform speech recognition on new speech containing ID card number;
[0082] After the step of performing speech recognition on the new speech, the method further comprises:
[0083] Verify whether the identified ID card number contains any errors according to the preset ID card number encoding rules;
[0084] If the ID card number contains an error, a prompt will be given for the incorrect ID card number.
[0085] Among them, the identity card number, also known as the resident identity card number, or the citizen identity number, is called the People's Republic of China resident identity card in English. The citizen identity number is a characteristic combination code.
[0086] The preset ID card number coding rules are clearly defined in GB11643-1999 "Citizen Identity Number".
[0087] Specifically, a non-streaming voice containing an ID card number is obtained through an input device. If the voice contains the abnormal sound signal, the voice is trimmed through voice activity detection to delete the abnormal sound signal to obtain multiple voice segments, and the multiple voice segments are voice-synthesized according to their original order in the voice to obtain a new voice containing the ID card number, and the new voice is voice-recognized to identify the ID card number contained in the voice. For example, in some business scenarios, it is often necessary to verify the ID card number. Since the ID card number is long, there will usually be interruptions when people input the ID card number by voice. If the collected audio is directly uploaded to the server for recognition in a streaming manner, although the results can be obtained in real time, it is impossible to fully utilize the acoustic model and language model based on the ID card number, and it is prone to errors. The voice processing method provided in the embodiment of the present application is used to perform voice recognition on the obtained voice containing the ID card number. After obtaining the recognized ID card number, it is also possible to check whether the recognized ID card number contains any errors according to the preset ID card number encoding rules. If the ID card number does not contain any errors, it indicates that the voice recognition of the ID card number is accurate. If the recognized ID card number contains any errors, a prompt can be given for the erroneous ID card number to allow the user to re-provide the voice containing the ID card number and re-recognize the ID card number, so as to improve the efficiency and accuracy of voice recognition containing the ID card number.
[0088] Furthermore, the step of checking whether the identified ID card number contains errors according to the preset ID card number encoding rules includes:
[0089] Determining whether the ID card number contains a preset number of digits to verify whether the number of digits in the ID card number is correct;
[0090] Identify the gender of the speaker corresponding to the voice according to the preset voice feature to verify whether the sequence digit in the ID card number matches the gender of the speaker;
[0091] Determine whether the verification code of the ID card number calculated according to the verification code calculation formula is consistent with the verification code contained in the identified ID card number to verify whether the verification code contained in the identified ID card number is correct;
[0092] If the number of digits in the ID number is correct, and the sequence digits in the ID number match the gender of the speaker, and the check code of the ID number is correct, it is determined that the identified ID number contains no errors.
[0093] Specifically, the standard "Citizen Identity Number" stipulates the encoding object, number structure and expression form of the citizen identity number, so that each encoding object obtains a unique and unchanging legal number. For example, the citizen identity number is a characteristic combination code, consisting of a 17-digit body code and a one-digit check code. The arrangement order from left to right is: a six-digit address code, an eight-digit date of birth code, a three-digit sequence code and a one-digit check code. Since the ID number encoding has corresponding rules and structural forms, it is possible to check whether the identified ID number contains errors based on the ID number encoding rules, which can include the following:
[0094] 1) Determine whether the ID card number contains a preset number of digits to verify whether the number of digits in the ID card number is correct.
[0095] Specifically, if the ID card number contains the number of digits of the preset digits, it is determined that the number of digits of the identified ID card number is correct. If the ID card number does not contain the number of digits of the preset digits, it is determined that the number of digits of the identified ID card number contains errors. Since the ID card number has a total of eighteen digits, it is possible to verify whether the number of digits of the ID card number is correct by judging whether the ID card number contains the number of digits of the preset digits, that is, to judge whether the identified ID card number contains eighteen digits, so as to first judge whether the identified ID card number is correct based on the number of digits. If the identified ID card number is not eighteen digits, it can be directly judged that the ID card number recognized by voice recognition is wrong, and there is no need to perform subsequent judgments, thereby improving the efficiency of voice recognition. If the identified ID card number is eighteen digits, it can be preliminarily judged that the identified ID card number is correct based on the number of digits.
[0096] 2) Identifying the gender of the speaker corresponding to the voice according to the preset voice feature to verify whether the sequence digit in the ID card number matches the gender of the speaker.
[0097] The preset voice features include fundamental frequency, spectrum, sound frequency and amplitude to distinguish male or female voices. As the name implies, fundamental frequency is the basis of the sound. The frequency of vocal cord vibration is called fundamental frequency. The fundamental frequency has a great relationship with the structure of the individual's vocal cords, so the gene frequency can also be used to identify the source of the sound. Generally speaking, the fundamental frequency of male speakers is lower, while the fundamental frequency of female speakers is relatively higher. Since there is a large difference in the fundamental frequency of male and female voices, the recognition of male and female voices can be awakened based on the fundamental frequency.
[0098] Specifically, if the sequence digits in the ID card number match the gender of the speaker, it is determined that the sequence digits of the identified ID card number do not contain errors. If the sequence digits in the ID card number do not match the gender of the speaker, it is determined that the sequence digits of the identified ID card number contain errors. Since the sequence numbers assigned to people born in the same year, month, and day are within the area identified by the address code of the fifteenth to seventeenth digits of the ID card number, the odd numbers of the seventeenth digit are assigned to males and the even numbers are assigned to females, it is possible to identify the gender of the speaker corresponding to the voice by identifying the voice as a male voice or a female voice according to the preset voice features to verify whether the sequence digits in the ID card number match the gender of the speaker. If the recognized voice is female and the sequence digit is an even number, or if the recognized voice is male and the sequence digit is an odd number, it is judged that the gender of the speaker corresponding to the voice matches the sequence digit in the ID card number and is consistent, and it can be further judged that the recognition of the sequence digit of the ID card number is accurate; if the recognized voice is female and the sequence digit is an odd number, or if the recognized voice is male and the sequence digit is an even number, it is judged that the gender of the speaker corresponding to the voice does not match the sequence digit in the ID card number and is inconsistent. It may be that an error occurred in the voice recognition process of the ID card number, or that a male uses a female ID card number for voice recognition, or that a female uses a male ID card number for voice recognition. By checking the sequence digit, it is possible to judge the correctness of the voice recognition and improve the efficiency of the voice recognition of the ID card number, and it can also play a role in anti-counterfeiting of the ID card number to a certain extent, so as to prevent the opposite sex from using the ID card number for identity authentication or identification.
[0099] Furthermore, in general, due to the significantly different characteristics of male and female voices, the corresponding neural network model can be trained through training data to determine whether the voice is male or female, that is, through neural network classification instances, to improve the efficiency of male and female voice recognition.
[0100] 3) Determine whether the verification code of the ID card number calculated according to the verification code calculation formula is consistent with the verification code contained in the ID card number to verify whether the identified ID card number is correct.
[0101] Among them, the check code is calculated by the number compiling unit according to the standard "Citizen Identity Number" according to a unified formula. It is a check code calculated based on the first 17 digits of the ID number and the ISO 7064:1983.MOD11-2 check code.
[0102] Specifically, since the check code as the last digit is calculated by the number compilation unit according to a unified formula, the check code of the ID card number calculated according to the check code calculation formula is consistent with the check code contained in the ID card number to verify whether the identified ID card number is correct. If it is determined that the check code of the ID card number calculated according to the check code calculation formula is consistent with the check code contained in the identified ID card number, it is determined that the check code contained in the identified ID card number is correct; if it is determined that the check code of the ID card number calculated according to the check code calculation formula is inconsistent with the check code contained in the identified ID card number, it is determined that the check code contained in the identified ID card number contains an error.
[0103] If the ID card number contains the preset number of digits, and the sequence digits in the ID card number match the gender of the speaker, and it is determined that the check code of the ID card number calculated according to the check code calculation formula is consistent with the check code contained in the identified ID card number, that is, if the number of digits in the ID card number is correct, and the sequence digits in the ID card number match the gender of the speaker, and the check code of the ID card number is correct, it is determined that the identified ID card number does not contain errors, and it is determined that the identified ID card number does not contain errors.
[0104] If the above-identified ID card number does not contain the above-mentioned error, it can be determined that the identification of the ID card number is accurate. If the above-identified ID card number contains the above-mentioned error, it means that the voice recognition is inaccurate, and the user needs to be prompted to re-enter the voice containing the ID card number to re-perform voice recognition, thereby improving the accuracy of voice recognition containing the ID card number as much as possible. That is, if the ID card number contains the digits of the preset digits, and the sequence digits in the ID card number match the gender of the speaker, and it is judged that the check code of the ID card number calculated according to the check code calculation formula is consistent with the check code contained in the identified ID card number, it is determined that the identified ID card number does not contain an error; if the ID card number does not contain the digits of the preset digits, or the sequence digits in the ID card number do not match the gender of the speaker, or it is judged that the check code of the ID card number calculated according to the check code calculation formula is inconsistent with the check code contained in the identified ID card number, it is determined that the identified ID card number contains an error.
[0105] Furthermore, the step of prompting the wrong ID card number includes:
[0106] The incorrect ID card number will be prompted with specific questions corresponding to the error.
[0107] Specifically, specific prompts are given for errors in the identified ID number. For example, if the number of digits of the ID number is detected to be incorrect, a prompt is given for the error in the number of digits of the ID number, so that the user pays attention to whether the number of digits of the ID number is entered incorrectly when inputting by voice. If the gender of the speaker corresponding to the voice is identified according to the preset voice features to verify whether the sequence digits in the ID number match the gender of the speaker, since the odd numbers of the seventeenth digit in the ID number are given to males and the even numbers are given to females, the user can be reminded whether the seventeenth digit of the ID number is entered incorrectly. If the check code of the ID number is detected to be incorrect, the user can be reminded whether the check digit of the last digit of the ID number is entered incorrectly. Through targeted prompts, the accuracy of the user's input voice can be improved, thereby improving the efficiency and accuracy of voice recognition.
[0108] It should be noted that the speech processing methods described in the above embodiments can recombine the technical features contained in different embodiments as needed to obtain a combined implementation plan, but they are all within the scope of protection required by this application.
[0109] See also Figure 5 , Figure 5 Schematic block diagram of a speech processing device provided in an embodiment of the present application. Corresponding to the above-mentioned speech processing method, an embodiment of the present application also provides a speech processing device. Figure 5 As shown, the speech processing device includes a unit for executing the above-mentioned speech processing method, and the device can be configured in a computer device such as a server. Figure 5 The speech processing device 500 includes an acquisition unit 501, a judgment unit 502, a cutting unit 503, a synthesis unit 504 and a recognition unit 505.
[0110] The acquisition unit 501 is used to acquire the non-streaming voice through the input device;
[0111] A judging unit 502 is used to judge whether the speech contains an abnormal sound signal, wherein the abnormal sound signal includes a silent period signal;
[0112] A clipping unit 503 is configured to clip the speech to delete the abnormal sound signal through voice activity detection to obtain multiple speech segments if the speech contains the abnormal sound signal;
[0113] A synthesis unit 504, configured to synthesize the plurality of speech segments according to their original order in the speech to obtain a new speech;
[0114] The recognition unit 505 is used to perform speech recognition on the new speech.
[0115] See also Figure 6 , Figure 6 Another schematic block diagram of a speech processing device provided in an embodiment of the present application. Figure 6 As shown, in this embodiment, the speech processing device 500 further includes:
[0116] The detection unit 506 is used to detect whether the speech contains sound by detecting the volume of the speech. If the speech contains sound, determine whether the speech contains abnormal sound signals. If the speech does not contain sound, output a prompt to re-input the speech.
[0117] Please continue reading Figure 6 , the judging unit 502 comprises:
[0118] The detection subunit 5021 is used to detect whether the audio waveform of the speech contains a waveform whose audio amplitude is less than a first preset threshold;
[0119] The first determination subunit 5022 is configured to determine that the speech contains the abnormal sound signal if the audio waveform contains a waveform whose audio amplitude is smaller than the first preset threshold.
[0120] In one embodiment, the synthesis unit 504 is used to splice the waveforms of the multiple speech segments according to their original order in the speech to obtain a new speech.
[0121] Please continue reading Figure 6 ,like Figure 6 As shown, the speech includes an ID card number, and the recognition unit 505 is used to perform speech recognition on the new speech including the ID card number;
[0122] The speech processing device 500 further includes:
[0123] A verification unit 507, used to verify whether the identified ID card number contains any errors according to a preset ID card number encoding rule;
[0124] The prompt unit 508 is used to prompt the incorrect ID card number if the ID card number contains an error.
[0125] Please continue reading Figure 6 ,like Figure 6 As shown, the verification unit 507 includes:
[0126] The first verification subunit 5071 is used to determine whether the ID card number contains a preset number of digits to verify whether the number of digits in the ID card number is correct;
[0127] The second verification subunit 5072 is used to identify the gender of the speaker corresponding to the voice according to the preset voice feature to verify whether the sequence position in the ID card number matches the gender of the speaker;
[0128] The third verification subunit 5073 is used to determine whether the verification code of the ID card number calculated according to the verification code calculation formula is consistent with the verification code contained in the identified ID card number to verify whether the verification code contained in the identified ID card number is correct;
[0129] The second determination subunit 5074 is used to determine that the identified ID number contains no errors if the number of digits in the ID number is correct, the sequence digits in the ID number match the gender of the speaker, and the check code of the ID number is correct.
[0130] In one embodiment, the prompt unit 508 is used to prompt a specific question corresponding to the incorrect ID card number.
[0131] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned speech processing device and each unit can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and brevity of description, it will not be repeated here.
[0132] At the same time, the division and connection method of each unit in the above-mentioned speech processing device is only used for illustration. In other embodiments, the speech processing device can be divided into different units as needed, and the units in the speech processing device can also be connected in different orders and methods to complete all or part of the functions of the above-mentioned speech processing device.
[0133] The above-mentioned speech processing device can be implemented in the form of a computer program. The computer program can be Figure 7 Runs on the computer device shown.
[0134] See also Figure 7 , Figure 7 700 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 700 may be a computer device such as a desktop computer or a server, or may be a component or part in other devices.
[0135] See also Figure 7 The computer device 700 includes a processor 702 , a memory and a network interface 705 connected via a system bus 701 , wherein the memory may include a non-volatile storage medium 703 and an internal memory 704 .
[0136] The non-volatile storage medium 703 may store an operating system 7031 and a computer program 7032. When the computer program 7032 is executed, the processor 702 may execute the above-mentioned speech processing method.
[0137] The processor 702 is used to provide computing and control capabilities to support the operation of the entire computer device 700 .
[0138] The internal memory 704 provides an environment for the operation of the computer program 7032 in the non-volatile storage medium 703. When the computer program 7032 is executed by the processor 702, the processor 702 can execute the above-mentioned speech processing method.
[0139] The network interface 705 is used to communicate with other devices over the network. Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the present application solution, and does not constitute a limitation on the computer device 700 to which the present application solution is applied. The specific computer device 700 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components. For example, in some embodiments, the computer device may only include a memory and a processor. In such an embodiment, the structure and function of the memory and the processor are the same as those of the present application solution. Figure 7 The embodiments shown are consistent and will not be described again here.
[0140] The processor 702 is used to run a computer program 7032 stored in a memory to implement the following steps: obtaining non-streaming speech through an input device; determining whether the speech contains an abnormal sound signal, wherein the abnormal sound signal includes a silence period signal; if the speech contains the abnormal sound signal, trimming the speech through voice activity detection to delete the abnormal sound signal to obtain multiple speech segments; performing speech synthesis on the multiple speech segments according to their original order in the speech to obtain a new speech; and performing speech recognition on the new speech.
[0141] In one embodiment, before implementing the step of determining whether the speech contains an abnormal sound signal, the processor 702 further implements the following steps:
[0142] Detecting whether the speech contains sound by detecting the volume of the speech;
[0143] If the speech contains sound, determining whether the speech contains an abnormal sound signal;
[0144] If the speech does not contain any sound, a prompt to re-input the speech is output.
[0145] In one embodiment, when implementing the step of determining whether the speech contains an abnormal sound signal, the processor 702 specifically implements the following steps:
[0146] Detecting whether the audio waveform of the speech includes a waveform whose audio amplitude is less than a first preset threshold;
[0147] If the audio waveform includes a waveform whose audio amplitude is smaller than the first preset threshold, it is determined that the speech includes the abnormal sound signal.
[0148] In one embodiment, when the processor 702 implements the step of synthesizing the multiple speech segments according to their original order in the speech to obtain the new speech, the processor 702 specifically implements the following steps:
[0149] The waveforms of the multiple speech segments are spliced according to their original order in the speech to obtain a new speech.
[0150] In one embodiment, the voice includes an ID card number, and the processor 702, when implementing the step of performing voice recognition on the new voice, specifically implements the following steps:
[0151] Perform speech recognition on new speech containing ID card number;
[0152] After implementing the step of performing speech recognition on the new speech, the processor 702 further implements the following steps:
[0153] Verify whether the identified ID card number contains any errors according to the preset ID card number encoding rules;
[0154] If the ID card number contains an error, a prompt will be given for the incorrect ID card number.
[0155] In one embodiment, when the processor 702 implements the step of checking whether the identified ID card number contains an error according to the preset ID card number encoding rule, it specifically implements the following steps:
[0156] Determining whether the ID card number contains a preset number of digits to verify whether the number of digits in the ID card number is correct;
[0157] Identify the gender of the speaker corresponding to the voice according to the preset voice feature to verify whether the sequence digit in the ID card number matches the gender of the speaker;
[0158] Determine whether the verification code of the ID card number calculated according to the verification code calculation formula is consistent with the verification code contained in the identified ID card number to verify whether the verification code contained in the identified ID card number is correct;
[0159] If the number of digits in the ID number is correct, and the sequence digits in the ID number match the gender of the speaker, and the check code of the ID number is correct, it is determined that the identified ID number contains no errors.
[0160] In one embodiment, when implementing the step of prompting the wrong ID card number, the processor 702 specifically implements the following steps:
[0161] The incorrect ID card number will be prompted with specific questions corresponding to the error.
[0162] It should be understood that in the embodiment of the present application, the processor 702 may be a central processing unit (CPU), and the processor 702 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0163] Those skilled in the art will appreciate that all or part of the processes in the method for implementing the above embodiment can be completed by a computer program, which can be stored in a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.
[0164] Therefore, the present application also provides a computer-readable storage medium. The computer-readable storage medium may be a non-volatile computer-readable storage medium, and the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the following steps:
[0165] A computer program product, when running on a computer, enables the computer to execute the steps of the speech processing method described in the above embodiments.
[0166] The computer-readable storage medium may be an internal storage unit of the aforementioned device, such as a hard disk or memory of the device. The computer-readable storage medium may also be an external storage device of the device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit of the device and an external storage device.
[0167] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0168] The computer-readable storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.
[0169] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0170] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0171] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present application can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0172] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for an electronic device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application.
[0173] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A speech processing method, It is characterized in that The method comprises: Acquire non-streaming audio through input devices; Determining whether the speech contains an abnormal sound signal, wherein the abnormal sound signal includes a silent period signal; If the speech contains the abnormal sound signal, trimming the speech through voice activity detection to delete the abnormal sound signal, thereby obtaining a plurality of speech segments; Performing speech synthesis on the plurality of speech segments according to their original order in the speech to obtain a new speech; Performing speech recognition on the new speech; The step of acquiring the non-streaming voice through the input device comprises: Acquire speech within a preset time or a preset volume through an input device; Performing complete speech recognition on the speech within the preset time or the speech of the preset size to obtain the non-streaming speech; The step of determining whether the speech contains an abnormal sound signal comprises: Detecting whether the audio waveform of the speech includes a waveform whose audio amplitude is less than a first preset threshold; If the audio waveform includes a waveform whose audio amplitude is smaller than the first preset threshold, it is determined that the speech includes the abnormal sound signal; Wherein, the abnormal sound signal also includes a shock wave signal; Detecting whether the audio waveform of the speech includes a waveform whose audio amplitude is greater than a second preset threshold; If the audio waveform includes a waveform whose audio amplitude is greater than the second preset threshold, it is determined that the speech includes the shock wave signal; The step of synthesizing the plurality of speech segments according to their original order in the speech to obtain a new speech comprises: Splicing the waveforms of the multiple speech segments according to their original order in the speech to obtain a new speech; The speech synthesis refers to parameter synthesis and waveform splicing.
2. The speech processing method according to claim 1, It is characterized in that Before the step of determining whether the speech contains an abnormal sound signal, the method further includes: Detecting whether the speech contains sound by detecting the volume of the speech; If the speech contains sound, determining whether the speech contains an abnormal sound signal; If the speech does not contain any sound, a prompt to re-input the speech is output.
3. The speech processing method according to claim 1, It is characterized in that The voice includes an identity card number, and the step of performing voice recognition on the new voice includes: Perform speech recognition on new speech containing ID card number; After the step of performing speech recognition on the new speech, the method further comprises: Verify whether the identified ID card number contains any errors according to the preset ID card number encoding rules; If the ID card number contains an error, a prompt will be given for the incorrect ID card number.
4. The speech processing method according to claim 3, It is characterized in that The step of checking whether the identified ID card number contains errors according to the preset ID card number encoding rules includes: Determining whether the ID card number contains a preset number of digits to verify whether the number of digits in the ID card number is correct; Identify the gender of the speaker corresponding to the voice according to the preset voice feature to verify whether the sequence digit in the ID card number matches the gender of the speaker; Determine whether the verification code of the ID card number calculated according to the verification code calculation formula is consistent with the verification code contained in the identified ID card number to verify whether the verification code contained in the identified ID card number is correct; If the number of digits in the ID number is correct, and the sequence digits in the ID number match the gender of the speaker, and the check code of the ID number is correct, it is determined that the identified ID number contains no errors.
5. The speech processing method according to claim 3 or 4, It is characterized in that The step of prompting the wrong ID card number includes: The incorrect ID card number will be prompted with specific questions corresponding to the error.
6. A speech processing device, It is characterized in that include: An acquisition unit, used for acquiring non-streaming voice through an input device; A judging unit, configured to judge whether the speech contains an abnormal sound signal, wherein the abnormal sound signal includes a silent period signal; a clipping unit, configured to clip the speech to delete the abnormal sound signal through voice activity detection if the speech contains the abnormal sound signal, thereby obtaining a plurality of speech segments; A synthesis unit, used for synthesizing the plurality of speech segments according to their original order in the speech to obtain a new speech; A recognition unit, used for performing speech recognition on the new speech; The acquisition unit is specifically used for: Acquire speech within a preset time or a preset volume through an input device; Performing complete speech recognition on the speech within the preset time or the speech of the preset size to obtain the non-streaming speech; The judging unit is specifically used for: Detecting whether the audio waveform of the speech includes a waveform whose audio amplitude is less than a first preset threshold; If the audio waveform includes a waveform whose audio amplitude is smaller than the first preset threshold, it is determined that the speech includes the abnormal sound signal; Wherein, the abnormal sound signal also includes a shock wave signal; Detecting whether the audio waveform of the speech includes a waveform whose audio amplitude is greater than a second preset threshold; If the audio waveform includes a waveform whose audio amplitude is greater than the second preset threshold, it is determined that the speech includes the shock wave signal; The synthesis unit is specifically used for: Splicing the waveforms of the multiple speech segments according to their original order in the speech to obtain a new speech; The speech synthesis refers to parameter synthesis and waveform splicing.
7. A computer device, It is characterized in that The computer device includes a memory and a processor connected to the memory; the memory is used to store a computer program; the processor is used to run the computer program stored in the memory to execute the steps of the speech processing method as described in any one of claims 1-5.
8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the steps of the speech processing method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Voice recognition method and device aiming at pauses
CN105427870A
Method and device for voice sales
CN109389452A
