A method for determining a magnification ratio based on artificial intelligence, a method for adjusting volume and a device
Through the artificial intelligence-based magnification determination method, the neural network is used to calculate the volume adjustment magnification and automatically adjust the volume, which solves the user's manual adjustment problem caused by different audio data volume sizes, and improves the user experience and the stability of audio playback.
Patent Information
- Application Number
- CN202110712666.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-25
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-06-25
AI Technical Summary
The volume of different audio data is different, so users need to manually adjust the volume when listening to audio, which affects the user experience.
Adopt an artificial intelligence-based magnification determination method, by obtaining the average volume and style characteristics of audio data, and use a neural network to calculate the volume adjustment magnification, automatically adjusting the volume and avoiding manual intervention.
It improves the user experience, automatically adjusts the volume to adapt to different audio data, avoids the problem of high and low volume, and enhances the stability of audio playback and user satisfaction.
Smart Images

Figure CN113823318B
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of voice technology, and in particular to a method for determining a magnification based on artificial intelligence, a method for adjusting volume, and a device. Background Art
[0002] Due to the different sources and styles of audio data, the volume of different audio data varies. When users listen to audio data while doing other things (such as studying or working), the volume of different audio data varies, resulting in the volume fluctuating. In order to ensure the volume is appropriate, users need to manually adjust the volume, which affects their work and reduces the user experience. Summary of the invention
[0003] The embodiment of the present invention discloses an artificial intelligence-based magnification determination method, a volume adjustment method and a device, which are used to improve user experience.
[0004] The first aspect discloses a method for determining a magnification based on artificial intelligence, characterized by comprising:
[0005] Acquire first audio data, where the first audio data includes multiple frames of audio signals;
[0006] Determine an average volume of the multiple frames of audio signals to obtain a first volume;
[0007] Extracting style features of each frame of audio signals in the multiple frames of audio signals using a first neural network to obtain a first style feature vector;
[0008] Inputting the first style feature vector into a second neural network to obtain a second volume;
[0009] A first volume adjustment factor is determined according to the first volume and the second volume.
[0010] As a possible implementation, the method further includes:
[0011] Inputting user information into the third neural network to obtain an object feature vector;
[0012] Inputting the first style feature vector into a second neural network to obtain a second volume comprises:
[0013] The first style feature vector and the object feature vector are input into a second neural network to obtain a second volume.
[0014] As a possible implementation, the third neural network includes a first fully connected layer (fully connected layer, FC), a first non-linear layer (non liner layer, NL), a second layer FC, a second layer NL and a third layer FC, the user information includes M information of the user, and the user information is input into the third neural network to obtain the object feature vector includes:
[0015] Extracting features of each of the M information through the first layer FC to obtain M vectors;
[0016] Performing nonlinear transformation on the M vectors through the first layer NL to obtain M transformation vectors;
[0017] Performing linear transformation on the transformation vectors whose corresponding information similarity is greater than a threshold in the M transformation vectors through the second layer FC to obtain N vectors;
[0018] Performing nonlinear transformation on the N vectors through the second layer NL to obtain N transformed vectors;
[0019] The N transformation vectors are linearly transformed through the third layer FC to obtain an object feature vector, where N is an integer greater than 1 and M is an integer greater than N.
[0020] As a possible implementation, the method further includes:
[0021] Determining a second volume adjustment factor according to the first style feature vector and historical audio data information;
[0022] Inputting the first style feature vector into a second neural network to obtain a second volume comprises:
[0023] The first style feature vector and the second volume adjustment factor are input into a second neural network to obtain a second volume.
[0024] As a possible implementation manner, the historical audio data information includes style feature vectors of a plurality of audio data and a third volume adjustment factor;
[0025] The determining the second volume adjustment factor according to the first style feature vector and the historical audio data information includes:
[0026] Calculating, based on the first style feature vector and the style feature vectors of the plurality of audio data, a similarity between the first audio data and each of the plurality of audio data to obtain a plurality of similarities;
[0027] A second volume adjustment factor is calculated according to the multiple similarities and the third volume adjustment factors corresponding to the multiple similarities.
[0028] A second aspect discloses a volume adjustment method based on artificial intelligence, comprising:
[0029] Acquire first audio data to be played, wherein the first audio data includes multiple frames of audio signals;
[0030] Determine an average volume of the multiple frames of audio signals to obtain a first volume;
[0031] Extracting style features of each frame of audio signals in the multiple frames of audio signals using a first neural network to obtain a first style feature vector;
[0032] Inputting the first style feature vector into a second neural network to obtain a second volume;
[0033] determining a first volume adjustment factor according to the first volume and the second volume;
[0034] The playback volume of each frame of the audio signal is determined according to the first volume adjustment factor and the actual volume of each frame of the audio signal in the multiple frames of audio signals.
[0035] As a possible implementation, the method further includes:
[0036] Inputting user information into the third neural network to obtain an object feature vector;
[0037] Inputting the first style feature vector into a second neural network to obtain a second volume comprises:
[0038] The first style feature vector and the object feature vector are input into a second neural network to obtain a second volume.
[0039] As a possible implementation, the third neural network includes a first layer FC, a first layer NL, a second layer FC, a second layer NL and a third layer FC, the user information includes M information of the user, and the user information is input into the third neural network to obtain the object feature vector including:
[0040] Extracting features of each of the M information through the first layer FC to obtain M vectors;
[0041] Performing nonlinear transformation on the M vectors through the first layer NL to obtain M transformation vectors;
[0042] Performing linear transformation on the transformation vectors whose corresponding information similarity is greater than a threshold in the M transformation vectors through the second layer FC to obtain N vectors;
[0043] Performing nonlinear transformation on the N vectors through the second layer NL to obtain N transformed vectors;
[0044] The N transformation vectors are linearly transformed through the third layer FC to obtain an object feature vector, where N is an integer greater than 1 and M is an integer greater than N.
[0045] As a possible implementation, the method further includes:
[0046] Determining a second volume adjustment factor according to the first style feature vector and historical audio data information;
[0047] Inputting the first style feature vector into a second neural network to obtain a second volume comprises:
[0048] The first style feature vector and the second volume adjustment factor are input into a second neural network to obtain a second volume.
[0049] As a possible implementation manner, the historical audio data information includes style feature vectors of a plurality of audio data and a third volume adjustment factor;
[0050] The determining the second volume adjustment factor according to the first style feature vector and the historical audio data information includes:
[0051] Calculating, based on the first style feature vector and the style feature vectors of the plurality of audio data, a similarity between the first audio data and each of the plurality of audio data to obtain a plurality of similarities;
[0052] A second volume adjustment factor is calculated according to the multiple similarities and the third volume adjustment factors corresponding to the multiple similarities.
[0053] A third aspect discloses a magnification determination device based on artificial intelligence, comprising:
[0054] An acquisition unit, configured to acquire first audio data, wherein the first audio data includes a plurality of frames of audio signals;
[0055] A determining unit, configured to determine an average volume of the plurality of frames of audio signals to obtain a first volume;
[0056] An extraction unit, configured to extract a style feature of each frame of the audio signal in the plurality of frames of audio signals using a first neural network to obtain a first style feature vector;
[0057] An input unit, used for inputting the first style feature vector into a second neural network to obtain a second volume;
[0058] The determining unit is further configured to determine a first volume adjustment factor according to the first volume and the second volume.
[0059] As a possible implementation manner, the input unit is further used to input user information into a third neural network to obtain an object feature vector;
[0060] The input unit inputs the first style feature vector into the second neural network, and obtaining the second volume includes:
[0061] The first style feature vector and the object feature vector are input into a second neural network to obtain a second volume.
[0062] As a possible implementation, the third neural network includes a first layer FC, a first layer NL, a second layer FC, a second layer NL and a third layer FC, the user information includes M information of the user, and the input unit inputs the user information into the third neural network, and the object feature vector obtained includes:
[0063] Extracting features of each of the M information through the first layer FC to obtain M vectors;
[0064] Performing nonlinear transformation on the M vectors through the first layer NL to obtain M transformation vectors;
[0065] Performing linear transformation on the transformation vectors whose corresponding information similarity is greater than a threshold in the M transformation vectors through the second layer FC to obtain N vectors;
[0066] Performing nonlinear transformation on the N vectors through the second layer NL to obtain N transformed vectors;
[0067] The N transformation vectors are linearly transformed through the third layer FC to obtain an object feature vector, where N is an integer greater than 1 and M is an integer greater than N.
[0068] As a possible implementation manner, the determining unit is further configured to determine a second volume adjustment factor according to the first style feature vector and historical audio data information;
[0069] The input unit is specifically used to input the first style feature vector and the second volume adjustment factor into a second neural network to obtain a second volume.
[0070] As a possible implementation manner, the historical audio data information includes style feature vectors of a plurality of audio data and a third volume adjustment factor;
[0071] The determining unit determines the second volume adjustment factor according to the first style feature vector and the historical audio data information, including:
[0072] Calculating, based on the first style feature vector and the style feature vectors of the plurality of audio data, a similarity between the first audio data and each of the plurality of audio data to obtain a plurality of similarities;
[0073] A second volume adjustment factor is calculated according to the multiple similarities and the third volume adjustment factors corresponding to the multiple similarities.
[0074] A fourth aspect discloses a volume adjustment device based on artificial intelligence, comprising:
[0075] An acquisition unit, configured to acquire first audio data to be played, wherein the first audio data includes multiple frames of audio signals;
[0076] A determining unit, configured to determine an average volume of the plurality of frames of audio signals to obtain a first volume;
[0077] An extraction unit, configured to extract a style feature of each frame of the audio signal in the plurality of frames of audio signals using a first neural network to obtain a first style feature vector;
[0078] An input unit, used for inputting the first style feature vector into a second neural network to obtain a second volume;
[0079] The determining unit is further configured to determine a first volume adjustment factor according to the first volume and the second volume;
[0080] The determining unit is further configured to determine the playback volume of each frame of the audio signal according to the first volume adjustment factor and an actual volume of each frame of the audio signal in the multiple frames of audio signals.
[0081] As a possible implementation manner, the input unit is further used to input user information into a third neural network to obtain an object feature vector;
[0082] The input unit inputs the first style feature vector into the second neural network, and obtaining the second volume includes:
[0083] The first style feature vector and the object feature vector are input into a second neural network to obtain a second volume.
[0084] As a possible implementation, the third neural network includes a first layer FC, a first layer NL, a second layer FC, a second layer NL and a third layer FC, the user information includes M information of the user, and the input unit inputs the user information into the third neural network, and the object feature vector obtained includes:
[0085] Extracting features of each of the M information through the first layer FC to obtain M vectors;
[0086] Performing nonlinear transformation on the M vectors through the first layer NL to obtain M transformation vectors;
[0087] Performing linear transformation on the transformation vectors whose corresponding information similarity is greater than a threshold in the M transformation vectors through the second layer FC to obtain N vectors;
[0088] Performing nonlinear transformation on the N vectors through the second layer NL to obtain N transformed vectors;
[0089] The N transformation vectors are linearly transformed through the third layer FC to obtain an object feature vector, where N is an integer greater than 1 and M is an integer greater than N.
[0090] As a possible implementation manner, the determining unit is further configured to determine a second volume adjustment factor according to the first style feature vector and historical audio data information;
[0091] The input unit is specifically used to input the first style feature vector and the second volume adjustment factor into a second neural network to obtain a second volume.
[0092] As a possible implementation manner, the historical audio data information includes style feature vectors of a plurality of audio data and a third volume adjustment factor;
[0093] The determining unit determines the second volume adjustment factor according to the first style feature vector and the historical audio data information, including:
[0094] Calculating, based on the first style feature vector and the style feature vectors of the plurality of audio data, a similarity between the first audio data and each of the plurality of audio data to obtain a plurality of similarities;
[0095] A second volume adjustment factor is calculated according to the multiple similarities and the third volume adjustment factors corresponding to the multiple similarities.
[0096] The fifth aspect discloses an electronic device, which may include a processor and a memory, the memory being used to store a set of computer program codes, and when the processor is used to call the computer program codes stored in the memory, the processor executes the method disclosed in the first aspect or any possible implementation of the first aspect, or the processor executes the method disclosed in the second aspect or any possible implementation of the second aspect.
[0097] In a sixth aspect, an electronic device is disclosed, which may include a processor, a memory, an input interface, and an output interface, wherein the memory is used to store a set of computer program codes, the input interface is used to receive information from other electronic devices outside the electronic device, and the output interface is used to output information to other electronic devices outside the electronic device. When the processor is used to call the computer program code stored in the memory, the processor executes the method disclosed in the first aspect or any possible implementation of the first aspect, or the processor executes the method disclosed in the second aspect or any possible implementation of the second aspect.
[0098] The seventh aspect discloses a computer-readable storage medium having a computer program or computer instructions stored thereon. When the computer program or computer instructions are executed, the method disclosed in the first aspect or any possible implementation of the first aspect, or the method disclosed in the second aspect or any possible implementation of the second aspect is implemented.
[0099] The eighth aspect discloses a computer program product, which, when running on a computer, enables the computer to execute the method disclosed in the first aspect or any possible implementation of the first aspect, or the method disclosed in the second aspect or any possible implementation of the second aspect.
[0100] In an embodiment of the present invention, the first volume adjustment ratio can be automatically determined based on the audio data, so that the music player can determine the playback volume of each frame of the audio signal in the audio data based on the first volume adjustment ratio and the actual volume of each frame of the audio signal in the audio data, without the need for manual adjustment by the user, thereby improving the user experience. In addition, the first volume adjustment ratio determined may be different for different audio data, which can avoid the situation where all audio data use the same first volume adjustment ratio, thereby further improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0101] Figure 1 is a structural schematic diagram of an electronic device disclosed in an embodiment of the present invention;
[0102] Figure 2 It is a flow chart of a method for determining a magnification based on artificial intelligence disclosed in an embodiment of the present invention;
[0103] Figure 3 is a schematic diagram of the structure of a first neural network disclosed in an embodiment of the present invention;
[0104] Figure 4 is a schematic diagram of the structure of a second neural network disclosed in an embodiment of the present invention;
[0105] Figure 5It is a flow chart of another method for determining a magnification based on artificial intelligence disclosed in an embodiment of the present invention;
[0106] Figure 6 is a schematic diagram of the structure of a third neural network disclosed in an embodiment of the present invention;
[0107] Figure 7 It is a flow chart of another method for determining a magnification based on artificial intelligence disclosed in an embodiment of the present invention;
[0108] Figure 8 It is a flow chart of a volume adjustment method based on artificial intelligence disclosed in an embodiment of the present invention;
[0109] Fig. 9 It is a flowchart of another volume adjustment method based on artificial intelligence disclosed in an embodiment of the present invention;
[0110] Fig.10 It is a flowchart of another volume adjustment method based on artificial intelligence disclosed in an embodiment of the present invention;
[0111] Fig.11 is a schematic diagram of the structure of a device disclosed in an embodiment of the present invention;
[0112] Fig.12 It is a schematic diagram of the structure of another electronic device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0113] The embodiment of the present invention discloses a method for determining a magnification ratio based on artificial intelligence, a method for adjusting a volume, and a device, which are used to improve user experience. Detailed descriptions are given below.
[0114] In order to better understand the embodiments of the present invention, the relevant technologies are described below. 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. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that the machines have the functions of perception, reasoning and decision-making.
[0115] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. Basic artificial intelligence technologies generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operating / interactive systems, mechatronics, etc. Artificial intelligence software technology includes voice technology.
[0116] The key technologies of speech technology include automatic speech recognition technology (ASR), text-to-speech technology (TTS) and voiceprint recognition technology. Enabling computers to listen, see, speak and feel is the future development direction of human-computer interaction, among which speech has become one of the most promising human-computer interaction methods in the future.
[0117] The present invention realizes automatic adjustment of the volume of audio data by voice technology, which is specifically described by the following embodiments.
[0118] In order to better understand the embodiment of the present invention, the structure of the electronic device used in the embodiment of the present invention is described below. Figure 1 , Figure 1 Schematic diagram of the structure of an electronic device disclosed in an embodiment of the present invention. Figure 1 As shown, the electronic device may include an audio player 101 and a volume adjustment ratio determination device 102. The audio player 101 may send audio data to be played to the volume adjustment ratio determination device 102. After receiving the audio data from the audio player 101, the volume adjustment ratio determination device 102 may determine a first volume adjustment ratio according to the audio data, and may send the determined first volume adjustment ratio to the audio player 101. After receiving the first volume adjustment ratio from the volume adjustment ratio determination device 102, the audio player 101 may determine the playback volume of each frame of audio signal in the audio data according to the actual volume of each frame of audio signal in the audio data and the first volume adjustment ratio, and play the audio data according to the playback volume of each frame of audio signal in the audio data.
[0119] In order to better understand the embodiments of the present invention, the related technology is described below.
[0120] In one case, the first volume adjustment ratio is the ratio of the first volume to the second volume. The third volume adjustment ratio is the ratio of the first volume to the third volume. The second volume adjustment ratio is the weighted average of multiple third volume adjustment ratios. The first volume is the average value of the actual volume of all frame audio signals included in the audio data. The second volume is the average volume of all frame audio signals included in the predicted audio data. The third volume is the average value of the playback volume of all frame audio signals included in the audio data. The actual volume of the audio signal is the original volume of the audio signal, that is, the volume before it is adjusted. The playback volume of the audio signal is the volume actually played after the volume of the audio signal is adjusted. The actual volume of the audio signal is different from the playback volume of the audio signal.
[0121] In another case, the first volume adjustment factor is a ratio of the second volume to the first volume, and the third volume adjustment factor is a ratio of the third volume to the first volume.
[0122] User information is information of the same user. User information may include age, gender, frequency of user volume adjustment, average volume after user volume adjustment, time when user creates account, number of singers followed by user, number of songs collected by user, hobbies, constellations, personality, etc. The frequency of user volume adjustment may be the number of times the user adjusts the volume within a fixed time period. The average volume after user adjustment may be the average value of the mean of the playback volume of each frame of audio signal included in the audio data after the user adjusts the volume within a fixed time period. It should be noted that in the specific implementation of the present application, information related to the user, such as the various information included in the user information mentioned above, when the embodiment of the present application is applied to specific goods or technologies, user permission or consent is required, and only after receiving the confirmation of permission or consent issued by the user, will the acquisition process be carried out. In addition, the collection and processing of relevant user information in the embodiment of the present application should be strictly in accordance with the requirements of relevant national laws and regulations, and within the scope of authorization of laws and regulations and personal information subjects, subsequent information use and processing behavior should be carried out. For example, when the embodiments of the present application are applied to specific products or technologies, the user's permission or consent is required, and the collection, use and processing of relevant information (such as the various information included in the user information mentioned above) must comply with relevant laws, regulations and standards in the relevant regions.
[0123] Based on the structure of the above electronic equipment, please refer to Figure 2 , Figure 2 1 is a flow chart of a method for determining a magnification based on artificial intelligence disclosed in an embodiment of the present invention. The method for determining a magnification based on artificial intelligence is described from the perspective of the volume adjustment magnification determining device 102. Figure 2 As shown, the artificial intelligence-based magnification determination method may include the following steps.
[0124] 201. Acquire first audio data including multiple frames of audio signals.
[0125] When the audio player plays audio data, the volume adjustment ratio determination device 102 can obtain first audio data including multiple frames of audio signals. The first audio data is the audio data to be played in the audio player. The first audio data can be various audio data such as songs, novels, crosstalk, storytelling, entertainment, etc. The volume adjustment ratio determination device 102 can actively obtain the first audio data from the audio player, or passively obtain the first audio data from the audio player.
[0126] 202. Determine an average volume of multiple frames of audio signals to obtain a first volume.
[0127] After acquiring the first audio data, the average volume of the multiple frames of audio signals included in the first audio data can be determined to obtain the first volume. The first audio data may include a volume field, and the volume field may include multiple volumes. The multiple frames of audio signals correspond to the multiple volumes one by one, and it can be seen that each frame of audio signal corresponds to a volume. The volume field can be first extracted from the first audio data, and then the multiple volumes included in the audio field can be averaged to obtain the first volume. The volume field can exist in the form of a vector.
[0128] For example, assuming that the first audio data is a song, the duration of the song is 300 seconds, and 1 second includes 10 frames of audio signals. It can be seen that the audio field is a 3000-dimensional vector. For example, the audio field can be (0.1, 0.5, ..., 0.2).
[0129] 203. Use a first neural network to extract style features of each frame of audio signals in the multiple frames of audio signals to obtain a first style feature vector.
[0130] After acquiring the first audio data, the style feature of each frame of the audio signal in the multiple frames of audio signals included in the first audio data can be extracted using the first neural network to obtain a first style feature vector. Step 202 and step 203 can be performed in parallel or in series.
[0131] It should be understood that each frame of audio signal in the multi-frame audio signal is a vector. For example, assuming that the first audio data is a song, the duration of the song is 300 seconds, and 1 second includes 10 frames of audio signals, then the first audio data includes 3000 vectors.
[0132] The first neural network may be a recycle-region (R)-CNN model. The first neural network may include a first recurrent neural network (RNN), a convolutional neural network (CNN) and a second RNN, the input of the first RNN is a multi-frame audio signal, the input of the CNN is the output of the first RNN, the input of the second RNN is the output of the CNN, and the output of the second RNN is the first style feature vector.
[0133] See also Figure 3 , Figure 3 is a schematic diagram of the structure of a first neural network disclosed in an embodiment of the present invention. Figure 3 As shown, the first audio data may be input into the first RNN first, and each vector in the first audio data may be processed as a moment. Figure 3 Only five moments are shown. After the vector at each moment passes through the first RNN, a vector will be output, and the output vector will be input to the CNN. The CNN may include two fully connected layers and one convolutional layer, and the output of the first RNN may pass through a fully connected layer, a convolutional layer, and another fully connected layer in the CNN in sequence. On the one hand, the CNN can change the dimension of the vector input to the CNN so that the dimension is adapted to the CNN. On the other hand, the CNN can increase the depth of the first neural network. Since the deeper the model, the better the effect, the effect of the first neural network can be improved. The vector at each moment output by the first RNN is output after passing through the CNN, that is, the output of the CNN is also a vector at each moment. The output of the CNN can then be input to the second RNN. The structure of the second RNN is similar to that of the first RNN, except that: 1. The input of the first RNN is the first audio data, while the input of the second RNN is the output of the CNN; 2. The output of the first RNN is a vector at each moment, while the second RNN only outputs the vector at the last moment. Since the vector at the last moment includes the information of all previous moments, the second RNN only needs to output the vector at the last moment.
[0134] The first RNN may be a gated recurrent unit (GRU) model or a long short term memory (LSTM) model. The second RNN may be a GRU model or a LSTM model.
[0135] It should be understood that Figure 3 This is a schematic illustration of the structure of the first neural network, and does not limit the structure of the first neural network. For example, CNN may include three fully connected layers. For another example, CNN may include two convolutional layers.
[0136] It should be understood that the first neural network is a trained neural network.
[0137] 204. Input the first style feature vector into a second neural network to obtain a second volume.
[0138] After obtaining the first style feature vector, the first style feature vector can be input into the second neural network to obtain the second volume. That is, the second neural network predicts the volume of the first audio data according to the first style feature vector to obtain the second volume. It can be seen that the second neural network has the function of presetting the volume of the audio data.
[0139] See also Figure 4 , Figure 4 is a schematic diagram of the structure of a second neural network disclosed in an embodiment of the present invention. Figure 4 As shown, the second neural network may include two fully connected layers. The style feature vector is input into the first fully connected layer to reduce the dimension of the style feature vector, and then the output result may be input into the second fully connected layer to reduce the dimension again to 1, so that the output is a value, which is a score, that is, the predicted volume.
[0140] It should be understood that the second neural network is a trained model.
[0141] When training the second neural network, the first neural network is already a trained model. It can be seen that the first neural network needs to be trained first, and after the first neural network is trained, the second neural network can be trained. Before training the second neural network, the audio data used for training and the final volume need to be recorded. The recorded audio data is used as the input of the first neural network, and the final volume is used as the supervision data. After the second neural network predicts a volume based on the output of the first neural network, the loss can be calculated based on this volume and the corresponding final volume, and the parameters of the second neural network can be optimized based on the loss.
[0142] It should be understood that the volume predicted by the second neural network is the average volume.
[0143] 205. Determine a first volume adjustment factor according to the first volume and the second volume.
[0144] After the first volume and the second volume are obtained, the first volume adjustment factor may be determined according to the first volume and the second volume.
[0145] After determining the first volume adjustment ratio, the first volume adjustment ratio can be sent to the audio player. After the audio player receives the first volume adjustment ratio, when the first volume adjustment ratio is the ratio between the first volume and the second volume, the playback volume of each frame of audio signal in the multiple frames of audio signals included in the first audio data is the ratio of the actual volume of each frame of audio signal to the first volume adjustment ratio. When the first volume adjustment ratio is the ratio between the second volume and the first volume, the playback volume of each frame of audio signal in the multiple frames of audio signals included in the first audio data is the product of the actual volume of each frame of audio signal and the first volume adjustment ratio.
[0146] exist Figure 2 In the described method, the first volume adjustment ratio can be automatically determined according to the audio data, so that the music player can determine the playback volume of each frame of the audio signal in the audio data according to the first volume adjustment ratio and the actual volume of each frame of the audio signal in the audio data, without the need for manual adjustment by the user, which can improve the user experience. In addition, the first volume adjustment ratio determined may be different for different audio data, which can avoid the situation where all styles of audio data use the same first volume adjustment ratio, thereby further improving the user experience.
[0147] Based on the structure of the above electronic equipment, please refer to Figure 5 , Figure 5 FIG. 1 is a flow chart of another method for determining a magnification based on artificial intelligence disclosed in an embodiment of the present invention. The method for determining a magnification based on artificial intelligence is described from the perspective of the volume adjustment magnification determining device 102. Figure 5 As shown, the artificial intelligence-based magnification determination method may include the following steps.
[0148] 501. Acquire first audio data including multiple frames of audio signals.
[0149] Among them, step 501 is the same as step 201, and the detailed description refers to step 201.
[0150] 502. Determine an average volume of multiple frames of audio signals to obtain a first volume.
[0151] Among them, step 502 is the same as step 202, and the detailed description refers to step 202.
[0152] 503. Use a first neural network to extract a style feature of each frame of audio signals in the multiple frames of audio signals to obtain a first style feature vector.
[0153] Among them, step 503 is the same as step 203, and the detailed description refers to step 203.
[0154] 504. Input the user information into the third neural network to obtain an object feature vector.
[0155] The user information may be input into the third neural network to obtain the object feature vector. The user information may include M information of the user, that is, may include M information of one user.
[0156] The third neural network may include a first layer, a first layer, a second layer FC, a second layer NL and a third layer FC. The first layer FC may be used to extract the features of each of the M information to obtain M vectors. The first layer NL may be used to perform nonlinear transformation on the M vectors to obtain M transformation vectors. The second layer FC may be used to perform linear transformation on the transformation vectors whose similarity between corresponding information is greater than a threshold to obtain N vectors. The second layer NL may be used to perform nonlinear transformation on the N vectors to obtain N transformation vectors. The third layer FC may be used to perform linear transformation on the N transformation vectors to obtain an object feature vector. N is an integer greater than 1, and M is an integer greater than N.
[0157] The first layer FC may include M FCs, the first layer NL may include M NLs, the second layer FC may include N FCs, the second layer NL may include N NLs, and the third layer FC may include one FC. The inputs of the M FCs correspond to the M information one by one, which can be understood as the input of each FC in the M FCs included in the first layer FC is one piece of information of the user, and these information are different. The outputs of the M FCs correspond to the inputs of the M NLs one by one, which can be understood as the outputs of the M FCs included in the first layer FC are respectively the inputs of the M NLs included in the first layer NL. The inputs of each FC in the N FCs correspond to the outputs of multiple NLs in the M NLs, which can be understood as the outputs of multiple NLs in the M NLs included in the first layer NL can be the inputs of one FC in the N FCs included in the second layer FC, but the inputs of different FCs in the N FCs come from different NLs. The outputs of the N FCs correspond to the inputs of the N NLs one by one, which can be understood as the outputs of the N FCs included in the second layer FC are respectively the inputs of the N NLs included in the second layer NL, which can also be understood as the inputs of each NL included in the second layer NL come from different FCs in the N FCs included in the second layer FC. The input of the third layer FC is the output of N NLs. The similarity between the information of users corresponding to multiple NLs in the M NLs corresponding to each FC in the N FCs is greater than a threshold.
[0158] FC is used for feature extraction and abstraction. The more layers of FC are used, the better the features extracted. NL is sandwiched between two layers of FC so that the two layers of FC will not degenerate into one layer of FC. Since FC performs linear transformation, if NL is not added between two layers of FC, two linear transformations are equivalent to one linear transformation, which is equivalent to one layer of FC.
[0159] In the first layer FC, each user's information is processed by a dedicated FC. In the second layer FC, the vectors corresponding to the user's similar information are processed by the same FC. In the third layer FC, the vectors corresponding to all the user's information are processed by the same FC, and then an object feature vector is output.
[0160] See also Figure 6 , Figure 6 It is a schematic diagram of the structure of a third neural network disclosed in an embodiment of the present invention. Figure 6 : is a schematic diagram of the structure of the third neural network with M being 7 and N being 3. It should be understood that Figure 6 This is an exemplary description of the structure of the third neural network, and does not limit the structure of the third neural network. For example, the values of M and N may be other values. For another example, the input user information may be other information of the user.
[0161] Among them, step 502, step 503 and step 504 can be executed in parallel or in series.
[0162] 505. Input the first style feature vector and the object feature vector into a second neural network to obtain a second volume.
[0163] After obtaining the first style feature vector and the object feature vector, the first style feature vector and the object feature vector can be input into the second neural network to obtain the second volume. The first style feature vector and the object feature vector can be concatenated into a long vector and then input into the second neural network. When concatenating, the first style feature vector can be in front, or the object feature vector can be in front.
[0164] 506. Determine a first volume adjustment factor according to the first volume and the second volume.
[0165] Among them, step 506 is the same as step 205, and the detailed description refers to step 205.
[0166] exist Figure 5In the described method, the first volume adjustment ratio can be automatically determined based on the audio data and user information, so that the music player can determine the playback volume of each frame of the audio signal in the audio data based on the first volume adjustment ratio and the actual volume of each frame of the audio signal in the audio data, without the need for manual adjustment by the user, which can improve the user experience. In addition, the determined first volume adjustment ratio may be different for different audio data, which can avoid the situation where all audio data use the same first volume adjustment ratio, thereby further improving the user experience. Furthermore, for the same audio data, the user information corresponding to different users may be different, so that the determined first volume adjustment ratio may be different, which can avoid the problem of all users using the same first volume adjustment ratio, and can improve the personalization of the determination of the first volume adjustment ratio, thereby further improving the user experience.
[0167] Based on the structure of the above electronic equipment, please refer to Figure 7 , Figure 7 FIG. 1 is a flow chart of another method for determining a magnification based on artificial intelligence disclosed in an embodiment of the present invention. The method for determining a magnification based on artificial intelligence is described from the perspective of the volume adjustment magnification determining device 102. Figure 7 As shown, the artificial intelligence-based magnification determination method may include the following steps.
[0168] 701. Acquire first audio data including multiple frames of audio signals.
[0169] Among them, step 701 is the same as step 201, and the detailed description refers to step 201.
[0170] 702. Determine an average volume of multiple frames of audio signals to obtain a first volume.
[0171] Among them, step 702 is the same as step 202, and the detailed description refers to step 202.
[0172] 703. Use a first neural network to extract style features of each frame of audio signals in the multiple frames of audio signals to obtain a first style feature vector.
[0173] Among them, step 703 is the same as step 203, and the detailed description refers to step 203.
[0174] 704. Determine a second volume adjustment factor according to the first style feature vector and the historical audio data information.
[0175] Historical audio data information may be stored in advance. The historical audio data information may include style feature vectors and a third volume adjustment factor of multiple audio data. The same user adjusts the volume of the multiple audio data. The style feature vector here can be obtained by the first neural network. It should be understood that each audio data corresponds to a style feature vector and a third volume adjustment factor.
[0176] After the first style feature vector is obtained, the second volume adjustment factor may be determined according to the first style feature vector and the historical audio data information.
[0177] The similarity between the first audio data and each of the multiple audio data can be calculated based on the first style feature vector and the style feature vectors of the multiple audio data to obtain multiple similarities. The similarity between the first audio data and each of the multiple audio data can be calculated by cosine similarity to obtain multiple similarities. The formula can be expressed as follows:
[0178]
[0179] Among them, I i represents the similarity between the first audio data and the i-th audio data in the multiple audio data, a represents the first style feature vector, b i represents the style feature vector of the i-th audio data among multiple audio data, |a| represents the modulus of the first style feature vector, |b i | represents the modulus of the style feature vector of the i-th audio data in the plurality of audio data. i=1, 2, ..., K. K is the number of audio data included in the plurality of audio data.
[0180] Then, the second volume adjustment ratio can be calculated based on the multiple similarities and the third volume adjustment ratios corresponding to the multiple similarities. The similarity corresponding to each audio data in the multiple audio data can be determined as the weight of each audio data, and the third volume adjustment ratios corresponding to the multiple audio data can be weighted averaged to obtain the second volume adjustment ratio. The formula can be expressed as follows:
[0181]
[0182] Among them, J represents the second volume, P i Indicates a third volume adjustment factor of the i-th audio data among a plurality of audio data.
[0183] 705. Input the first style feature vector and the second volume adjustment factor into a second neural network to obtain a second volume.
[0184] After obtaining the first style feature vector and the second volume adjustment factor, the first style feature vector and the second volume adjustment factor can be input into the second neural network to obtain the second volume. The first style feature vector and the second volume adjustment factor can be spliced into a long vector and then input into the second neural network. When splicing, the first style feature vector can be in front, or the second volume adjustment factor can be in front.
[0185] 706. Determine a first volume adjustment factor according to the first volume and the second volume.
[0186] Among them, step 706 is the same as step 205, and the detailed description refers to step 205.
[0187] exist Figure 7 In the described method, the first volume adjustment ratio can be automatically determined based on the audio data and the historical audio data information, so that the music player can determine the playback volume of each frame of the audio signal in the audio data based on the first volume adjustment ratio and the actual volume of each frame of the audio signal in the audio data, without the need for manual adjustment by the user, which can improve the user experience. In addition, the first volume adjustment ratio determined may be different for different audio data, which can avoid the situation where all audio data use the same first volume adjustment ratio, thereby further improving the user experience. Furthermore, for the same audio data, the historical audio data information corresponding to different users may be different, so that the first volume adjustment ratios determined for different users may be different, which can avoid the problem of all users using the same first volume adjustment ratio, and can improve the personalization of the determination of the first volume adjustment ratio, thereby further improving the user experience.
[0188] See also Figure 8 , Figure 8 1 is a flow chart of a volume adjustment method based on artificial intelligence disclosed in an embodiment of the present invention. The volume adjustment method based on artificial intelligence can be applied to an audio player. Figure 8 As shown, the volume adjustment method based on artificial intelligence may include the following steps.
[0189] 801. Acquire first audio data to be played including multiple frames of audio signals.
[0190] When the audio player plays audio data, first audio data including multiple frames of audio signals can be obtained. The first audio data is the audio data to be played in the audio player. The first audio data can be various audio data such as songs, novels, crosstalk, storytelling, entertainment, etc.
[0191] 802. Determine an average volume of multiple frames of audio signals to obtain a first volume.
[0192] Among them, step 802 is the same as step 202, and the detailed description refers to step 202.
[0193] 803. Use a first neural network to extract style features of each frame of audio signals in the multiple frames of audio signals to obtain a first style feature vector.
[0194] Among them, step 803 is the same as step 203, and the detailed description refers to step 203.
[0195] 804. Input the first style feature vector into a second neural network to obtain a second volume.
[0196] Among them, step 804 is the same as step 204, and the detailed description refers to step 204.
[0197] 805. Determine a first volume adjustment factor according to the first volume and the second volume.
[0198] Among them, step 805 is the same as step 205, and the detailed description refers to step 205.
[0199] 806. Determine a playback volume of each frame of the audio signal according to the first volume adjustment factor and an actual volume of each frame of the audio signal in the multiple frames of the audio signal.
[0200] After determining the first volume adjustment ratio, when the first volume adjustment ratio is the ratio between the first volume and the second volume, the playback volume of each frame of audio signal in the multiple frames of audio signals included in the first audio data is the ratio of the actual volume of each frame of audio signal to the first volume adjustment ratio. When the first volume adjustment ratio is the ratio between the second volume and the first volume, the playback volume of each frame of audio signal in the multiple frames of audio signals included in the first audio data is the product of the actual volume of each frame of audio signal and the first volume adjustment ratio.
[0201] exist Figure 8 In the described method, the first volume adjustment factor can be automatically determined according to the audio data, and then the playback volume of each frame of the audio signal in the audio data can be determined according to the determined first volume adjustment factor and the actual volume of each frame of the audio signal in the audio data, without the need for manual adjustment by the user, which can improve the user experience. In addition, the determined first volume adjustment factor may be different for different audio data, which can avoid the situation where all audio data are played at the same volume, thereby further improving the user experience.
[0202] See also Fig. 9 , Fig. 9 FIG. 1 is a flow chart of another volume adjustment method based on artificial intelligence disclosed in an embodiment of the present invention. The volume adjustment method based on artificial intelligence can be applied to an audio player. Fig. 9 As shown, the volume adjustment method based on artificial intelligence may include the following steps.
[0203] 901. Acquire first audio data to be played including multiple frames of audio signals.
[0204] Among them, step 901 is the same as step 801, and the detailed description refers to step 801.
[0205] 902. Determine an average volume of multiple frames of audio signals to obtain a first volume.
[0206] Among them, step 902 is the same as step 202, and the detailed description refers to step 202.
[0207] 903. Use a first neural network to extract style features of each frame of audio signals in the multiple frames of audio signals to obtain a first style feature vector.
[0208] Among them, step 903 is the same as step 203, and the detailed description refers to step 203.
[0209] 904. Input the user information into the third neural network to obtain an object feature vector.
[0210] Among them, step 904 is the same as step 504, and the detailed description refers to step 504.
[0211] 905. Input the first style feature vector and the object feature vector into a second neural network to obtain a second volume.
[0212] Among them, step 905 is the same as step 505, and the detailed description refers to step 505.
[0213] 906. Determine a first volume adjustment factor according to the first volume and the second volume.
[0214] Among them, step 906 is the same as step 205, and the detailed description refers to step 205.
[0215] 907 . Determine a playback volume of each frame of the audio signal according to the first volume adjustment factor and an actual volume of each frame of the audio signal in the multiple frames of the audio signal.
[0216] Among them, step 907 is the same as step 806, and the detailed description refers to step 806.
[0217] exist Fig. 9In the described method, the first volume adjustment ratio can be automatically determined based on the audio data and user information, and then the playback volume of each frame of the audio signal in the audio data can be determined based on the first volume adjustment ratio and the actual volume of each frame of the audio signal in the audio data, without the need for manual adjustment by the user, which can improve the user experience. In addition, the first volume adjustment ratio determined may be different for different audio data, which can avoid the situation where all audio data are played at the same volume, thereby further improving the user experience. Furthermore, for the same audio data, the user information corresponding to different users may be different, and the first volume adjustment ratio determined may be different, which can avoid the problem of all users playing the same audio data at the same playback volume, and can improve the personalization of volume adjustment, thereby further improving the user experience.
[0218] See also Fig.10 , Fig.10 FIG. 1 is a flow chart of another volume adjustment method based on artificial intelligence disclosed in an embodiment of the present invention. The volume adjustment method based on artificial intelligence can be applied to an audio player. Fig.10 As shown, the volume adjustment method based on artificial intelligence may include the following steps.
[0219] 1001. Obtain first audio data to be played including multiple frames of audio signals.
[0220] Among them, step 1001 is the same as step 801, and the detailed description refers to step 801.
[0221] 1002. Determine an average volume of multiple frames of audio signals to obtain a first volume.
[0222] Among them, step 1002 is the same as step 202, and the detailed description refers to step 202.
[0223] 1003. Use a first neural network to extract style features of each frame of audio signals in multiple frames of audio signals to obtain a first style feature vector.
[0224] Among them, step 1003 is the same as step 203, and the detailed description refers to step 203.
[0225] 1004. Determine a second volume adjustment factor according to the first style feature vector and historical audio data information.
[0226] Among them, step 1004 is the same as step 704, and the detailed description refers to step 704.
[0227] 1005. Input the first style feature vector and the second volume adjustment factor into a second neural network to obtain a second volume.
[0228] Among them, step 1005 is the same as step 705, and the detailed description refers to step 705.
[0229] 1006. Determine a first volume adjustment factor according to the first volume and the second volume.
[0230] Among them, step 1006 is the same as step 205, and the detailed description refers to step 205.
[0231] 1007 . Determine a playback volume of each frame of the audio signal according to the first volume adjustment factor and an actual volume of each frame of the audio signal in the multiple frames of the audio signal.
[0232] Among them, step 1006 is the same as step 806, and the detailed description refers to step 806.
[0233] exist Fig.10 In the described method, the first volume adjustment ratio can be automatically determined based on the audio data and the historical audio data information, and then the playback volume of each frame of the audio signal in the audio data can be determined based on the first volume adjustment ratio and the actual volume of each frame of the audio signal in the audio data, without the need for manual adjustment by the user, which can improve the user experience. In addition, the first volume adjustment ratio determined may be different for different audio data, which can avoid the situation where all audio data are played at the same volume, thereby further improving the user experience. Furthermore, for the same audio data, the historical audio data information corresponding to different users may be different, and the first volume adjustment ratio determined may be different, which can avoid the problem of all users playing the same audio data at the same playback volume, and can improve the personalization of volume adjustment, thereby further improving the user experience.
[0234] See also Fig.11 , Fig.11 Schematic diagram of a device disclosed in an embodiment of the present invention. Fig.11 As shown, the device may include an acquisition unit 1101 , a determination unit 1102 , an extraction unit 1103 and an input unit 1104 .
[0235] In one embodiment, the device may be an artificial intelligence-based magnification determination device, wherein:
[0236] An acquiring unit 1101 is configured to acquire first audio data, where the first audio data includes multiple frames of audio signals;
[0237] A determining unit 1102 is used to determine an average volume of multiple frames of audio signals to obtain a first volume;
[0238] The extraction unit 1103 is used to extract the style feature of each frame of the audio signal in the multiple frames of audio signals by using the first neural network to obtain a first style feature vector;
[0239] An input unit 1104, configured to input the first style feature vector into a second neural network to obtain a second volume;
[0240] The determining unit 1102 is further configured to determine a first volume adjustment factor according to the first volume and the second volume.
[0241] In one embodiment, the input unit 1104 is further used to input the user information into the third neural network to obtain the object feature vector;
[0242] The input unit 1104 inputs the first style feature vector into the second neural network, and obtains the second volume including:
[0243] The first style feature vector and the object feature vector are input into a second neural network to obtain a second volume.
[0244] In one embodiment, the third neural network includes a first layer FC, a first layer NL, a second layer FC, a second layer NL and a third layer FC, the user information includes M information of the user, and the input unit 1104 inputs the user information into the third neural network, and the object feature vector obtained includes:
[0245] The first layer FC extracts the features of each of the M information and obtains M vectors;
[0246] Perform nonlinear transformation on the M vectors through the first layer NL to obtain M transformation vectors;
[0247] Through the second layer FC, linear transformation is performed on the transformation vectors whose corresponding information similarity is greater than a threshold in the M transformation vectors to obtain N vectors;
[0248] The second layer NL performs nonlinear transformation on the N vectors to obtain N transformation vectors;
[0249] The N transformation vectors are linearly transformed through the third layer FC to obtain the object feature vector, where N is an integer greater than 1 and M is an integer greater than N.
[0250] In one embodiment, the determining unit 1102 is further configured to determine a second volume adjustment factor according to the first style feature vector and the historical audio data information;
[0251] The input unit 1104 is specifically configured to input the first style feature vector and the second volume adjustment factor into the second neural network to obtain a second volume.
[0252] In one embodiment, the historical audio data information includes style feature vectors and a third volume adjustment factor of a plurality of audio data;
[0253] The determining unit 1102 determines the second volume adjustment factor according to the first style feature vector and the historical audio data information, including:
[0254] Calculating the similarity between the first audio data and each of the multiple audio data based on the first style feature vector and the style feature vectors of the multiple audio data to obtain multiple similarities;
[0255] A second volume adjustment factor is calculated according to the multiple similarities and the third volume adjustment factors corresponding to the multiple similarities.
[0256] In one embodiment, the first neural network includes a first RNN, a CNN and a second RNN, the input of the first RNN is a multi-frame audio signal, the input of the CNN is the output of the first RNN, the input of the second RNN is the output of the CNN, and the output of the second RNN is a first style feature vector.
[0257] For detailed description of the acquisition unit 1101, the determination unit 1102, the extraction unit 1103 and the input unit 1104, please refer to the above Figure 2 , Figure 5 and Figure 7 The method embodiment shown is obtained and will not be described in detail here.
[0258] In another embodiment, the device may be an artificial intelligence-based volume adjustment device, wherein:
[0259] An acquiring unit 1101 is configured to acquire first audio data to be played, where the first audio data includes multiple frames of audio signals;
[0260] A determining unit 1102 is used to determine an average volume of multiple frames of audio signals to obtain a first volume;
[0261] The extraction unit 1103 is used to extract the style feature of each frame of the audio signal in the multiple frames of audio signals by using the first neural network to obtain a first style feature vector;
[0262] An input unit 1104, configured to input the first style feature vector into a second neural network to obtain a second volume;
[0263] The determining unit 1102 is further configured to determine a first volume adjustment factor according to the first volume and the second volume;
[0264] The determining unit 1102 is further configured to determine the playback volume of each frame of the audio signal according to the first volume adjustment factor and the actual volume of each frame of the audio signal in the multiple frames of the audio signal.
[0265] In one embodiment, the input unit 1104 is further used to input the user information into the third neural network to obtain the object feature vector;
[0266] The input unit 1104 inputs the first style feature vector into the second neural network, and obtains the second volume including:
[0267] The first style feature vector and the object feature vector are input into a second neural network to obtain a second volume.
[0268] In one embodiment, the third neural network includes a first layer FC, a first layer NL, a second layer FC, a second layer NL and a third layer FC, the user information includes M information of the user, and the input unit 1104 inputs the user information into the third neural network, and the object feature vector obtained includes:
[0269] The first layer FC extracts the features of each of the M information and obtains M vectors;
[0270] Perform nonlinear transformation on the M vectors through the first layer NL to obtain M transformation vectors;
[0271] Through the second layer FC, linear transformation is performed on the transformation vectors whose corresponding information similarity is greater than a threshold in the M transformation vectors to obtain N vectors;
[0272] The second layer NL performs nonlinear transformation on the N vectors to obtain N transformation vectors;
[0273] The N transformation vectors are linearly transformed through the third layer FC to obtain the object feature vector, where N is an integer greater than 1 and M is an integer greater than N.
[0274] In one embodiment, the determining unit 1102 is further configured to determine a second volume adjustment factor according to the first style feature vector and the historical audio data information;
[0275] The input unit 1104 is specifically configured to input the first style feature vector and the second volume adjustment factor into the second neural network to obtain a second volume.
[0276] In one embodiment, the historical audio data information includes style feature vectors and a third volume adjustment factor of a plurality of audio data;
[0277] The determining unit 1102 determines the second volume adjustment factor according to the first style feature vector and the historical audio data information, including:
[0278] Calculating the similarity between the first audio data and each of the multiple audio data based on the first style feature vector and the style feature vectors of the multiple audio data to obtain multiple similarities;
[0279] A second volume adjustment factor is calculated according to the multiple similarities and the third volume adjustment factors corresponding to the multiple similarities.
[0280] In one embodiment, the first neural network includes a first RNN, a CNN and a second RNN, the input of the first RNN is a multi-frame audio signal, the input of the CNN is the output of the first RNN, the input of the second RNN is the output of the CNN, and the output of the second RNN is a first style feature vector.
[0281] For detailed description of the acquisition unit 1101, the determination unit 1102, the extraction unit 1103 and the input unit 1104, please refer to the above Figure 8 , Fig. 9 and Fig.10 The method embodiment shown is obtained and will not be described in detail here.
[0282] See also Fig.12 , Fig.12 FIG. 1 is a schematic diagram of the structure of another electronic device disclosed in an embodiment of the present invention. Fig.12 As shown, the electronic device may include a processor 1201, a memory 1202 and a connecting line 1203. In addition, the electronic device may also include an input interface 1204 and an output interface 1205. The memory 1202 may exist independently, and the connecting line 1203 is connected to the processor 1201. The memory 1202 may also be integrated with the processor 1201. The connecting line 1203 may include a path to transmit information between the above components. Among them, the memory 1202 stores computer program instructions, and the processor 1201 is used to execute the computer program instructions stored in the memory 1202. Among them:
[0283] The electronic device may be provided with a magnification determination device based on artificial intelligence, and may also be provided with a volume adjustment device based on artificial intelligence. When the program instructions stored in the memory 1202 are executed, the processor 1201 is used to call the program instructions stored in the memory 1202 to perform the operations performed by the acquisition unit 1101, the determination unit 1102, the extraction unit 1103 and the input unit 1104 in the above embodiment. The input interface 1204 is used to receive information from other electronic devices. The output interface 1205 is used to send information to other electronic devices.
[0284] The embodiment of the present invention further discloses a computer-readable storage medium on which instructions are stored. When the instructions are executed, the method in the above method embodiment is executed.
[0285] The embodiment of the present invention further discloses a computer program product comprising instructions, and when the instructions are executed, the method in the above method embodiment is executed.
[0286] The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only the specific implementation methods of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present application should be included in the scope of protection of the present application.
Claims
1. A method for determining a magnification based on artificial intelligence, characterized in that: include: Acquire first audio data, where the first audio data includes multiple frames of audio signals; Determine an average volume of the multiple frames of audio signals to obtain a first volume; Extracting style features of each frame of audio signals in the multiple frames of audio signals using a first neural network to obtain a first style feature vector; Inputting the first style feature vector into a second neural network to obtain a second volume; determining a first volume adjustment factor according to the first volume and the second volume; The method further comprises: calculating the similarity between the first audio data and each of the plurality of audio data according to the first style feature vector and the style feature vectors of the plurality of audio data included in the historical audio data information, so as to obtain a plurality of similarities; calculating a second volume adjustment factor according to the plurality of similarities and a third volume adjustment factor corresponding to the plurality of similarities included in the historical audio data information; Inputting the first style feature vector into a second neural network to obtain a second volume comprises: The first style feature vector and the second volume adjustment factor are input into the second neural network to obtain the second volume.
2. The method according to claim 1, characterized in that The method further comprises: Inputting user information into the third neural network to obtain an object feature vector; Inputting the first style feature vector into a second neural network to obtain a second volume comprises: The first style feature vector and the object feature vector are input into a second neural network to obtain a second volume.
3. The method according to claim 2, characterized in that The third neural network includes a first fully connected layer FC, a first nonlinear layer NL, a second layer FC, a second layer NL and a third layer FC, the user information includes M information of the user, and the user information is input into the third neural network to obtain the object feature vector including: Extracting features of each of the M information through the first fully connected layer FC to obtain M vectors; Performing nonlinear transformation on the M vectors through the first nonlinear layer NL to obtain M transformation vectors; Performing linear transformation on the transformation vectors whose corresponding information similarity is greater than a threshold in the M transformation vectors through the second layer FC to obtain N vectors; Performing nonlinear transformation on the N vectors through the second layer NL to obtain N transformed vectors; The N transformation vectors are linearly transformed through the third layer FC to obtain an object feature vector, where N is an integer greater than 1 and M is an integer greater than N.
4. A volume adjustment method based on artificial intelligence, characterized in that: include: Acquire first audio data to be played, wherein the first audio data includes multiple frames of audio signals; Determine an average volume of the multiple frames of audio signals to obtain a first volume; Extracting style features of each frame of audio signals in the multiple frames of audio signals using a first neural network to obtain a first style feature vector; Inputting the first style feature vector into a second neural network to obtain a second volume; determining a first volume adjustment factor according to the first volume and the second volume; Determining the playback volume of each frame of the audio signal according to the first volume adjustment magnification and the actual volume of each frame of the audio signal in the multiple frames of audio signals; The method further comprises: calculating the similarity between the first audio data and each of the plurality of audio data according to the first style feature vector and the style feature vectors of the plurality of audio data included in the historical audio data information, so as to obtain a plurality of similarities; calculating a second volume adjustment factor according to the plurality of similarities and a third volume adjustment factor corresponding to the plurality of similarities included in the historical audio data information; Inputting the first style feature vector into a second neural network to obtain a second volume comprises: The first style feature vector and the second volume adjustment factor are input into a second neural network to obtain a second volume.
5. A magnification determination device based on artificial intelligence, characterized in that: include: An acquisition unit, configured to acquire first audio data, wherein the first audio data includes a plurality of frames of audio signals; A determining unit, configured to determine an average volume of the plurality of frames of audio signals to obtain a first volume; An extraction unit, configured to extract a style feature of each frame of the audio signal in the plurality of frames of audio signals using a first neural network to obtain a first style feature vector; An input unit, used for inputting the first style feature vector into a second neural network to obtain a second volume; The determining unit is further configured to determine a first volume adjustment factor according to the first volume and the second volume; The determining unit is further configured to determine a second volume adjustment factor according to the first style feature vector and historical audio data information; The input unit is specifically configured to input the first style feature vector and the second volume adjustment factor into the second neural network to obtain the second volume; The historical audio data information includes style feature vectors of multiple audio data and a third volume adjustment factor; the determination unit, when used to determine the second volume adjustment factor based on the first style feature vector and the historical audio data information, is used to calculate the similarity between the first audio data and each of the multiple audio data based on the first style feature vector and the style feature vectors of the multiple audio data to obtain multiple similarities; and calculate the second volume adjustment factor based on the multiple similarities and the third volume adjustment factor corresponding to the multiple similarities.
6. A volume adjustment device based on artificial intelligence, characterized in that: include: An acquisition unit, configured to acquire first audio data to be played, wherein the first audio data includes multiple frames of audio signals; A determining unit, configured to determine an average volume of the plurality of frames of audio signals to obtain a first volume; An extraction unit, configured to extract a style feature of each frame of the audio signal in the plurality of frames of audio signals using a first neural network to obtain a first style feature vector; An input unit, used for inputting the first style feature vector into a second neural network to obtain a second volume; The determining unit is further configured to determine a first volume adjustment factor according to the first volume and the second volume; The determining unit is further configured to determine the playback volume of each frame of the audio signal according to the first volume adjustment factor and the actual volume of each frame of the audio signal in the multiple frames of audio signals; The determining unit is further configured to determine a second volume adjustment factor according to the first style feature vector and historical audio data information; The input unit is specifically configured to input the first style feature vector and the second volume adjustment factor into the second neural network to obtain the second volume; The historical audio data information includes style feature vectors of multiple audio data and a third volume adjustment factor; the determination unit, when used to determine the second volume adjustment factor based on the first style feature vector and the historical audio data information, is used to calculate the similarity between the first audio data and each of the multiple audio data based on the first style feature vector and the style feature vectors of the multiple audio data to obtain multiple similarities; and calculate the second volume adjustment factor based on the multiple similarities and the third volume adjustment factor corresponding to the multiple similarities.
7. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store a set of computer program codes, and the processor is used to call the computer program codes stored in the memory to implement the method according to any one of claims 1 to 4.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program or a computer instruction. When the computer program or the computer instruction is executed, the method according to any one of claims 1 to 4 is implemented.
9. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
