Voice acquisition method and device, electronic equipment and storage medium

CN119132326APending Publication Date: 2024-12-13BEIJING YUANJIAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411409591.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The existing voice acquisition technology is prone to interference in noisy environments, with problems such as distorted cutoff, excessive noise, too small voice energy, multiple voices and insufficient effective time, resulting in a decrease in the accuracy of voiceprint recognition.

Method used

Through the audio acquisition device, the voice is subjected to environmental noise detection and noise reduction processing, the gain processing is performed, and the voice quality is multi-dimensionally detected, including voice cutoff, decentralization, signal-to-noise ratio, effective duration and same speaker detection. If it fails, it will be re-collected.

Benefits of technology

It improves the quality of voice acquisition, enhances the accuracy of voiceprint recognition, solves the problems of noise interference and insufficient voice energy, and ensures the quality of voice acquisition in noisy environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119132326A_ABST
    Figure CN119132326A_ABST
Patent Text Reader

Abstract

The invention provides a voice acquisition method and device, electronic equipment and a storage medium. The voice acquisition method comprises the following steps: acquiring voice based on audio acquisition equipment to obtain target voice, performing environmental noise detection on the target voice, performing noise reduction processing on the target voice passing the environmental noise detection, and determining the target voice after noise reduction processing; performing gain processing on the target voice after noise reduction processing, determining the target voice after gain processing, and storing the target voice after gain processing in a cache pool to obtain a voice to be processed; performing voice quality detection under multiple dimensions on the to-be-processed voice, and determining whether the to-be-processed voice passes the voice quality detection under the multiple dimensions; if yes, the voice to be processed is cached, and if not, the voice is collected again. The invention aims to solve the problems of distortion cut amplitude, overlarge noise, too small voice energy, multi-person voice, long and insufficient effective time and the like in the voice acquisition process, thereby improving the voice acquisition quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of speech processing technology, and in particular to a speech collection method, device, electronic device and storage medium. Background Art

[0002] Voiceprint, like fingerprint, iris, face recognition, etc., is a type of biometric identification and is considered the most natural way of biometric identification and identification, also known as voiceprint recognition. The accuracy of voiceprint recognition is strongly related to the quality of voice collection. In order to ensure the accuracy of voiceprint recognition, how to improve the quality of collected voice is of great significance. Existing voice collection technology is easily disturbed when the equipment is collected in a noisy environment. There are problems such as distortion clipping, excessive noise, too little voice energy, multiple voices, and insufficient effective time. If such voice is directly involved in voiceprint recognition, the accuracy of voiceprint recognition will decrease. Therefore, how to improve the quality of voice collection has become a technical issue that cannot be underestimated. Summary of the invention

[0003] In view of this, the purpose of this application is to provide a voice collection method, device, electronic device and storage medium to solve the problems of distortion clipping, excessive noise, too little voice energy, multiple voices and insufficient effective time in the voice collection process in the prior art, thereby improving the quality of the collected voice.

[0004] The present application provides a method for voice collection, which includes:

[0005] The target voice is obtained by collecting the voice based on the audio collection device, the environmental noise detection is performed on the target voice, the noise reduction processing is performed on the target voice that passes the environmental noise detection, and the target voice after the noise reduction processing is determined;

[0006] Performing gain processing on the target speech after the noise reduction processing, determining the target speech after the gain processing, and storing the target speech after the gain processing in a buffer pool to obtain a speech to be processed;

[0007] Performing voice quality detection under multiple dimensions on the speech to be processed to determine whether the speech to be processed passes the voice quality detection under multiple dimensions;

[0008] If the result is passed, the voice to be processed is cached; if the result is not passed, the voice is collected again.

[0009] In a possible implementation manner, performing environmental noise detection on the target speech includes:

[0010] Performing a root mean square calculation on the energy of the target speech to determine a root mean square energy value of the target speech;

[0011] Determining a target environmental noise level corresponding to the target speech based on a noise energy value corresponding to a preset environmental noise level and a root mean square energy value of the target speech;

[0012] If the target environmental noise level is greater than or equal to the environmental noise level threshold, the target speech fails the environmental noise detection; if the target environmental noise level is less than the environmental noise level threshold, the target speech passes the environmental noise detection.

[0013] In a possible implementation manner, storing the target speech after gain processing in a buffer pool to obtain the speech to be processed includes:

[0014] The target speech after gain processing is subjected to multi-segment buffering processing based on a preset buffering time length, and the target speech after buffering processing is spliced ​​based on a buffering time sequence to obtain the speech to be processed.

[0015] In a possible implementation manner, the performing speech quality detection under multiple dimensions on the speech to be processed to determine whether the speech to be processed passes the speech quality detection under multiple dimensions includes:

[0016] Performing speech clipping detection, speech decentralization detection, speech signal-to-noise ratio detection, effective duration detection, and same-speaker detection on the speech to be processed in sequence, and determining speech quality results of the speech to be processed under different detection dimensions;

[0017] Based on the speech quality results of the speech to be processed under different detection dimensions and the speech quality reference indicators corresponding to the different detection dimensions, it is determined whether the speech to be processed passes the speech quality detection.

[0018] In a possible implementation manner, the speech to be processed is subjected to speech clipping detection, speech decentralization detection, speech signal-to-noise ratio detection, effective duration detection, and same speaker detection in sequence to determine speech quality results of the speech to be processed under different detection dimensions, including:

[0019] Performing voice clipping detection on the speech to be processed to determine the voice clipping result of the speech to be processed;

[0020] Performing voice decentralization detection on the speech to be processed to determine the waveform distortion of the speech to be processed;

[0021] Performing speech signal-to-noise ratio detection on the speech to be processed to determine the signal-to-noise ratio of the speech to be processed;

[0022] Performing effective duration detection on the speech to be processed to determine the effective duration of the speech to be processed;

[0023] Performing the same speaker detection on the speech to be processed to determine the number of speakers of the speech to be processed.

[0024] In a possible implementation manner, determining whether the speech to be processed passes the speech quality detection based on the speech quality results of the speech to be processed under different detection dimensions and the speech quality reference indicators corresponding to the different detection dimensions includes:

[0025] Detecting whether the speech clipping result is less than a clipping threshold in the speech quality reference index;

[0026] If it is less than the clipping threshold, detecting whether the waveform distortion is less than the waveform distortion threshold in the voice quality reference index;

[0027] If it is less than the waveform distortion threshold, detecting whether the signal-to-noise ratio is greater than the signal-to-noise ratio threshold in the voice quality reference index;

[0028] If it is greater than the signal-to-noise ratio threshold, detecting whether the effective duration is greater than the effective duration threshold in the voice quality reference indicator;

[0029] If it is greater than the effective duration threshold, detecting whether the number of speakers is equal to the threshold of the number of speakers in the voice quality reference index;

[0030] If it is equal to the threshold of the number of speakers, it is determined that the speech to be processed passes the speech quality detection under multiple dimensions; if any one of them is not satisfied, it is determined that the speech to be processed fails the speech quality detection under multiple dimensions.

[0031] The present application also provides a voice collection device, which includes:

[0032] A first processing module is used to collect speech based on an audio collection device to obtain a target speech, perform environmental noise detection on the target speech, perform noise reduction processing on the target speech that passes the environmental noise detection, and determine the target speech after the noise reduction processing;

[0033] The second processing module is used to perform gain processing on the target speech after the noise reduction processing, determine the target speech after the gain processing, and store the target speech after the gain processing in a buffer pool to obtain a speech to be processed;

[0034] A voice quality detection module, used to perform voice quality detection under multiple dimensions on the voice to be processed, and determine whether the voice to be processed passes the voice quality detection under multiple dimensions;

[0035] The cache module is used to cache the speech to be processed if it passes, and to re-collect the speech if it fails.

[0036] In a possible implementation manner, when the first processing module is used to perform environmental noise detection on the target speech, the first processing module is specifically used to:

[0037] Performing a root mean square calculation on the energy of the target speech to determine a root mean square energy value of the target speech;

[0038] Determining a target environmental noise level corresponding to the target speech based on a noise energy value corresponding to a preset environmental noise level and a root mean square energy value of the target speech;

[0039] If the target environmental noise level is greater than or equal to the environmental noise level threshold, the target speech fails the environmental noise detection; if the target environmental noise level is less than the environmental noise level threshold, the target speech passes the environmental noise detection.

[0040] An embodiment of the present application also provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the voice collection method as described above are performed.

[0041] The embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the voice collection method as described above are executed.

[0042] The embodiment of the present application provides a method, device, electronic device and storage medium for voice collection, the method for voice collection includes: collecting voice based on an audio collection device to obtain a target voice, performing environmental noise detection on the target voice, performing noise reduction processing on the target voice that passes the environmental noise detection, and determining the target voice after the noise reduction processing; performing gain processing on the target voice after the noise reduction processing, and determining the target voice after the gain processing, and storing the target voice after the gain processing in a buffer pool to obtain a voice to be processed; performing voice quality detection under multiple dimensions on the voice to be processed, and determining whether the voice to be processed passes the voice quality detection under multiple dimensions; if it passes, the voice to be processed is cached, and if it fails, the voice is collected again. This is to solve the problems of distortion clipping, excessive noise, too little voice energy, multiple voices, and insufficient effective time in the process of collecting voice, thereby improving the quality of collected voice.

[0043] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0045] Figure 1 One of the flow charts of a voice collection method provided in an embodiment of the present application;

[0046] Figure 2 The second flowchart of a voice collection method provided in an embodiment of the present application;

[0047] Figure 3 A schematic diagram of the structure of a voice collection device provided in an embodiment of the present application;

[0048] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, each other embodiment obtained by those skilled in the art without making creative work belongs to the scope of protection of the present application.

[0050] First, the application scenarios to which the present application is applicable are introduced. The present application can be applied in the field of speech processing technology.

[0051] Research has found that voiceprints, like fingerprints, irises, and face recognition, are a type of biometric identification and are considered the most natural way of biometric identification and identity verification, also known as voiceprint recognition. The accuracy of voiceprint recognition is strongly related to the quality of voice collection. In order to ensure the accuracy of voiceprint recognition, it is of great significance to improve the quality of collected voice. Existing voice collection technology is easily disturbed when the equipment is collected in a noisy environment. There are problems such as distortion, excessive noise, too little voice energy, multiple voices, and insufficient effective time. If such voices are directly involved in voiceprint recognition, the accuracy of voiceprint recognition will decrease. Therefore, how to improve the quality of voice collection has become a technical issue that cannot be underestimated.

[0052] Based on this, the embodiment of the present application provides a voice collection method to solve the problems of distortion clipping, excessive noise, too little voice energy, multiple voices and insufficient effective time in the voice collection process in the prior art, thereby improving the quality of the collected voice.

[0053] See also Figure 1 , Figure 1 This is one of the flow charts of a voice collection method provided in an embodiment of the present application. Figure 1 As shown in , the voice collection method provided by the embodiment of the present application includes:

[0054] S101: acquiring a target voice by collecting voice based on an audio collection device, performing environmental noise detection on the target voice, performing noise reduction processing on the target voice that passes the environmental noise detection, and determining the target voice after the noise reduction processing.

[0055] In this step, the target voice is obtained by collecting the voice according to the audio collection device, the environmental noise detection is performed on the target voice, and then the target voice that passes the environmental noise detection is subjected to noise reduction processing to determine the target voice after the noise reduction processing.

[0056] Here, voice can be collected according to the microphone device. In this application, a middleware for voice collection is set on the microphone device, and the middleware provides an initialization interface for acquiring the recording device and initializing the recording format; the start recording interface is used to start recording; the pause recording interface is used to pause recording; the resume recording interface is used to resume recording; the stop recording interface is used to stop recording; the release interface is used to stop the device connection; the start recording interface includes returning the voice quality result; the stop recording interface returns the recorded voice data.

[0057] In a possible implementation manner, performing environmental noise detection on the target speech includes:

[0058] A: Perform a root mean square calculation on the energy of the target speech to determine a root mean square energy value of the target speech.

[0059] Here, the root mean square (RMS) calculation is performed on the energy of the target speech to determine the RMS energy value of the target speech.

[0060] The environmental noise uses the root mean square (RMS) energy to measure the difference between the estimated signal and the real signal. The root mean square energy is a measure of signal strength and can be used to detect whether there is speech or noise in the signal. The formula for calculating the root mean square energy is as follows:

[0061]

[0062] Where x[n] is the nth sample point of the target speech, N is the total number of signal samples, and RMS is the root mean square energy value of the target speech.

[0063] B: Based on the noise energy value corresponding to the preset environmental noise level and the root mean square energy value of the target speech, determine the target environmental noise level corresponding to the target speech.

[0064] Here, the target environmental noise level corresponding to the target speech is determined according to the noise energy value corresponding to the preset environmental noise level and the root mean square energy value of the target speech.

[0065] Among them, the root mean square energy value corresponding to the preset environmental noise level of level 1 is 3000, the root mean square energy value corresponding to the environmental noise level of level 2 is 4000, the root mean square energy value corresponding to the environmental noise level of level 3 is 5000, and the root mean square energy value corresponding to the environmental noise level of level 4 is 5000.

[0066] C: If the target environmental noise level is greater than or equal to the environmental noise level threshold, the target speech fails the environmental noise detection; if the target environmental noise level is less than the environmental noise level threshold, the target speech passes the environmental noise detection.

[0067] Here, if the target environmental noise level is greater than or equal to the environmental noise level threshold, the target speech fails the environmental noise detection, and if the target environmental noise level is less than the environmental noise level threshold, the target speech passes the environmental noise detection.

[0068] Among them, the environmental noise level threshold can be three levels. When the RMS is greater than 5000, it will prompt that the noise is too loud and exit the recording.

[0069] S102: performing gain processing on the target speech after the noise reduction processing, determining the target speech after the gain processing, and storing the target speech after the gain processing in a buffer pool to obtain a speech to be processed.

[0070] In this step, gain processing is performed on the target speech after the noise reduction processing to determine the target speech after the gain processing, and the target speech after the gain processing is stored in a buffer pool to obtain the speech to be processed.

[0071] Here, the automatic gain control (AGC) of WebRTC (Web Real-Time Communication) is used to perform gain processing on the collected target voice. In this algorithm, set_mode can be used to set the AGC mode to lkAdaptiveAnalog, an adaptive analog gain control mode.

[0072] In a possible implementation manner, storing the target speech after gain processing in a buffer pool to obtain the speech to be processed includes:

[0073] The target speech after gain processing is subjected to multi-segment buffering processing based on a preset buffering time length, and the target speech after buffering processing is spliced ​​based on a buffering time sequence to obtain the speech to be processed.

[0074] Here, the target speech after gain processing is subjected to multiple-segment buffering processing according to a preset buffering time, and the target speech after buffering processing is spliced ​​according to the buffering time sequence to obtain the speech to be processed.

[0075] The preset buffering time may be 500 milliseconds. During the process of buffering the target voice in the buffer pool, the target voice is not cached, but is only temporarily stored in the buffer pool.

[0076] S103: Perform voice quality detection in multiple dimensions on the speech to be processed to determine whether the speech to be processed passes the voice quality detection in multiple dimensions.

[0077] In this step, the speech to be processed is subjected to speech quality detection in multiple dimensions to determine whether the speech to be processed passes the speech quality detection in multiple dimensions.

[0078] For further information, see Figure 2 , Figure 2 This is a second flow chart of a voice collection method provided in an embodiment of the present application. Figure 2 As shown, the voice quality detection under multiple dimensions is performed on the speech to be processed to determine whether the speech to be processed passes the voice quality detection under multiple dimensions, including:

[0079] S201: performing speech clipping detection, speech decentralization detection, speech signal-to-noise ratio detection, effective duration detection, and same-speaker detection on the speech to be processed in sequence, and determining speech quality results of the speech to be processed under different detection dimensions.

[0080] Here, the speech to be processed is subjected to speech clipping detection, speech decentralization detection, speech signal-to-noise ratio detection, effective duration detection and same-speaker detection in sequence to determine the speech quality results of the speech to be processed under different detection dimensions.

[0081] In a possible implementation manner, the speech to be processed is subjected to speech clipping detection, speech decentralization detection, speech signal-to-noise ratio detection, effective duration detection, and same speaker detection in sequence to determine speech quality results of the speech to be processed under different detection dimensions, including:

[0082] a: Performing voice clipping detection on the speech to be processed to determine the voice clipping result of the speech to be processed.

[0083] Here, voice clipping detection usually refers to measuring the amplitude or energy level of the voice signal to determine the loudness or intensity of the voice. It determines whether the voice waveform has truncation, that is, the value of the voice sampling point is limited to a certain interval, resulting in the loss of actual voice information. The calculation formula of voice clipping detection is as follows:

[0084]

[0085] Where N is the length of the frame, x[n] is the signal sample in the frame. The frame length of N for this detection = 200 sampling points, and E is the result of speech clipping.

[0086] b: Performing speech decentralization detection on the speech to be processed to determine the waveform distortion of the speech to be processed.

[0087] Here, speech decentralization detection is used to detect whether the center of the audio waveform is near the 0 axis, and obtain the waveform distortion. The calculation formula is as follows:

[0088]

[0089] Among them, V1 is the amplitude of the first harmonic, V2 is the amplitude of the harmonic, and THD is the waveform distortion.

[0090] c: Perform speech signal-to-noise ratio detection on the speech to be processed to determine the signal-to-noise ratio of the speech to be processed.

[0091] Here, the signal-to-noise ratio (SNR) detection is a concept commonly used in speech processing and audio engineering. It measures the ratio of useful information (speech) in the signal to background noise. A high SNR means clear speech, while a low SNR means that noise may interfere with the intelligibility of speech. The signal-to-noise ratio calculation formula is as follows:

[0092]

[0093] Among them, P signal Represents the average energy of speech signal, P noise It represents the average energy of noise, and SNR is the signal-to-noise ratio.

[0094] d: Perform effective duration detection on the speech to be processed to determine the effective duration of the speech to be processed.

[0095] Here, the Voice Activity Detection (VAD) of WebRTC (Web Real-Time Communication) is used to detect the effective duration of the collected voice. In this algorithm, set_mode can be used to set the sensitivity of VAD. Voice collection is generally carried out in a standard collection room by default, so the kAggressive mode is used to represent a more aggressive mode, which is more inclined to recognize voice.

[0096] e: Performing same speaker detection on the speech to be processed to determine the number of speakers of the speech to be processed.

[0097] Here, the number of speakers in the buffered speech is estimated. In this process, the speech is segmented through Voice Activity Detection (VAD). After obtaining the speech feature information of each segment, K-means clustering is performed on the feature information to remove segments that are too short. The final segment data is the estimated number of speakers.

[0098] S202: Determine whether the speech to be processed passes the speech quality detection based on the speech quality results of the speech to be processed under different detection dimensions and the speech quality reference indicators corresponding to the different detection dimensions.

[0099] In this step, whether the speech to be processed passes the speech quality detection is determined based on the speech quality results of the speech to be processed under different detection dimensions and the speech quality reference indicators corresponding to the different detection dimensions.

[0100] In a possible implementation manner, determining whether the speech to be processed passes the speech quality detection based on the speech quality results of the speech to be processed under different detection dimensions and the speech quality reference indicators corresponding to the different detection dimensions includes:

[0101] Detect whether the speech clipping result is less than the clipping threshold in the speech quality reference index; if it is less than the clipping threshold, detect whether the waveform distortion is less than the waveform distortion threshold in the speech quality reference index; if it is less than the waveform distortion threshold, detect whether the signal-to-noise ratio is greater than the signal-to-noise ratio threshold in the speech quality reference index; if it is greater than the signal-to-noise ratio threshold, detect whether the effective time is greater than the effective time threshold in the speech quality reference index; if it is greater than the effective time threshold, detect whether the number of speakers is equal to the speaker number threshold in the speech quality reference index; if it is equal to the speaker number threshold, determine that the speech to be processed passes the speech quality detection under multiple dimensions, and if any one of them is not satisfied, determine that the speech to be processed does not pass the speech quality detection under multiple dimensions.

[0102] Here, the clipping threshold is 10, the waveform distortion threshold is 0.02%, the signal-to-noise ratio threshold is 64 dB, the effective duration threshold is 180 seconds, and the number of speakers threshold is 1.

[0103] S104: If the voice to be processed is passed, the voice to be processed is cached; if the voice to be processed is not passed, the voice is collected again.

[0104] This application performs environmental noise detection, noise reduction processing, gain processing on the collected voice, and performs quality detection such as clipping detection, decentralization detection, signal-to-noise ratio detection, effective duration detection, same speaker detection, etc. on the collected voice, and provides voice quality reference indicators to provide an objective reference basis for whether the collected voice can meet the quality requirements.

[0105] The embodiment of the present application provides a method for voice collection, which includes: collecting voice based on an audio collection device to obtain a target voice, performing environmental noise detection on the target voice, performing noise reduction processing on the target voice that passes the environmental noise detection, and determining the target voice after the noise reduction processing; performing gain processing on the target voice after the noise reduction processing, determining the target voice after the gain processing, and storing the target voice after the gain processing in a buffer pool to obtain a voice to be processed; performing voice quality detection under multiple dimensions on the voice to be processed, and determining whether the voice to be processed passes the voice quality detection under multiple dimensions; if it passes, caching the voice to be processed, and if it fails, re-collecting the voice. This is to solve the problems of distorted clipping, excessive noise, too little voice energy, multiple voices, and insufficient effective time in the process of collecting voice, thereby improving the quality of collected voice.

[0106] See also Figure 3 , Figure 3 This is a schematic diagram of the structure of a voice collection device provided in an embodiment of the present application. Figure 3 As shown in , the voice collection device 300 includes:

[0107] The first processing module 310 is used to collect the speech based on the audio collection device to obtain the target speech, perform environmental noise detection on the target speech, perform noise reduction processing on the target speech that passes the environmental noise detection, and determine the target speech after the noise reduction processing;

[0108] The second processing module 320 is used to perform gain processing on the target speech after the noise reduction processing, determine the target speech after the gain processing, and store the target speech after the gain processing in a buffer pool to obtain a speech to be processed;

[0109] A voice quality detection module 330 is used to perform voice quality detection under multiple dimensions on the speech to be processed, and determine whether the speech to be processed passes the voice quality detection under multiple dimensions;

[0110] The cache module 340 is used to cache the speech to be processed if it passes, and to re-collect the speech if it fails.

[0111] Further, when the first processing module 310 is used to perform environmental noise detection on the target speech, the first processing module 310 is specifically used to:

[0112] Performing a root mean square calculation on the energy of the target speech to determine a root mean square energy value of the target speech;

[0113] Determining a target environmental noise level corresponding to the target speech based on a noise energy value corresponding to a preset environmental noise level and a root mean square energy value of the target speech;

[0114] If the target environmental noise level is greater than or equal to the environmental noise level threshold, the target speech fails the environmental noise detection; if the target environmental noise level is less than the environmental noise level threshold, the target speech passes the environmental noise detection.

[0115] Further, when the second processing module 320 is used to store the target speech after gain processing in the buffer pool to obtain the speech to be processed, the second processing module 320 is specifically used to:

[0116] The target speech after gain processing is subjected to multi-segment buffering processing based on a preset buffering time length, and the target speech after buffering processing is spliced ​​based on a buffering time sequence to obtain the speech to be processed.

[0117] Further, the performing voice quality detection under multiple dimensions on the speech to be processed to determine whether the speech to be processed passes the voice quality detection under multiple dimensions includes:

[0118] Performing speech clipping detection, speech decentralization detection, speech signal-to-noise ratio detection, effective duration detection, and same-speaker detection on the speech to be processed in sequence, and determining speech quality results of the speech to be processed under different detection dimensions;

[0119] Based on the speech quality results of the speech to be processed under different detection dimensions and the speech quality reference indicators corresponding to the different detection dimensions, it is determined whether the speech to be processed passes the speech quality detection.

[0120] Further, when the voice quality detection module 330 is used to sequentially perform voice clipping detection, voice decentralization detection, voice signal-to-noise ratio detection, effective duration detection, and same speaker detection on the voice to be processed, and determine the voice quality results of the voice to be processed under different detection dimensions, the voice quality detection module 330 is specifically used to:

[0121] Performing voice clipping detection on the speech to be processed to determine the voice clipping result of the speech to be processed;

[0122] Performing voice decentralization detection on the speech to be processed to determine the waveform distortion of the speech to be processed;

[0123] Performing speech signal-to-noise ratio detection on the speech to be processed to determine the signal-to-noise ratio of the speech to be processed;

[0124] Performing effective duration detection on the speech to be processed to determine the effective duration of the speech to be processed;

[0125] Performing the same speaker detection on the speech to be processed to determine the number of speakers of the speech to be processed.

[0126] Further, when the voice quality detection module 330 is used to determine whether the voice to be processed passes the voice quality detection based on the voice quality results of the voice to be processed under different detection dimensions and the voice quality reference indicators corresponding to the different detection dimensions, the voice quality detection module 330 is specifically used to:

[0127] Detecting whether the speech clipping result is less than a clipping threshold in the speech quality reference index;

[0128] If it is less than the clipping threshold, detecting whether the waveform distortion is less than the waveform distortion threshold in the voice quality reference index;

[0129] If it is less than the waveform distortion threshold, detecting whether the signal-to-noise ratio is greater than the signal-to-noise ratio threshold in the voice quality reference index;

[0130] If it is greater than the signal-to-noise ratio threshold, detecting whether the effective duration is greater than the effective duration threshold in the voice quality reference indicator;

[0131] If it is greater than the effective duration threshold, detecting whether the number of speakers is equal to the threshold of the number of speakers in the voice quality reference index;

[0132] If it is equal to the threshold of the number of speakers, it is determined that the speech to be processed passes the speech quality detection under multiple dimensions; if any one of them is not satisfied, it is determined that the speech to be processed fails the speech quality detection under multiple dimensions.

[0133] The embodiment of the present application provides a voice collection device, which includes: a first processing module, which is used to collect voice based on an audio collection device to obtain a target voice, perform environmental noise detection on the target voice, perform noise reduction processing on the target voice that passes the environmental noise detection, and determine the target voice after the noise reduction processing; a second processing module, which is used to perform gain processing on the target voice after the noise reduction processing, determine the target voice after the gain processing, and store the target voice after the gain processing in a buffer pool to obtain a voice to be processed; a voice quality detection module, which is used to perform voice quality detection under multiple dimensions on the voice to be processed, and determine whether the voice to be processed passes the voice quality detection under multiple dimensions; a buffer module, which is used to cache the voice to be processed if it passes, and re-collect the voice if it fails. In order to solve the problems of distortion clipping, excessive noise, too small voice energy, multiple voices, and insufficient effective time in the process of collecting voice in the prior art, thereby improving the quality of collected voice.

[0134] See also Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 4 As shown in , the electronic device 400 includes a processor 410 , a memory 420 and a bus 430 .

[0135] The memory 420 stores machine-readable instructions executable by the processor 410. When the electronic device 400 is running, the processor 410 communicates with the memory 420 via the bus 430. When the machine-readable instructions are executed by the processor 410, the above-mentioned Figure 1 as well as Figure 2 The steps of the voice collection method in the method embodiment shown, the specific implementation method can be found in the method embodiment, and will not be repeated here.

[0136] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the computer program can execute the above-mentioned Figure 1 as well as Figure 2 The steps of the voice collection method in the method embodiment shown, the specific implementation method can be found in the method embodiment, and will not be repeated here.

[0137] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0138] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. 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. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0139] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0140] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0141] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application can essentially or in other words, the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0142] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and 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 voice collection method, characterized in that: The voice collection method comprises: The target voice is obtained by collecting the voice based on the audio collection device, the environmental noise detection is performed on the target voice, the noise reduction processing is performed on the target voice that passes the environmental noise detection, and the target voice after the noise reduction processing is determined; Performing gain processing on the target speech after the noise reduction processing, determining the target speech after the gain processing, and storing the target speech after the gain processing in a buffer pool to obtain a speech to be processed; Performing voice quality detection under multiple dimensions on the speech to be processed to determine whether the speech to be processed passes the voice quality detection under multiple dimensions; If the result is passed, the voice to be processed is cached; if the result is not passed, the voice is collected again.

2. The voice collection method according to claim 1, characterized in that: Performing environmental noise detection on the target speech includes: Performing a root mean square calculation on the energy of the target speech to determine a root mean square energy value of the target speech; Determining a target environmental noise level corresponding to the target speech based on a noise energy value corresponding to a preset environmental noise level and a root mean square energy value of the target speech; If the target environmental noise level is greater than or equal to the environmental noise level threshold, the target speech fails the environmental noise detection; if the target environmental noise level is less than the environmental noise level threshold, the target speech passes the environmental noise detection.

3. The voice collection method according to claim 1, characterized in that: The step of storing the target speech after gain processing in a buffer pool to obtain speech to be processed includes: The target speech after gain processing is subjected to multi-segment buffering processing based on a preset buffering time length, and the target speech after buffering processing is spliced ​​based on the buffering time sequence to obtain the speech to be processed.

4. The voice collection method according to claim 1, characterized in that: The performing speech quality detection under multiple dimensions on the speech to be processed to determine whether the speech to be processed passes the speech quality detection under multiple dimensions includes: Performing speech clipping detection, speech decentralization detection, speech signal-to-noise ratio detection, effective duration detection, and same-speaker detection on the speech to be processed in sequence, and determining speech quality results of the speech to be processed under different detection dimensions; Based on the speech quality results of the speech to be processed under different detection dimensions and the speech quality reference indicators corresponding to the different detection dimensions, it is determined whether the speech to be processed passes the speech quality detection.

5. The voice collection method according to claim 4, characterized in that: The step of sequentially performing speech clipping detection, speech decentralization detection, speech signal-to-noise ratio detection, effective duration detection, and same speaker detection on the speech to be processed to determine speech quality results of the speech to be processed under different detection dimensions includes: Performing voice clipping detection on the speech to be processed to determine the voice clipping result of the speech to be processed; Performing voice decentralization detection on the speech to be processed to determine the waveform distortion of the speech to be processed; Performing speech signal-to-noise ratio detection on the speech to be processed to determine the signal-to-noise ratio of the speech to be processed; Performing effective duration detection on the speech to be processed to determine the effective duration of the speech to be processed; Performing the same speaker detection on the speech to be processed to determine the number of speakers of the speech to be processed.

6. The voice collection method according to claim 5, characterized in that: The determining whether the speech to be processed passes the speech quality detection based on the speech quality results of the speech to be processed under different detection dimensions and the speech quality reference indicators corresponding to the different detection dimensions includes: Detecting whether the speech clipping result is less than a clipping threshold in the speech quality reference index; If it is less than the clipping threshold, detecting whether the waveform distortion is less than the waveform distortion threshold in the voice quality reference index; If it is less than the waveform distortion threshold, detecting whether the signal-to-noise ratio is greater than the signal-to-noise ratio threshold in the voice quality reference index; If it is greater than the signal-to-noise ratio threshold, detecting whether the effective duration is greater than the effective duration threshold in the voice quality reference indicator; If it is greater than the effective duration threshold, detecting whether the number of speakers is equal to the threshold of the number of speakers in the voice quality reference index; If it is equal to the threshold of the number of speakers, it is determined that the speech to be processed passes the speech quality detection under multiple dimensions; if any one of them is not satisfied, it is determined that the speech to be processed fails the speech quality detection under multiple dimensions.

7. A voice collection device, characterized in that: The voice collection device comprises: A first processing module is used to collect speech based on an audio collection device to obtain a target speech, perform environmental noise detection on the target speech, perform noise reduction processing on the target speech that passes the environmental noise detection, and determine the target speech after the noise reduction processing; The second processing module is used to perform gain processing on the target speech after the noise reduction processing, determine the target speech after the gain processing, and store the target speech after the gain processing in a buffer pool to obtain a speech to be processed; A voice quality detection module, used to perform voice quality detection under multiple dimensions on the voice to be processed, and determine whether the voice to be processed passes the voice quality detection under multiple dimensions; The cache module is used to cache the speech to be processed if it passes, and to re-collect the speech if it fails.

8. The voice collection device according to claim 7, characterized in that: When the first processing module is used to perform environmental noise detection on the target speech, the first processing module is specifically used to: Performing a root mean square calculation on the energy of the target speech to determine a root mean square energy value of the target speech; Determining a target environmental noise level corresponding to the target speech based on a noise energy value corresponding to a preset environmental noise level and a root mean square energy value of the target speech; If the target environmental noise level is greater than or equal to the environmental noise level threshold, the target speech fails the environmental noise detection; if the target environmental noise level is less than the environmental noise level threshold, the target speech passes the environmental noise detection.

9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the voice collection method as described in any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the voice collection method according to any one of claims 1 to 6 are executed.