Voice extraction method and device based on audio classification model, and electronic equipment

Through the speech extraction method based on the audio classification model, pure human voice fragments are extracted, which solves the problem of noise interference and improves the accuracy of voiceprint recognition and the efficiency of identity verification.

CN118737128APending Publication Date: 2024-10-01PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410866988.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Noise seriously affects the accuracy of voiceprint recognition models. Existing noise removal tools have low accuracy and cannot completely eliminate noise interference, resulting in identity verification failure or misjudgment.

Method used

The speech extraction method based on the audio classification model is used to obtain audio clips and data sets, train the audio classification model, extract voiceprint feature vectors, perform audio splicing and speech sorting, extract pure speech clips, and reduce the impact of noise.

Benefits of technology

Effectively reduce the impact of noise on audio, extract pure human voice fragments, and improve the accuracy of voiceprint recognition and the efficiency of identity verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118737128A_ABST
    Figure CN118737128A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a voice extraction method and device based on an audio classification model, and electronic equipment, and belongs to the technical field of financial science and technology. The method comprises the following steps: acquiring a plurality of audio clips and an audio data set; inputting the audio data set into a preset audio classification model for model training to obtain a pre-trained audio classification model; performing feature extraction on all the audio clips through a preset voiceprint model to obtain a plurality of voiceprint feature vectors; performing audio splicing on the audio clips according to the voiceprint feature vectors to obtain a plurality of voice clips; performing voice sorting on all the voice segments based on a pre-trained audio classification model to obtain a voice sequence; and extracting a voice segment at a preset position in the voice sequence as a target voice segment. According to the embodiment of the invention, the influence of noise on audio can be reduced, and pure voice segments can be extracted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of financial technology, and in particular to a speech extraction method, device and electronic device based on an audio classification model. Background Art

[0002] With the continuous development of science and technology, voiceprint recognition technology has been widely used in many industries and scenarios, such as security authentication, customer service, smart home, etc. However, noise is an important factor that seriously affects the accuracy of voiceprint recognition models. The noise here usually refers to other sounds besides human voice, including silence, environmental noise, background human voice, etc. Taking the financial industry as an example, in financial transactions, voiceprint recognition can be used as a security measure to verify the identity of the user. However, noise may mask or distort key features in the voiceprint, resulting in identity authentication failure or misjudgment. Alternatively, in remote account opening scenarios, voiceprint recognition is used to confirm the identity of the user, and noise may make the identity authentication process complicated and time-consuming.

[0003] At present, there are some noise removal tools on the market that can effectively remove silence from audio. Some noise recognition models can recognize and remove noise from speech fragments, but the accuracy is not high. Although these methods can reduce the impact of noise to a certain extent, they do not completely remove noise fragments and cannot eliminate noise interference in voiceprint recognition tasks. Therefore, how to extract the cleanest human voice fragments from noisy audio is a very valuable and practical research topic. Summary of the invention

[0004] The main purpose of the embodiments of the present application is to propose a speech extraction method, device and electronic device based on an audio classification model, which can reduce the impact of noise on audio and extract pure speech fragments.

[0005] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a speech extraction method based on an audio classification model, the method comprising:

[0006] Get multiple audio clips and audio datasets;

[0007] Inputting the audio data set into a preset audio classification model for model training to obtain a pre-trained audio classification model;

[0008] Extracting features from all the audio clips using a preset voiceprint model to obtain multiple voiceprint feature vectors;

[0009] Performing audio splicing on the audio segments according to the voiceprint feature vector to obtain multiple voice segments;

[0010] Sorting all the speech segments based on a pre-trained audio classification model to obtain a speech sequence;

[0011] A speech segment at a preset position in the speech sequence is extracted as a target speech segment.

[0012] In some embodiments, the voice sorting of all the voice segments based on the pre-trained audio classification model to obtain a voice sequence includes:

[0013] For each of the speech segments, determining the segment length of the speech segment;

[0014] Inputting the speech segment into a pre-trained audio classification model for probability calculation, and outputting the human voice probability of the speech segment, wherein the human voice probability is used to characterize the probability that the speech segment belongs to a human voice;

[0015] Determining the sorting weight of the speech segments according to the segment duration and the human voice probability;

[0016] The speech segments are sorted based on the sorting weights to obtain a speech sequence.

[0017] In some embodiments, the audio segments are spliced ​​according to the voiceprint feature vector to obtain multiple voice segments, including:

[0018] Performing a clustering operation on all the voiceprint feature vectors based on a preset clustering algorithm to obtain a plurality of clustering results, wherein the clustering results are used to characterize the category to which the voiceprint feature vector belongs;

[0019] The audio segments are spliced ​​according to the clustering results to obtain multiple voice segments.

[0020] In some embodiments, the audio segments are spliced ​​according to the clustering results to obtain multiple voice segments, including:

[0021] Obtaining a category label for each of the clustering results;

[0022] Grouping the audio clips according to the category labels to obtain a plurality of audio groups, wherein each of the audio groups includes at least one audio clip;

[0023] For each of the audio groups, audio splicing is performed on all the audio segments in the audio group to obtain multiple voice segments.

[0024] In some embodiments, the feature extraction of all the audio clips by using a preset voiceprint model to obtain a plurality of voiceprint feature vectors includes:

[0025] For each of the audio clips, inputting the audio clip into a preset voiceprint model, so that the voiceprint model extracts features of the audio clip layer by layer and outputs multiple layer feature vectors;

[0026] A target layer feature vector of a preset layer is screened out from the layer feature vectors, and the target layer feature vector is used as the voiceprint feature vector of the audio clip.

[0027] In some embodiments, inputting the audio data set into a preset audio classification model for model training to obtain a pre-trained audio classification model includes:

[0028] Dividing the audio data set based on a preset ratio to obtain a training set, a validation set, and a test set;

[0029] Inputting the training set into a preset audio classification model for probability prediction, and outputting the probability prediction value;

[0030] Performing model training on the audio classification model according to the probability prediction value, the validation set, and the test set to obtain a model evaluation value;

[0031] When the model evaluation value meets the preset model indicator conditions, the audio classification model after model training is used as the pre-trained audio classification model.

[0032] In some embodiments, the audio clip is obtained by the following steps:

[0033] Get the audio to be processed;

[0034] Performing voice activity detection on the audio to be processed, and performing semantic segmentation on the audio to be processed after the voice activity detection, to obtain multiple audio segments.

[0035] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application proposes a speech extraction device based on an audio classification model, the device comprising:

[0036] A data acquisition module, used to acquire multiple audio clips and audio data sets;

[0037] A model training module, used to input the audio data set into a preset audio classification model for model training to obtain a pre-trained audio classification model;

[0038] A feature extraction module, used to extract features from all the audio clips using a preset voiceprint model to obtain multiple voiceprint feature vectors;

[0039] An audio splicing module, used for performing audio splicing on the audio segments according to the voiceprint feature vector to obtain multiple voice segments;

[0040] A speech sorting module, used for performing speech sorting on all the speech segments based on a pre-trained audio classification model to obtain a speech sequence;

[0041] The target extraction module is used to extract the speech segment at a preset position in the speech sequence as the target speech segment.

[0042] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, an electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the speech extraction method based on the audio classification model as described in the first aspect when executing the computer program.

[0043] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the speech extraction method based on the audio classification model as described in the first aspect.

[0044] The present application proposes a speech extraction method, device, electronic device and storage medium based on an audio classification model. First, multiple audio clips and audio data sets are obtained, and then the audio data sets are input into a preset audio classification model to train the audio classification model, improve the classification accuracy of the audio by the audio classification model, and obtain a pre-trained audio classification model. After that, feature extraction is performed on all audio clips through a preset voiceprint model to obtain multiple voiceprint feature vectors to capture the voice of each speaker. Then, audio splicing is performed on the audio clips according to the voiceprint feature vectors to obtain multiple voice clips, so that audio clips of the same category can be spliced ​​together to improve the audio quality. All voice clips are voice sorted based on the pre-trained audio classification model to obtain a voice sequence, which can ensure that the voice clips are arranged in order according to specific standards or features, which is convenient for subsequent processing and analysis, making the audio clip screening more reasonable and effective. Finally, the voice clip at a preset position in the voice sequence is extracted as the target voice clip, so that pure human voice clips can be extracted from audio with noise. The embodiment of the present application can reduce the impact of noise on audio by extracting features from audio clips and performing audio splicing on the audio clips, then sorting the voice clips and extracting the voice clips at a preset position as the target voice clip, thereby achieving reasonable sorting and screening of multiple voice clips and extraction of pure vocal clips. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 is a flow chart of a speech extraction method based on an audio classification model provided in an embodiment of the present application;

[0046] Figure 2 yes Figure 1Flow chart of step S105 in FIG.

[0047] Figure 3 yes Figure 1 Flow chart of step S104 in FIG.

[0048] Figure 4 yes Figure 3 Flow chart of step S302 in FIG.

[0049] Figure 5 yes Figure 1 Flow chart of step S103 in FIG.

[0050] Figure 6 yes Figure 1 Flow chart of step S102 in FIG.

[0051] Figure 7 is a flowchart of obtaining an audio clip provided in an embodiment of the present application;

[0052] Figure 8 It is a structural schematic diagram of a speech extraction device based on an audio classification model provided in an embodiment of the present application;

[0053] Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0055] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0057] First, some nouns involved in this application are analyzed:

[0058] Natural Language Processing (NLP): NLP uses computers to process, understand, and apply human languages ​​(such as Chinese and English). NLP is a branch of artificial intelligence and an interdisciplinary subject between computer science and linguistics. It is often referred to as computational linguistics. Natural language processing includes grammatical analysis, semantic analysis, and text understanding. Natural language processing is often used in technical fields such as machine translation, handwritten and printed character recognition, speech recognition and text-to-speech conversion, information intent recognition, information extraction and filtering, text classification and clustering, public opinion analysis, and opinion mining. It involves data mining related to language processing, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research, and linguistic research related to language computing.

[0059] Voice Activity Detection (VAD): refers to voice activity detection. It is an audio signal processing technology used to identify whether there is human voice or speech in the audio signal.

[0060] Recurrent Neural Network (RNN): is a deep learning model suitable for sequence data, which can process dynamic features in the sequence. The core feature of RNN is that the neurons in the network have recurrent connections, allowing information to be transmitted over time.

[0061] Convolutional Neural Network (CNN): A deep learning architecture that is particularly suitable for processing data with grid-like topology, such as images (2D grids) and videos (3D grids).

[0062] Clustering algorithm: Clustering algorithm is a method of unsupervised learning, which is used to divide the samples in the data set into several clusters (or groups) so that the samples in the same cluster have high similarity, while the samples in different clusters have low similarity.

[0063] K-Means clustering algorithm (K-Means): is a popular clustering algorithm used to divide data points into K clusters. The basic idea of ​​this algorithm is to group data points so that the distance between each data point and the center (i.e., centroid) of its cluster is minimized.

[0064] Based on this, the embodiments of the present application provide a speech extraction method and device, an electronic device and a storage medium based on an audio classification model, which can reduce the impact of noise on audio and extract pure speech fragments.

[0065] The speech extraction method and device based on the audio classification model, electronic device and storage medium provided in the embodiments of the present application are specifically illustrated through the following embodiments. First, the speech extraction method based on the audio classification model in the embodiments of the present application is described.

[0066] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0067] The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. Artificial intelligence software technologies mainly include computer vision technology, robotics technology, biometrics technology, module management technology of online meeting systems, natural language processing technology, and machine learning / deep learning.

[0068] The speech extraction method based on the audio classification model provided in the embodiment of the present application relates to the field of data processing technology. The speech extraction method based on the audio classification model provided in the embodiment of the present application can be applied to the terminal, can also be applied to the server side, and can also be software running in the terminal or the server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or it can be configured as a server cluster or a distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the speech extraction method based on the audio classification model, etc., but is not limited to the above forms.

[0069] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0070] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with the relevant laws, regulations, and standards of the relevant countries and regions. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.

[0071] With the continuous development of science and technology, voiceprint recognition technology has been widely used in many industries and scenarios, such as security authentication, customer service, smart home, etc. However, noise is an important factor that seriously affects the accuracy of voiceprint recognition models. The noise here usually refers to other sounds besides human voice, including silence, environmental noise, background human voice, etc. Taking the financial industry as an example, in financial transactions, voiceprint recognition can be used as a security measure to verify the identity of the user. However, noise may mask or distort key features in the voiceprint, resulting in identity authentication failure or misjudgment. Alternatively, in remote account opening scenarios, voiceprint recognition is used to confirm the identity of the user, and noise may make the identity authentication process complicated and time-consuming.

[0072] At present, there are some noise removal tools on the market that can effectively remove silence from audio. Some noise recognition models can recognize and remove noise from speech fragments, but the accuracy is not high. Although these methods can reduce the impact of noise to a certain extent, they do not completely remove noise fragments and cannot eliminate noise interference in voiceprint recognition tasks. Therefore, how to extract the cleanest human voice fragments from noisy audio is a very valuable and practical research topic.

[0073] In order to solve the above problems, the present embodiment provides a speech extraction method, device, electronic device and storage medium based on an audio classification model. First, multiple audio clips and audio data sets are obtained, and then the audio data sets are input into a preset audio classification model to train the audio classification model, improve the classification accuracy of the audio by the audio classification model, and obtain a pre-trained audio classification model. After that, feature extraction is performed on all audio clips through a preset voiceprint model to obtain multiple voiceprint feature vectors to capture the voice of each speaker. Then, audio splicing is performed on the audio clips according to the voiceprint feature vectors to obtain multiple voice clips, so that audio clips of the same category can be spliced ​​together to improve the audio quality. All voice clips are voice sorted based on the pre-trained audio classification model to obtain a voice sequence, which can ensure that the voice clips are arranged in order according to specific standards or features, which is convenient for subsequent processing and analysis, making the audio clip screening more reasonable and effective. Finally, the voice clip at a preset position in the voice sequence is extracted as the target voice clip, so that a pure human voice clip can be extracted from the audio with noise. The embodiment of the present application can reduce the impact of noise on audio by extracting features from audio clips and performing audio splicing on the audio clips, then sorting the voice clips and extracting the voice clips at a preset position as the target voice clip, thereby achieving reasonable sorting and screening of multiple voice clips and extraction of pure vocal clips.

[0074] The following is a detailed description with reference to the accompanying drawings.

[0075] Figure 1 is an optional flowchart of the speech extraction method based on the audio classification model provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S106.

[0076] Step S101: Acquire multiple audio clips and audio data sets.

[0077] In step S101 in some embodiments, multiple audio clips of multiple speakers are obtained, and an audio dataset is obtained from an open source dataset to facilitate subsequent training of the model.

[0078] It should be noted that the audio clip is a sound clip including multiple speakers, and the audio dataset is an audio dataset including multiple types of speech events, wherein the audio dataset can be obtained through an open source database, such as Audio Set, FreeSound Dataset, etc., and the embodiments of the present application do not make specific limitations.

[0079] Step S102: input the audio data set into a preset audio classification model for model training to obtain a pre-trained audio classification model.

[0080] It should be noted that the model architecture of the audio classification model in the embodiments of the present application includes but is not limited to RNN (Recurrent Neural Network), CNN (Convolutional Neural Network), Transformer, etc.

[0081] In step S102 of some embodiments, the audio data set is input into a preset audio classification model for model training, so that the audio classification model can recognize the probability of human voice in the audio, obtain a pre-trained audio classification model, and improve the performance and accuracy of the audio classification model in practical applications.

[0082] Step S103: extracting features from all audio clips using a preset voiceprint model to obtain a plurality of voiceprint feature vectors.

[0083] In step S103 in some embodiments, all audio clips are input into a preset voiceprint model for feature extraction. Specifically, in the embodiments of the present application, the audio clips are input into a preset voiceprint model, and the audio clips are forward propagated in the model so that the voiceprint model extracts the acoustic features of the audio clips layer by layer to obtain multiple voiceprint feature vectors, thereby capturing a variety of sound features from low-level to high-level, thereby improving the accuracy of voiceprint recognition.

[0084] It should be noted that the voiceprint model includes multiple layers, and the voiceprint model in the embodiment of the present application is a trained voiceprint model. Specifically, the voiceprint model can be a warming model based on deep learning, a voiceprint model based on end-to-end learning, a voiceprint model based on an attention mechanism, etc. The embodiment of the present application does not make specific restrictions.

[0085] Step S104: splicing the audio segments according to the voiceprint feature vectors to obtain multiple voice segments.

[0086] In step S104 of some embodiments, since the current voiceprint feature vectors are scattered feature vectors, in order to improve the accuracy of audio extraction, the embodiments of the present application perform audio splicing on the audio segments according to the voiceprint feature vectors. Specifically, multiple voice segments are obtained by clustering and splicing, thereby enhancing the coherence and integrity of the voice content and improving the accuracy of the speech recognition system.

[0087] Step S105, sorting all speech segments based on the pre-trained audio classification model to obtain a speech sequence.

[0088] In step S105 of some embodiments, all voice segments are input into the audio classification model pre-trained in step S102, so that the audio classification model pre-trained in step S102 performs voice sorting on all voice segments to obtain voice sequences. By sorting the voice segments, interference from noise segments or silent segments can be avoided, thereby improving the accuracy of voice extraction, and achieving more efficient and secure identity authentication for industries such as finance and security.

[0089] Step S106: extracting a speech segment at a preset position in the speech sequence as a target speech segment.

[0090] In step S106 of some embodiments, after obtaining the speech sequence, the embodiments of the present application will extract the speech segment at a preset position in the speech sequence as the target speech segment, thereby enabling reasonable sorting and screening of multiple speech segments and extraction of pure vocal segments.

[0091] It should be noted that the preset position can be determined according to the sorting rules of the speech sequence. For example, when the purity of the speech segments in the speech sequence increases successively, the last speech segment in the speech sequence is extracted as the target speech segment; when the purity of the speech segments in the speech sequence decreases successively, the first speech segment in the speech sequence is extracted as the target speech segment.

[0092] Among them, the purity of the speech segment is used to characterize the proportion of human voice and noise in the speech segment. The higher the purity, the greater the proportion of human voice in the speech segment, and the lower the purity, the smaller the proportion of human voice in the speech segment. The embodiment of this application does not make specific restrictions on the sorting rules.

[0093] See also Figure 2 In some embodiments, step S105 may also include but is not limited to steps S201 to S204.

[0094] Step S201: for each speech segment, determine the segment length of the speech segment.

[0095] Step S202: input the speech segment into a pre-trained audio classification model for probability calculation, and output the human voice probability of the speech segment.

[0096] It should be noted that the human voice probability is used to represent the probability that the speech segment belongs to the human voice.

[0097] Step S203: determining the sorting weight of the speech segments according to the segment duration and the probability of human voice.

[0098] Step S204: sort the speech segments based on the sorting weights to obtain a speech sequence.

[0099] In steps S201 to S204 of some embodiments, in the process of voice sorting of all voice segments, firstly, the segment duration of each voice segment is determined, denoted as t, and then the voice segment is input into the pre-trained audio classification model for probability calculation to obtain the probability that the voice segment belongs to human voice, and the human voice probability corresponding to the voice segment is output, denoted as p. Then, the sorting weight of the voice segment is determined according to the segment duration and the human voice probability. Specifically, the segment duration is multiplied by the human voice probability to obtain the sorting weight of the voice segment, that is, t*p. Finally, all voice segments are sorted according to the sorting weight of each voice segment to obtain a voice sequence, so that the voice segments can be sorted in combination with the two dimensions of duration and human voice probability, which is more reasonable and effective in audio segment screening. This method greatly reduces the impact of noise on voiceprint recognition results, avoids interference from noise segments or silent segments, improves the accuracy of voice extraction, and achieves more efficient and secure identity authentication for industries such as finance and security.

[0100] It is worth noting that the embodiments of the present application can arrange the speech segments in ascending order of the sorting weight, or can arrange the speech segments in descending order of the sorting weight. When the speech segments are arranged in ascending order of the sorting weight, the purity of the speech segments in the speech sequence increases successively, that is, the later the ranking, the purer the speech segments; when the speech segments are arranged in descending order of the sorting weight, the purity of the speech segments in the speech sequence decreases successively, that is, the earlier the ranking, the purer the speech segments, wherein the purity of the speech segments is used to characterize the proportion of human voice and noise in the speech segment, the higher the purity, the greater the proportion of human voice in the speech segment, and the lower the purity, the smaller the proportion of human voice in the speech segment. The embodiments of the present application do not make specific restrictions on the sorting rules.

[0101] See also Figure 3 In some embodiments, step S104 may also include but is not limited to steps S301 to S302.

[0102] Step S301: clustering all voiceprint feature vectors based on a preset clustering algorithm to obtain multiple clustering results.

[0103] It should be noted that the clustering result is used to characterize the category to which the voiceprint feature vector belongs.

[0104] Step S302: splicing the audio segments according to the clustering results to obtain multiple speech segments.

[0105] In steps S301 to S302 of some embodiments, in the process of audio splicing of audio clips according to voiceprint feature vectors, firstly, a clustering operation is performed on all voiceprint feature vectors by a clustering algorithm to mark the category to which each voiceprint feature vector belongs, and voiceprint feature vectors of the same category are divided into a clustering result to obtain multiple clustering results, wherein the voiceprint feature vectors in each clustering result are of the same category, and then the audio clips are audio spliced ​​according to the clustering results to obtain multiple voice clips. The embodiments of the present application enhance the coherence and integrity of the voice content through clustering and splicing, and can improve the accuracy of the voice recognition system.

[0106] It should be noted that the clustering algorithm in the embodiments of the present application may be K-Means, hierarchical clustering and other algorithms. Taking the clustering algorithm K-Means as an example, during the clustering operation, the number of clusters is determined in advance, and then all voiceprint feature vectors are input into the clustering algorithm for clustering analysis to obtain preliminary clustering results. The preliminary clustering results are then analyzed to determine the center and members of each cluster. According to the cluster to which the feature vector belongs, the audio clips are mapped to the corresponding cluster to obtain multiple clustering results.

[0107] See also Figure 4 In some embodiments, step S302 may also include but is not limited to steps S401 to S403.

[0108] Step S401, obtaining the category label of each clustering result.

[0109] Step S402: group the audio clips according to the category labels to obtain a plurality of audio groups.

[0110] It should be noted that each audio group includes at least one audio segment.

[0111] Step S403: for each audio group, audio splicing is performed on all audio segments in the audio group to obtain multiple voice segments.

[0112] In steps S401 to S403 of some embodiments, in the process of performing audio splicing on audio clips according to the clustering results, after the voiceprint feature vectors are clustered, the category to which each voiceprint feature vector belongs will be marked. At this time, the category label of each clustering result is obtained, and then the audio clips are grouped according to the category label, and the clips of the same category are grouped together to obtain multiple audio groups. For each audio group, audio splicing is performed on all audio clips in the audio group to obtain multiple spliced ​​voice clips, so that audio clips of the same category can be spliced, thereby enhancing the coherence and integrity of the voice content and improving the accuracy of speech recognition.

[0113] See also Figure 5 In some embodiments, step S103 may also include but is not limited to steps S501 to S502.

[0114] Step S501: for each audio segment, input the audio segment into a preset voiceprint model, so that the voiceprint model extracts features of the audio segment layer by layer and outputs multiple layer feature vectors.

[0115] It should be noted that the voiceprint model includes multiple layers, and the voiceprint model in the embodiment of the present application is a trained voiceprint model. Specifically, the voiceprint model can be a warming model based on deep learning, a voiceprint model based on end-to-end learning, a voiceprint model based on an attention mechanism, etc. The embodiment of the present application does not make specific restrictions.

[0116] Step S502: Filter out a target layer feature vector of a preset layer from the layer feature vectors, and use the target layer feature vector as the voiceprint feature vector of the audio clip.

[0117] In steps S501 to S502 of some embodiments, in the process of extracting features from all audio clips through a preset voiceprint model, for each audio clip, the embodiment of the present application inputs the audio clip into the preset voiceprint model, and the audio clip is forward propagated in the model so that the voiceprint model extracts the acoustic features of the audio clip layer by layer, and performs pooling operations on the output features of certain layers to reduce the dimension and extract key information, and then fuses the features of different layers to obtain a more comprehensive representation, and outputs multiple layer feature vectors, thereby being able to capture a variety of sound features from low-level to high-level, thereby improving the accuracy of voiceprint recognition, and then, filtering out the target layer feature vector of the preset layer from the layer feature vector, and using the target layer feature vector as the voiceprint feature vector of the audio clip, thereby being able to reduce some unnecessary calculations and achieve accurate extraction of the voiceprint feature vector.

[0118] Specifically, taking the voiceprint model including an input layer, a feature extraction layer, an activation layer, a fully connected layer and an output layer as an example, the layer feature vector of the penultimate layer of the voiceprint model is selected as the voiceprint feature vector in the embodiment of the present application, that is, the layer feature vector output by the fully connected layer is selected as the voiceprint feature vector, wherein the feature vector of the penultimate layer contains higher-level abstract information, which can capture the key semantics in the speech and speaker-specific patterns, and can reduce the overfitting of the model to the training data. In addition, the feature vector of the penultimate layer can be combined with the feature vectors of other layers to obtain a more comprehensive speech representation.

[0119] In some embodiments, the voiceprint model includes an input layer, a convolutional layer, a recurrent layer, a pooling layer, a fully connected layer, a normalization layer, etc. The above layers are combined in a feature order to achieve the conversion from the original audio signal to a high-dimensional feature representation of the speaker's identity.

[0120] See also Figure 6 In some embodiments, step S102 may also include but is not limited to steps S601 to S604.

[0121] Step S601, dividing the audio data set based on a preset ratio to obtain a training set, a validation set and a test set.

[0122] In step S601 of some embodiments, in the process of training an audio classification model through an audio data set, the audio data set is an audio data set including 632 types of speech events. The embodiment of the present application first divides the audio data set. Specifically, the embodiment of the present application divides the audio data set according to a preset ratio. For example, the audio data set is divided according to a ratio of 8:1:1 to obtain a training set, a validation set, and a test set, or the audio data set is divided according to a ratio of 7:2:1 to obtain a training set, a validation set, and a test set, to facilitate subsequent training and testing of the audio classification model.

[0123] Step S602: input the training set into a preset audio classification model for probability prediction, and output a probability prediction value.

[0124] In step S602 of some embodiments, the audio feature encoding of the training set is adjusted to a format acceptable to the model, such as a tensor format. The training set is then input into a preset audio classification model, so that the audio classification model performs probability prediction on each audio sample in the training set to obtain a probability value corresponding to each audio sample in the training set, outputs a probability prediction value, and implements prediction of the audio samples in the training set in the audio data set, thereby enabling the audio classification model to identify the probability of human voice and provide support for various audio processing tasks.

[0125] Step S603: Perform model training on the audio classification model according to the probability prediction value, the validation set and the test set to obtain a model evaluation value.

[0126] In step S603 of some embodiments, the audio classification model is trained according to the probability prediction value, and the difference between the probability prediction value output by the audio classification model and the true prediction value is calculated by the loss function. According to the loss value calculated by the loss function, the back propagation algorithm is executed to calculate the gradient of each parameter, and the model parameters are updated according to the gradient calculated by the optimizer. The above steps are repeated to implement iterative training of the audio classification model. Thereafter, the validation set is input into the iteratively trained audio classification model to evaluate the performance of the audio classification model through the validation set, and the hyperparameters are adjusted using the feedback from the validation set to obtain the trained audio classification model. Finally, the trained audio classification model is input into the test set to evaluate the final performance of the trained audio classification model through the test set to obtain the model evaluation value, thereby implementing the performance evaluation of the audio classification model and improving the performance and accuracy of the audio classification model in practical applications.

[0127] It should be noted that the model evaluation value in the embodiment of the present application is used to characterize the classification performance of the audio classification model, wherein the model evaluation value includes but is not limited to accuracy, precision, recall rate, F1 score, etc.

[0128] It is worth noting that the training set in the embodiment of the present application is used for the actual training process of the model, so that the model can learn the inherent laws and distribution of the data in order to make predictions for unknown data. The validation set is used for the parameter adjustment and model selection process of the model. During the training process, the model will be evaluated on the validation set to monitor the performance of the model and prevent overfitting. The test set is used to finally evaluate the performance of the model. After the model is trained on the training set, it will be evaluated on the test set to test the generalization ability of the model. The test set provides performance indicators of the model on an independent data set, which can be used to compare the performance of different models, or to monitor the performance changes of the model over time after the model is deployed.

[0129] Step S604: when the model evaluation value meets the preset model indicator condition, the audio classification model after model training is used as the pre-trained audio classification model.

[0130] In step S604 of some embodiments, after obtaining the model evaluation value of the model, the embodiments of the present application also need to compare the model evaluation value with the preset model indicator conditions to determine whether the classification performance of the audio classification model meets the requirements. Specifically, the model indicator conditions in the embodiments of the present application can be set according to the parameter types of the model evaluation value. For example, when the model evaluation value includes accuracy and recall, the model indicator conditions include accuracy threshold and recall threshold; when the model evaluation value includes accuracy, precision and recall, the model indicator conditions include accuracy threshold, precision threshold and recall threshold, etc. When each indicator parameter in the model evaluation value meets the preset model indicator conditions, it means that the classification performance of the audio classification model at this time meets the requirements, and the audio classification model after model training can be directly used as a pre-trained audio classification model. Automated sound classification through the audio classification model of the embodiment of the present application can reduce the need for manual listening, improve efficiency, and improve the accuracy of audio classification.

[0131] It should be noted that after obtaining the pre-trained audio classification model, a speech is input into the pre-trained audio classification model. The audio classification model can give a probability value of the speech output being a human voice, thereby facilitating the subsequent extraction of speech containing a human voice.

[0132] See also Figure 7 In some embodiments, the audio clip is obtained through the following steps S701 to S702.

[0133] Step S701, obtaining audio to be processed.

[0134] Step S702: Perform voice activity detection on the audio to be processed, and perform semantic segmentation on the audio to be processed after the voice activity detection to obtain multiple audio segments.

[0135] In steps S701 to S702 of some embodiments, in the process of obtaining audio clips, first, the audio to be processed is obtained, wherein the audio to be processed includes sound clips of multiple speakers speaking independently, and also includes multiple noise clips and silent clips. Then, voice activity detection is performed on the audio to be processed, and semantic segmentation is performed on the audio to be processed after the voice activity detection. Specifically, the audio to be processed is segmented and divided by a voice activity detection tool, and the entire audio to be processed is divided into multiple independent audio clips to obtain multiple audio clips, wherein the audio clips include noise clips and silent clips, which facilitates subsequent filtering of the noise clips and the silent clips, and effectively extracts the human voice in the audio to be processed.

[0136] Specifically, in the process of performing voice activity detection on the audio to be processed, the embodiment of the present application first pre-processes the audio to be processed, including operations such as denoising and gain control, so as to improve the accuracy of voice activity detection, and then divides the audio into relatively short frames, extracts features for each frame of audio, such as energy, zero-crossing rate, spectrum, etc., and then uses the VAD algorithm to analyze each frame to determine whether it contains voice, and finally, according to the decision result of VAD, connects the frames containing voice to form a voice segment.

[0137] See also Figure 8 The embodiment of the present application also provides a speech extraction device based on an audio classification model, the device comprising:

[0138] A data acquisition module 801 is used to acquire multiple audio clips and audio data sets;

[0139] A model training module 802 is used to input the audio data set into a preset audio classification model for model training to obtain a pre-trained audio classification model;

[0140] The feature extraction module 803 is used to extract features from all audio clips using a preset voiceprint model to obtain multiple voiceprint feature vectors;

[0141] An audio splicing module 804 is used to perform audio splicing on the audio segments according to the voiceprint feature vector to obtain multiple voice segments;

[0142] A speech sorting module 805 is used to perform speech sorting on all speech segments based on a pre-trained audio classification model to obtain a speech sequence;

[0143] The target extraction module 806 is used to extract a speech segment at a preset position in the speech sequence as a target speech segment.

[0144] The specific implementation of the speech extraction device based on the audio classification model is basically the same as the specific implementation of the speech extraction method based on the audio classification model mentioned above, and will not be repeated here.

[0145] The embodiment of the present application also provides an electronic device, the electronic device comprising: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, and the program is executed by the processor to realize the above-mentioned speech extraction method based on the audio classification model. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0146] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0147] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.

[0148] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the speech extraction method based on the audio classification model in the embodiment of the present application;

[0149] Input / output interface 903, used to implement information input and output;

[0150] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WI FI, Bluetooth, etc.);

[0151] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);

[0152] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .

[0153] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned speech extraction method based on the audio classification model is implemented.

[0154] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0155] The speech extraction method, device, electronic device and storage medium based on the audio classification model provided by the embodiments of the present application first obtain multiple audio clips and audio data sets, and then input the audio data sets into a preset audio classification model to train the audio classification model, improve the classification accuracy of the audio by the audio classification model, and obtain a pre-trained audio classification model. After that, feature extraction is performed on all audio clips through a preset voiceprint model to obtain multiple voiceprint feature vectors to capture the voice of each speaker, and then audio splicing is performed on the audio clips according to the voiceprint feature vectors to obtain multiple voice clips, so as to splice audio clips of the same category together to improve the audio quality. All voice clips are voice sorted based on the pre-trained audio classification model to obtain a voice sequence, which can ensure that the voice clips are arranged in order according to specific standards or features, facilitate subsequent processing and analysis, and make the audio clip screening more reasonable and effective. Finally, the voice clip at a preset position in the voice sequence is extracted as the target voice clip, so that pure human voice clips can be extracted from audio with noise. The embodiment of the present application can reduce the impact of noise on audio by extracting features from audio clips and performing audio splicing on the audio clips, then sorting the voice clips and extracting the voice clips at a preset position as the target voice clip, thereby achieving reasonable sorting and screening of multiple voice clips and extraction of pure vocal clips.

[0156] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0157] It can be understood by those skilled in the art that Figure 1-9 The technical solutions shown in the figure do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than those shown in the figure, or a combination of certain steps, or different steps.

[0158] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0159] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0160] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0161] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0162] 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 the above units is only a logical function division. There may be other division methods in actual implementation, such as 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 interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0163] The units described above 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.

[0164] 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. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0165] 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 computer-readable 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 multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0166] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A speech extraction method based on an audio classification model, characterized in that: The method comprises: Get multiple audio clips and audio datasets; Inputting the audio data set into a preset audio classification model for model training to obtain a pre-trained audio classification model; Extracting features from all the audio clips using a preset voiceprint model to obtain multiple voiceprint feature vectors; Performing audio splicing on the audio segments according to the voiceprint feature vector to obtain multiple voice segments; Sorting all the speech segments based on a pre-trained audio classification model to obtain a speech sequence; A speech segment at a preset position in the speech sequence is extracted as a target speech segment.

2. The speech extraction method based on the audio classification model according to claim 1, characterized in that: The pre-trained audio classification model is used to perform voice sorting on all the voice segments to obtain a voice sequence, including: For each of the speech segments, determining the segment length of the speech segment; Inputting the speech segment into a pre-trained audio classification model for probability calculation, and outputting the human voice probability of the speech segment, wherein the human voice probability is used to characterize the probability that the speech segment belongs to a human voice; Determining the sorting weight of the speech segments according to the segment duration and the human voice probability; The speech segments are sorted based on the sorting weights to obtain a speech sequence.

3. The speech extraction method based on the audio classification model according to claim 1 is characterized in that: The step of performing audio splicing on the audio segments according to the voiceprint feature vector to obtain multiple voice segments includes: Performing a clustering operation on all the voiceprint feature vectors based on a preset clustering algorithm to obtain a plurality of clustering results, wherein the clustering results are used to characterize the category to which the voiceprint feature vector belongs; The audio segments are spliced ​​according to the clustering results to obtain multiple voice segments.

4. The speech extraction method based on the audio classification model according to claim 3 is characterized in that: The audio segments are spliced ​​according to the clustering results to obtain multiple voice segments, including: Obtaining a category label for each of the clustering results; Grouping the audio clips according to the category labels to obtain a plurality of audio groups, wherein each of the audio groups includes at least one audio clip; For each of the audio groups, audio splicing is performed on all the audio segments in the audio group to obtain multiple voice segments.

5. The speech extraction method based on the audio classification model according to claim 1 is characterized in that: The feature extraction of all the audio clips is performed by using a preset voiceprint model to obtain multiple voiceprint feature vectors, including: For each of the audio clips, inputting the audio clip into a preset voiceprint model, so that the voiceprint model extracts features of the audio clip layer by layer and outputs multiple layer feature vectors; A target layer feature vector of a preset layer is screened out from the layer feature vectors, and the target layer feature vector is used as the voiceprint feature vector of the audio clip.

6. The speech extraction method based on the audio classification model according to claim 1, characterized in that: The step of inputting the audio data set into a preset audio classification model for model training to obtain a pre-trained audio classification model includes: Dividing the audio data set based on a preset ratio to obtain a training set, a validation set, and a test set; Inputting the training set into a preset audio classification model for probability prediction, and outputting the probability prediction value; Performing model training on the audio classification model according to the probability prediction value, the validation set, and the test set to obtain a model evaluation value; When the model evaluation value meets the preset model indicator conditions, the audio classification model after model training is used as the pre-trained audio classification model.

7. The speech extraction method based on the audio classification model according to claim 1 is characterized in that: The audio clip is obtained by the following steps: Get the audio to be processed; Performing voice activity detection on the audio to be processed, and performing semantic segmentation on the audio to be processed after the voice activity detection, to obtain multiple audio segments.

8. A speech extraction device based on an audio classification model, characterized in that: The device comprises: A data acquisition module, used to acquire multiple audio clips and audio data sets; A model training module, used to input the audio data set into a preset audio classification model for model training to obtain a pre-trained audio classification model; A feature extraction module, used to extract features from all the audio clips using a preset voiceprint model to obtain multiple voiceprint feature vectors; An audio splicing module, used for performing audio splicing on the audio segments according to the voiceprint feature vector to obtain multiple voice segments; A speech sorting module, used for performing speech sorting on all the speech segments based on a pre-trained audio classification model to obtain a speech sequence; The target extraction module is used to extract the speech segment at a preset position in the speech sequence as the target speech segment.

9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the speech extraction method based on the audio classification model as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the speech extraction method based on the audio classification model described in any one of claims 1 to 7 is implemented.