Audio classification method and device, storage medium and electronic equipment

By decoding and analysis of audio and feature extraction, combined with the classification capabilities of multi-layer perceptrons, audio is directly classified in the time domain, which solves the problem of limited resolution of STFT time-frequency graphs and improves the response speed of audio classification.

CN119673211APending Publication Date: 2025-03-21BEIJING JINGWEI HIRAIN TECH CO INC
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411907673.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

In the existing audio recognition algorithm, the time-frequency graph resolution of STFT is limited, which leads to higher resolution and longer time windows when processing complex audio, which increases the time-consuming operation and slow response speed.

Method used

By decoding and analyzing the target audio, the digital audio signal in the time domain is obtained, and the digital audio signal is extracted based on the pre-trained convolutional neural network to obtain the feature vector. Then, a multi-layer perceptron is used to classify the feature vectors to obtain the confidence of each audio category, and the audio category is determined based on the confidence.

Benefits of technology

This method can directly classify digital audio signals in the time domain, avoid the step of converting time domain signals to the frequency domain, reduce overall time-consuming and improve response speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119673211A_ABST
    Figure CN119673211A_ABST
Patent Text Reader

Abstract

The invention discloses an audio classification method and device, a storage medium and electronic equipment, and the method comprises the steps: carrying out the decoding analysis of a target audio, and obtaining a digital audio signal in a time domain; performing feature extraction on the digital audio signal based on a pre-trained convolutional neural network to obtain a corresponding feature vector; the feature vectors are classified to obtain confidence coefficients of the feature vectors belonging to various audio categories, and one audio category corresponds to one confidence coefficient; and determining the audio category of the target audio according to each confidence coefficient. Therefore, the method can directly classify the digital audio signals of the time domain, does not need to convert the digital audio signals of the time domain into the frequency domain, reduces the overall time consumption, and improves the response speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and in particular to an audio classification method, device, storage medium and electronic device. Background Art

[0002] With the improvement of computer performance in recent years, the application scenarios of deep learning in target detection, image generation, model retrieval and other fields have gradually become widespread, and the research on audio classification based on deep learning has also gradually increased.

[0003] In order to improve the recognition accuracy, existing audio recognition algorithms usually use signal processing methods or statistical analysis methods to separate effective audio information before using the neural network model. For example, Fast Fourier Transform (FFT) is used to separate audio components at different frequencies, or Independent Component Correlation Algorithm (ICA) is used to separate different components in the audio signal. Subsequently, deep learning methods are used to classify the processed data using the neural network model to achieve a higher classification accuracy.

[0004] Most existing audio recognition algorithms use the signal processing method of Short Time Fourier Transform (STFT) to perform spectral analysis on audio, and use deep learning methods based on the time-frequency relationship of audio to achieve audio classification. This type of method aims to separate the components of each frequency from the time domain to improve the accuracy of audio recognition, but this method still has the following disadvantages:

[0005] The time-frequency diagram output by STFT has resolution limitations. The trade-off between time resolution and frequency resolution will affect the output of STFT. Complex audio requires higher resolution and longer time window, which will increase the time consumption of calculation and slow the response speed. Summary of the invention

[0006] In view of the above problems, the present invention provides an audio classification method, device, storage medium and electronic device that overcome the above problems or at least partially solve the above problems.

[0007] In a first aspect, an audio classification method includes:

[0008] Decode and analyze the target audio to obtain a digital audio signal in the time domain;

[0009] Extracting features from the digital audio signal based on a pre-trained convolutional neural network to obtain a corresponding feature vector;

[0010] Classifying the feature vectors to obtain confidences that the feature vectors belong to respective audio categories, wherein one audio category corresponds to one confidence;

[0011] The audio category of the target audio is determined according to each of the confidence levels.

[0012] Optionally, in some optional implementations, decoding and analyzing the target audio to obtain a digital audio signal in the time domain includes:

[0013] Decode the target audio using a decoder to obtain a decoded signal;

[0014] Sampling the decoded signal according to a preset frequency to obtain a sampled signal;

[0015] Each of the sampled signals is normalized to obtain the digital audio signal.

[0016] Optionally, in some optional implementations, the feature extraction of the digital audio signal based on the pre-trained convolutional neural network to obtain a corresponding feature vector includes:

[0017] Converting the digital audio signal into a model input tensor that matches a pre-trained convolutional neural network;

[0018] The model input tensor is input into the convolutional neural network to obtain a feature vector output by the convolutional neural network.

[0019] Optionally, in some optional embodiments, the training process of the convolutional neural network includes:

[0020] Inputting training samples in the training set into the convolutional neural network for training, wherein the training samples include human voice audio data and music sound audio data;

[0021] Obtaining a classification result of the convolutional neural network;

[0022] Using a loss function to calculate a corresponding loss value, wherein the loss function is calculated based on the training sample and the corresponding classification result;

[0023] An optimizer is used to optimize the parameters of the convolutional neural network based on the loss value until the performance of the convolutional neural network meets the requirements.

[0024] Optionally, in some optional implementations, classifying the feature vectors to obtain the confidence that the feature vectors belong to each audio category includes:

[0025] The feature vectors are classified based on a multi-layer perceptron to obtain confidences that the feature vectors belong to various audio categories, wherein the audio categories include human voice audio and music audio.

[0026] Optionally, in some optional implementations, the training process of the multilayer perceptron includes:

[0027] Initializing weights and biases of the multilayer perceptron;

[0028] Inputting feature samples into the multi-layer perceptron for training, wherein the feature samples include feature vectors of multiple digital audio signals;

[0029] Obtaining the confidence level of the multilayer perceptron output;

[0030] Using a cross entropy loss function to calculate the loss value corresponding to the confidence level;

[0031] According to the loss value, the weights and biases of the multilayer perceptron are optimized using the Adam optimizer until the performance of the multilayer perceptron meets the requirements.

[0032] Optionally, in some optional implementations, determining the audio category of the target audio according to each of the confidences includes:

[0033] The audio category with the greatest confidence is determined as the audio category of the target audio.

[0034] In a second aspect, an audio classification device includes: an audio decoding unit, a feature extraction unit, a confidence unit, and a category determination unit;

[0035] The audio decoding unit is used to decode and analyze the target audio to obtain a digital audio signal in the time domain;

[0036] The feature extraction unit is used to extract features from the digital audio signal based on a pre-trained convolutional neural network to obtain a corresponding feature vector;

[0037] The confidence unit is used to classify the feature vectors to obtain the confidence that the feature vectors belong to each audio category, wherein one audio category corresponds to one confidence;

[0038] The category determination unit is used to determine the audio category of the target audio according to each of the confidence levels.

[0039] Optionally, in some optional implementations, the audio decoding unit includes: a decoding subunit, a sampling subunit and a normalization subunit;

[0040] The decoding subunit is used to decode the target audio using a decoder to obtain a decoded signal;

[0041] The sampling subunit is used to sample the decoded signal at a preset frequency to obtain a sampled signal;

[0042] The normalization subunit is used to normalize each of the sampled signals to obtain the digital audio signal.

[0043] According to a third aspect, a computer-readable storage medium stores a program, wherein the program, when executed by a processor, implements any of the above-mentioned audio classification methods.

[0044] In a fourth aspect, an electronic device comprises at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other via the bus; and the processor is used to call program instructions in the memory to execute any of the audio classification methods described above.

[0045] By means of the above technical scheme, the audio classification method, device, storage medium and electronic device provided by the present invention can decode and analyze the target audio to obtain a digital audio signal in the time domain; extract features of the digital audio signal based on a pre-trained convolutional neural network to obtain corresponding feature vectors; classify the feature vectors to obtain the confidence that the feature vectors belong to each audio category, wherein one audio category corresponds to one confidence; and determine the audio category of the target audio according to each confidence. It can be seen from this that the present invention can directly classify digital audio signals in the time domain without converting the digital audio signals in the time domain to the frequency domain, thereby reducing the overall time consumption and improving the response speed.

[0046] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0048] Figure 1 A flow chart of a first audio classification method provided by the present invention is shown;

[0049] Figure 2 A flow chart of a second audio classification method provided by the present invention is shown;

[0050] Figure 3 A flowchart of a third audio classification method provided by the present invention is shown;

[0051] Figure 4 A schematic diagram of the structure of a convolutional neural network provided by the present invention is shown;

[0052] Figure 5 A flowchart of a fourth audio classification method provided by the present invention is shown;

[0053] Figure 6 A flowchart of a fifth audio classification method provided by the present invention is shown;

[0054] Figure 7 A schematic diagram of the structure of an audio classification device provided by the present invention is shown;

[0055] Figure 8 A structural schematic diagram of an electronic device provided by the present invention is shown. DETAILED DESCRIPTION

[0056] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.

[0057] like Figure 1 As shown, the present invention provides an audio classification method, including: S100, S200, S300 and S400;

[0058] S100, decoding and analyzing the target audio to obtain a digital audio signal in the time domain;

[0059] Optionally, the target audio in the present invention may be an analog signal. For the convenience of subsequent calculation, the present invention may sample the analog signal to obtain a corresponding digital signal. That is, after obtaining the target audio, the decoder may sample at a certain frequency after decoding to obtain a corresponding digital audio signal, and the present invention does not limit this.

[0060] Optionally, in order to prevent the volume of the input target audio from affecting the subsequent feature extraction process, the present invention may also normalize the digital audio signal so that the sampling point data falls within the interval [-1, 1].

[0061] For example, Figure 2As shown, in some optional embodiments, the S100 includes: S110, S120 and S130;

[0062] S110, using a decoder to decode the target audio to obtain a decoded signal;

[0063] Optionally, after collecting audio, the underlying hardware device generally needs to use an encoder to encode the collected audio before transmitting it to the decoder to improve transmission efficiency. Therefore, the present invention can use a decoder for decoding, and the present invention does not limit this.

[0064] Optionally, the decoding process of the decoder belongs to the technology well known in the art, and the present invention will not make any detailed description on it. For details, please refer to the relevant description in the art.

[0065] S120, sampling the decoded signal according to a preset frequency to obtain a sampled signal;

[0066] Optionally, the present invention can set a preset frequency according to actual needs, and any feasible frequency belongs to the protection scope of the present invention, and the present invention does not limit this.

[0067] S130: Normalize each of the sampled signals to obtain the digital audio signal.

[0068] Optionally, the normalized expression is as in Formula 1: As shown, the normalized digital signal is recorded as , is the maximum value of the digital audio signal, is the minimum value of the digital audio signal, Represents the value of the i-th sampling point in the audio.

[0069] S200, extracting features from the digital audio signal based on a pre-trained convolutional neural network to obtain a corresponding feature vector;

[0070] For example, Figure 3 As shown, in some optional embodiments, the S200 includes: S210 and S220;

[0071] S210, converting the digital audio signal into a model input tensor that matches a pre-trained convolutional neural network;

[0072] Optionally, the framework of the convolutional neural network has certain requirements for its input. Therefore, in order to meet the requirements of the convolutional neural network, the present invention can convert the digital audio signal into a corresponding model input tensor. It should be noted that the process of converting the digital audio signal into the model input tensor does not change the numerical value in the digital audio signal, but only converts the data type to adapt to the framework of the convolutional neural network, and the present invention does not limit this.

[0073] S220. Input the model input tensor into the convolutional neural network to obtain a feature vector output by the convolutional neural network.

[0074] Optionally, the convolutional neural network of the present invention may include multiple network layers, specifically including multiple one-dimensional convolutional layers, normalization layers, activation function layers and pooling layers with different parameters. Among them, the one-dimensional convolutional layer is a separable convolutional layer, which uses fewer convolution kernels to extract features from the audio digital signal and outputs a feature vector of the same size as the original one-dimensional convolutional layer.

[0075] Taking a single convolutional layer as an example, The number of parameters of the layer convolution kernel is , the number of input feature channels is , the number of output feature channels is Therefore, the number of parameters of the original convolutional layer is , the number of parameters of the separable convolutional layer is , the expression of the parameter ratio of the separable convolution layer to the original convolution layer is shown in Formula 2. Among them, the one-dimensional convolution kernel size is usually set to 3, and the number of channels is usually greater than 100. According to Formula 2, in this case, replacing the convolution layer with a separable convolution will reduce the number of parameters by about two-thirds.

[0076] Formula 2: .

[0077] Optionally, the convolutional neural network needs to be trained with data to learn and extract the feature vector of the audio. The structure of the convolutional neural network described in the present invention is as follows: Figure 4 As shown. The convolutional neural network used in the present invention requires a corresponding digital audio data set for training. The present invention can classify human voice and music sound data, so the training data set includes different genres of music and news broadcasts and other human voice data.

[0078] For example, in some optional embodiments, the training process of the convolutional neural network includes: step 1.1, step 1.2, step 1.3 and step 1.4;

[0079] Step 1.1, inputting training samples in the training set into the convolutional neural network for training, wherein the training samples include human voice audio data and music sound audio data;

[0080] Step 1.2, obtaining the classification result of the convolutional neural network;

[0081] Step 1.3, using a loss function to calculate a corresponding loss value, wherein the loss function is calculated based on the training sample and the corresponding classification result;

[0082] Optionally, the present invention aims to classify digital audio, so it is necessary to set an optimizer and a loss function to update the model parameters during the training phase. For classification problems, the optimizer of the present invention can be set to the Adam optimizer, and the loss function can be set to the cross entropy loss. In order to further improve the generalization ability of the model and prevent the model from overfitting, the present invention can also perform random inactivation on the model during the training phase. The specific implementation is to set the probability of retaining the neural network nodes, and select some neural network nodes to be ignored according to the probability during each optimization. The selected nodes will temporarily set the node parameters to 0 during the optimization, and restore the original values ​​after the optimization to prevent the accuracy of the neural network from being overly dependent on specific nodes.

[0083] Step 1.4: Use an optimizer to optimize the parameters of the convolutional neural network based on the loss value until the performance of the convolutional neural network meets the requirements.

[0084] After the training parameters are set, the data set containing different genres of music and voice data such as news broadcasts is used for training. The specific training process is to randomly select a certain number of samples from the training set and input them into the convolutional neural network each time. The convolutional neural network will output the classification results of the samples. According to the output of the convolutional neural network and the label of the input sample, the loss function is used to calculate the loss of the convolutional neural network for this classification. At this time, the optimizer will update and optimize the parameters in the convolutional neural network according to the loss value. After the parameter update is completed, this process will be repeated until the loss value basically converges.

[0085] Finally, the digital audio signal is used as the input of the convolutional neural network. After a series of mathematical operations such as convolution function, pooling function, activation function, etc. in the convolutional neural network, the convolutional neural network will output a feature vector representing the audio at the current moment. The feature vector dimension is usually 1024 dimensions.

[0086] S300, classifying the feature vectors to obtain confidences that the feature vectors belong to respective audio categories, wherein one audio category corresponds to one confidence;

[0087] For example, Figure 5 As shown, in some optional implementations, the S300 includes: S310;

[0088] S310. Classify the feature vectors based on a multi-layer perceptron to obtain confidence that the feature vectors belong to each audio category, wherein the audio category includes human voice audio and music audio.

[0089] Optionally, a multilayer perceptron (MLP) is used to classify the feature vector to obtain the confidence (also called confidence vector) representing the classification result. The two-dimensional vector output by the multilayer perceptron respectively represents the confidence that the feature vector (corresponding to the digital audio signal of the present invention) input at the current moment is a human voice or a musical sound. The specific implementation method is as follows:

[0090] The multilayer perceptron is composed of multiple fully connected layers, with the feature vector as the first layer input and the confidence vector representing the classification result as the output. In the multilayer perceptron, the input of the fully connected layer is the output of the previous layer, and its output result is the input of the next layer. The process is shown in Formula 3, where For the The output of the layer, and For the Layer parameters. Specifically, when When it is equal to 1, is the feature vector finally output by S200; when When it is equal to the total number of fully connected layers, its output As the final output of the multi-layer perceptron, a softmax operation will be performed on it to obtain the confidence , the expression of the softmax operation is shown in Formula 4, which makes the sum of each element in the confidence vector equal to 1.

[0091] Formula 3: .

[0092] Formula 4: .

[0093] Optional, final output confidence vector ,in, is the sequence number of the current calculation element, is the sequence number of other elements, the confidence vector Contains the confidence of human voice and music sound and , the one with greater confidence is determined to be the category of the target audio at the current moment.

[0094] Similarly, the multilayer perceptron needs to be trained accordingly before being applied to the present invention. The present invention is to distinguish between human voice and music. Therefore, the present invention can mark the feature vector of human voice and the feature vector of music with corresponding labels, and then use them to train the multilayer perceptron, and the present invention does not limit this.

[0095] For example, in some optional implementations, the training process of the multilayer perceptron includes: step 2.1, step 2.2, step 2.3, step 2.4 and step 2.5;

[0096] Step 2.1, initializing the weights and biases of the multilayer perceptron;

[0097] Optionally, weights and biases are well-known technical concepts of multi-layer perceptrons, and the present invention will not describe them in detail. For details, please refer to relevant descriptions in the art.

[0098] Step 2.2, inputting feature samples into the multi-layer perceptron for training, wherein the feature samples include feature vectors of multiple digital audio signals;

[0099] Step 2.3, obtaining the confidence of the multi-layer perceptron output;

[0100] Step 2.4, using the cross entropy loss function to calculate the loss value corresponding to the confidence level;

[0101] Step 2.5: According to the loss value, use the Adam optimizer to optimize the weights and biases of the multilayer perceptron until the performance of the multilayer perceptron meets the requirements.

[0102] Optionally, the present invention can establish an artificial intelligence model, which includes the above-mentioned convolutional neural network and multi-layer perceptron. The present invention can also separate the above-mentioned convolutional neural network and multi-layer perceptron into two independent models, respectively executing their own processes, and the present invention does not limit this.

[0103] S400: Determine the audio category of the target audio according to each of the confidence levels.

[0104] Optional, such as Figure 6 As shown, in some optional implementations, the S400 includes: S410;

[0105] S410: Determine the audio category with the highest confidence as the audio category of the target audio.

[0106] Optionally, as mentioned above, the confidence vector output by the multilayer perceptron of the present invention is , including the confidence of human voice and music sound and Therefore, the present invention can be compared and ,like If the target audio is human voice, If the target audio is large, it means that the target audio is music, and the present invention does not impose any limitation on this.

[0107] Optionally, in addition to this, the present invention can also make a more detailed distinction of sounds. For example, for human voices, the present invention can further distinguish between human voices of different genders such as male voices and female voices. Or, the voices of different age groups such as children's voices, young voices, middle-aged voices and elderly voices can be distinguished, and the present invention does not limit this.

[0108] Similarly, the present invention can further distinguish music sounds into songs in different languages ​​such as Chinese songs, English songs, Korean songs, and Thai songs. Alternatively, the present invention can distinguish music sounds of different types such as pop music, rock music, electronic music, and folk music, which are not limited by the present invention.

[0109] like Figure 7 As shown, an audio classification device includes: an audio decoding unit 100, a feature extraction unit 200, a confidence unit 300 and a category determination unit 400;

[0110] The audio decoding unit 100 is used to decode and analyze the target audio to obtain a digital audio signal in the time domain;

[0111] The feature extraction unit 200 is used to extract features from the digital audio signal based on a pre-trained convolutional neural network to obtain a corresponding feature vector;

[0112] The confidence unit 300 is used to classify the feature vectors to obtain the confidence that the feature vectors belong to each audio category, wherein one audio category corresponds to one confidence;

[0113] The category determination unit 400 is configured to determine the audio category of the target audio according to each of the confidence levels.

[0114] Optionally, in some optional implementations, the audio decoding unit 100 includes: a decoding subunit, a sampling subunit and a normalization subunit;

[0115] The decoding subunit is used to decode the target audio using a decoder to obtain a decoded signal;

[0116] The sampling subunit is used to sample the decoded signal at a preset frequency to obtain a sampled signal;

[0117] The normalization subunit is used to normalize each of the sampled signals to obtain the digital audio signal.

[0118] Optionally, in some optional embodiments, the feature extraction unit 200 includes: a signal conversion subunit and a tensor input subunit;

[0119] The signal conversion subunit is used to convert the digital audio signal into a model input tensor matching a pre-trained convolutional neural network;

[0120] The tensor input subunit is used to input the model input tensor into the convolutional neural network to obtain a feature vector output by the convolutional neural network.

[0121] Optionally, in certain optional embodiments, the device further comprises: a model training unit;

[0122] The model training unit is used to execute the training process of the convolutional neural network;

[0123] The model training unit includes: a first training subunit, a first obtaining subunit, a first loss value subunit and a first parameter optimization subunit;

[0124] The first training subunit is used to input training samples in the training set into the convolutional neural network for training, wherein the training samples include human voice audio data and music sound audio data;

[0125] The first obtaining subunit is used to obtain the classification result of the convolutional neural network;

[0126] The first loss value subunit is used to calculate a corresponding loss value using a loss function, wherein the loss function is calculated based on the training sample and the corresponding classification result;

[0127] The first parameter optimization subunit is used to use an optimizer to optimize the parameters of the convolutional neural network based on the loss value until the performance of the convolutional neural network meets the requirements.

[0128] Optionally, in some optional implementations, the confidence unit 300 includes: a confidence subunit;

[0129] The confidence subunit is used to classify the feature vector based on a multi-layer perceptron to obtain the confidence that the feature vector belongs to each audio category, wherein the audio category includes human voice audio and music audio.

[0130] Optionally, in certain optional embodiments, the apparatus further comprises: a perceptron training unit;

[0131] The perceptron training unit is used to execute the training process of the multilayer perceptron;

[0132] The perceptron training unit includes: a parameter initialization subunit, a second training subunit, a second acquisition subunit, a second loss value subunit, and a second parameter optimization subunit;

[0133] The parameter initialization subunit is used to initialize the weights and biases of the multilayer perceptron;

[0134] The second training subunit is used to input feature samples into the multi-layer perceptron for training, wherein the feature samples include feature vectors of multiple digital audio signals;

[0135] The second obtaining subunit is used to obtain the confidence level of the output of the multilayer perceptron;

[0136] The second loss value subunit is used to calculate the loss value corresponding to the confidence level using a cross entropy loss function;

[0137] The second loss value subunit is used to optimize the weights and biases of the multilayer perceptron using an Adam optimizer according to the loss value until the performance of the multilayer perceptron meets the requirements.

[0138] Optionally, in some optional implementations, the category determination unit 400 includes: a category determination subunit;

[0139] The category determination subunit is used to determine the audio category with the greatest confidence as the audio category of the target audio.

[0140] The present invention provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, any of the above-mentioned audio classification methods is implemented.

[0141] like Figure 8 As shown, the present invention provides an electronic device 70, which includes at least one processor 701, and at least one memory 702 and a bus 703 connected to the processor 701; wherein the processor 701 and the memory 702 communicate with each other through the bus 703; the processor 701 is used to call the program instructions in the memory 702 to execute any of the audio classification methods described above.

[0142] In the present invention, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0143] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0144] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined in the present invention may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown in the present invention, but will conform to the widest scope consistent with the principles and novel features disclosed in the present invention.

[0145] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. An audio classification method, characterized in that: include: Decode and analyze the target audio to obtain a digital audio signal in the time domain; Extracting features from the digital audio signal based on a pre-trained convolutional neural network to obtain a corresponding feature vector; Classifying the feature vectors to obtain confidences that the feature vectors belong to respective audio categories, wherein one audio category corresponds to one confidence; The audio category of the target audio is determined according to each of the confidence levels.

2. The method according to claim 1, characterized in that The decoding and analyzing of the target audio to obtain a digital audio signal in the time domain includes: Decode the target audio using a decoder to obtain a decoded signal; Sampling the decoded signal according to a preset frequency to obtain a sampled signal; Each of the sampled signals is normalized to obtain the digital audio signal.

3. The method according to claim 1, characterized in that The method of extracting features from the digital audio signal based on a pre-trained convolutional neural network to obtain a corresponding feature vector includes: Converting the digital audio signal into a model input tensor that matches a pre-trained convolutional neural network; The model input tensor is input into the convolutional neural network to obtain a feature vector output by the convolutional neural network.

4. The method according to claim 3, characterized in that The training process of the convolutional neural network includes: Inputting training samples in the training set into the convolutional neural network for training, wherein the training samples include human voice audio data and music sound audio data; Obtaining a classification result of the convolutional neural network; Using a loss function to calculate a corresponding loss value, wherein the loss function is calculated based on the training sample and the corresponding classification result; An optimizer is used to optimize the parameters of the convolutional neural network based on the loss value until the performance of the convolutional neural network meets the requirements.

5. The method according to claim 1, characterized in that The classifying the feature vectors to obtain the confidence that the feature vectors belong to each audio category includes: The feature vectors are classified based on a multi-layer perceptron to obtain confidences that the feature vectors belong to various audio categories, wherein the audio categories include human voice audio and music audio.

6. The method according to claim 5, characterized in that The training process of the multilayer perceptron includes: Initializing weights and biases of the multilayer perceptron; Inputting feature samples into the multi-layer perceptron for training, wherein the feature samples include feature vectors of multiple digital audio signals; Obtaining the confidence level of the multilayer perceptron output; Using a cross entropy loss function to calculate the loss value corresponding to the confidence level; According to the loss value, the weights and biases of the multilayer perceptron are optimized using the Adam optimizer until the performance of the multilayer perceptron meets the requirements.

7. The method according to claim 1, characterized in that Determining the audio category of the target audio according to each of the confidences includes: The audio category with the greatest confidence is determined as the audio category of the target audio.

8. An audio classification device, characterized in that: include: An audio decoding unit, a feature extraction unit, a confidence unit, and a category determination unit; The audio decoding unit is used to decode and analyze the target audio to obtain a digital audio signal in the time domain; The feature extraction unit is used to extract features from the digital audio signal based on a pre-trained convolutional neural network to obtain a corresponding feature vector; The confidence unit is used to classify the feature vectors to obtain the confidence that the feature vectors belong to each audio category, wherein one audio category corresponds to one confidence; The category determination unit is used to determine the audio category of the target audio according to each of the confidence levels.

9. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, the audio classification method according to any one of claims 1 to 7 is implemented.

10. An electronic device, characterized in that: The electronic device includes at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; the processor is used to call program instructions in the memory to execute the audio classification method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Loading vehicle driving deviation correction method and system based on intelligent classification of road surface sensing data

    CN114898329A

  • Audio classification method and device, electronic equipment and storage medium

    CN115240707A

  • Scene determination method and device based on music category

    CN118692491A

  • Sleep apnea syndrome recognition system based on machine learning

    CN118820751A