Audio generation method, device and audio generation device

Through pre-trained emotional category recognition models and music generation models, matching audio is generated for photos or videos in social networks, which solves the problem of lack of audio background in the existing technology, realizes rich display and synchronous playback of emotional expressions, and improves User experience.

CN110309327BActive Publication Date: 2024-10-01BEIJING SOGOU TECHNOLOGY DEVELOPMENT CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN201810168009.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-02-28
Publication Date
2024-10-01
Estimated Expiration
2038-02-28

AI Technical Summary

Technical Problem

The lack of audio background when displaying photos or videos in existing social networks results in insufficient display effects and difficulty in directly perceiving the emotional expression of the content.

Method used

Through the pre-trained emotional category recognition model and music generation model, it automatically identifies the emotional category of multimedia content and generates matching audio to achieve synchronous playback of audio and photos or videos.

Benefits of technology

The display effect of photos or videos is enhanced, allowing users to directly perceive their emotional expressions, and audio playback that matches the content is implemented on social platforms, enriching the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110309327B_ABST
    Figure CN110309327B_ABST
Patent Text Reader

Abstract

The present invention provides an audio generation method, an apparatus, and an audio generation apparatus, wherein the audio generation method comprises: obtaining multimedia content for which audio is to be generated; determining an emotion category of the multimedia content; and generating audio matching the emotion category for the multimedia content. By using the method or apparatus embodiment of the present invention, when opening a photo or video, the generated audio can be played together with the photo or video, thereby achieving the purpose of playing audio matching the emotion of the person in the photo or video.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of social network, and in particular to an audio generation method and device, and a device for generating audio. Background Art

[0002] With the rapid development of Internet technology, it is becoming more and more common for users to use various social software to communicate, post status, etc. Users can take photos of landscapes or people, and even short videos. Users can save them on their mobile phones and view them repeatedly later, or post them in Moments or diary status, so that their friends can see their dynamics. The inventor found in the research process that the form of these photos or short videos is relatively simple, for example, they generally do not have audio as background music, etc. When displaying these photos or short videos, the display effect is not rich and diverse enough, and it is not easy for users to perceive the emotions expressed in them more directly. Summary of the invention

[0003] The inventor discovered during the research process that in the prior art, when users take photos or videos and other multimedia content, they generally have some emotions. For example, some are very happy photos taken in a beautiful scenery, and some are sad videos taken because of a sad thing. If it is possible to generate audio that matches the emotions of the characters based on these photos or videos, and save the audio corresponding to the photos or videos, when the photos or videos are opened later, the audio corresponding to the photos or videos can be directly heard, so that the emotions expressed by the photos or videos can be directly perceived. Alternatively, the user can also publish the audio and photos or videos to the circle of friends or log status at the same time, so that when their friends and others open the photos or videos, they can play the generated audio together with the photos or videos, thereby achieving the purpose of playing audio that matches the emotions of the characters in the photos or videos.

[0004] Based on this, the present invention provides a method for generating audio, which is used to play the generated audio together with a photo or video, etc., so as to achieve the purpose of playing audio that matches the emotions of the characters in the photo or video.

[0005] The present invention also provides a device for generating audio to ensure the implementation and application of the above method in practice.

[0006] The present invention provides a method for generating audio, comprising:

[0007] Acquire multimedia content of audio to be generated;

[0008] determining an emotion category of the multimedia content;

[0009] An audio matching the emotion category is generated for the multimedia content.

[0010] Wherein, determining the emotion category of the multimedia content includes:

[0011] A pre-trained emotion category recognition model is used to determine the emotion category of the multimedia content.

[0012] The emotion category recognition model is trained in the following manner:

[0013] Obtaining training data for multimedia content;

[0014] The training data is trained using a convolutional neural network model to obtain a sentiment category recognition model.

[0015] The step of generating audio matching the emotion category for the multimedia content includes:

[0016] Querying a preset music library for music clips that match the emotion category;

[0017] The matched music fragments are generated as audio of the multimedia content using a pre-trained music generation model.

[0018] The music generation model is trained in the following way:

[0019] Obtain various music corpora corresponding to various emotional categories;

[0020] The music corpus is trained using a recurrent neural network model to obtain a music generation model.

[0021] The method further comprises:

[0022] In response to a triggering operation on the multimedia content, audio corresponding to the multimedia content is played.

[0023] The method further comprises:

[0024] In response to the switching operation on the multimedia content, the audio corresponding to the switched multimedia content is played.

[0025] The present invention provides an audio generation device, comprising:

[0026] An acquisition unit, used to acquire multimedia content of the audio to be generated;

[0027] A determination unit, configured to determine an emotion category of the multimedia content;

[0028] A generating unit is used to generate audio matching the emotion category for the multimedia content.

[0029] The determining unit is specifically used for:

[0030] A pre-trained emotion category recognition model is used to determine the emotion category of the multimedia content.

[0031] The emotion category recognition model is trained in the following manner:

[0032] Obtaining training data for multimedia content;

[0033] The training data is trained using a convolutional neural network model to obtain a sentiment category recognition model.

[0034] Wherein, the generating unit comprises:

[0035] A query subunit, used for querying a music clip that matches the emotion category from a preset music clip library;

[0036] The generation subunit is used to use a pre-trained music generation model to generate the audio of the multimedia content from the matched music fragments.

[0037] The music generation model is trained in the following way:

[0038] Obtain various music corpora corresponding to various emotional categories;

[0039] The music corpus is trained using a recurrent neural network model to obtain a music generation model.

[0040] The device further comprises:

[0041] The first playing unit is used to play the audio corresponding to the multimedia content in response to a triggering operation on the multimedia content.

[0042] The device further comprises:

[0043] The second playing unit is used to play the audio corresponding to the switched multimedia content in response to the switching operation on the multimedia content.

[0044] The present invention provides an audio generation device, comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors. The one or more programs include instructions for performing the following operations:

[0045] Acquire multimedia content of audio to be generated;

[0046] determining an emotion category of the multimedia content;

[0047] An audio matching the emotion category is generated for the multimedia content.

[0048] The present invention provides a computer-readable medium having instructions stored thereon, which, when executed by one or more processors, enables a device to execute the audio generation method as described above.

[0049] In an embodiment of the present invention, deep learning can be used to train an emotion category recognition model, thereby automatically recognizing emotions in photos or videos, and automatically generating audio that matches the emotion category for the photos or videos through a pre-trained music generation model. The user can save the audio with the photos or videos, or post them to a circle of friends or a log status, so that when the photos or videos are opened later, the generated audio can be played together with the photos or videos, thereby achieving the purpose of playing audio that matches the emotions of the characters in the photos or videos. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0051] Figure 1 is a flow chart of an embodiment of an audio generation method of the present invention;

[0052] Figure 2 Is a block diagram of an audio generating device embodiment of the present invention;

[0053] Figure 3 It is a structural block diagram of a device for generating audio according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] The present invention can be used in many general or special computing device environments or configurations, such as personal computers, handheld or portable devices, tablet devices, multi-processor devices, distributed computing environments including any of the above devices or equipment, etc.

[0056] The present invention may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0057] In actual applications, when users take photos or videos and other multimedia content, their facial expressions usually vary due to differences in personal emotions, or the scenery they take is adapted to their emotions or feelings at the time. For example, when a user is sad, he or she may prefer rainy scenery or prefer to take pictures of sad facial expressions on friends' faces, while when a user is happy, he or she may prefer to take pictures of sunny scenery or prefer to take pictures of happy facial expressions on other people's faces.

[0058] Therefore, the videos or photos taken by the user are usually related to the emotions of the user at the time of taking the photos. In the embodiment of the present invention, in order to identify the emotion category of the characters included in the multimedia content such as the photos or videos taken by the user, such as happiness, surprise, anger, contempt, disgust, fright, naturalness or sadness, an emotion category recognition model can be pre-trained. The training process of the emotion category recognition model can include the following steps A1 to A2:

[0059] Step A1: Obtain training data of multimedia content.

[0060] In this embodiment, training data of photos and / or videos are obtained in advance, wherein some photos or videos that can clearly distinguish the emotion category can be taken, and then these photos or videos are manually labeled with the emotion category to finally form a training data set. For example, for photos, a possible data set structure can be, for example: {image1: emotion1, image2: emotion2...}. For videos, the emotion category of each frame of photos can be provided. For example, a video includes 90 frames of photos, and a possible data set structure of the video can be: {image1~30: emotion1, image31~60: emotion2, image61~90: emotion3}. Because in the video, the user's emotional changes are generally smooth, and will not suddenly change from happiness to sadness, etc., therefore, considering this change, when manually labeling each frame of the video, it can be carried out in a way that the emotion of each frame of the photo is labeled as one category. Of course, in practical applications, every 10 frames or every 20 frames of photos can also be selected, which can be set independently by those skilled in the art. In addition to manually annotated training data sets, some training data can also be selected from the Cohn-Kanade Plus public data set.

[0061] Step A2: Use a convolutional neural network model to train the training data to obtain a sentiment category recognition model.

[0062] For the training data obtained in step A1, face detection is first performed to obtain the face position, and then the pixel information of the face position is passed to the convolutional neural network CNN structure, after the traditional multi-step convolution Conv layer, the excitation Relu layer and the pooling Maxpool layer, and then enters the two-layer FC (Fully Connected) layer. The network layers and related parameters used in each step can refer to other pre-trained CNN models. Finally, by adjusting the parameters of the Softmax layer, the emotion category recognition model is obtained.

[0063] If there are only photos of scenery, various scenery photos can be classified in advance, and the type of emotion of the user taking the photo reflected in the photo can be determined by analyzing the scenery in the scenery photo. For example, photos of rainy scenes, for example, if it is a rainy scene, it is associated with the sad category of emotion, and if it is a sunny scene photo, it is associated with the happy category of emotion, and so on. Photos of various scenes can be associated with various emotion categories in advance, and then the association relationship can be saved in advance, or the association relationship can be built into the emotion category recognition model, so that the emotion category of the user taking the photo corresponding to the photo of a certain scene can be determined later according to the association relationship.

[0064] The above steps are used to transform the CNN model so that it can perform emotion category recognition and achieve the purpose of classifying the emotion categories of multimedia content.

[0065] In the embodiment of the present invention, an audio generation model may be pre-trained, and the audio generation model is used to generate complete audio according to the audio corpus corresponding to each emotion category. For example, one or more audio corpus corresponding to the emotion category of "happy" is used to generate audio corresponding to the emotion of happiness. Then, the generation process of the audio generation model may include the following steps B1 to B2:

[0066] Step B1: Obtain audio corpora corresponding to various emotion categories.

[0067] In this step, first, a large amount of audio corpus can be searched from the Internet. The audio corpus can be audio in MIDI format. Of course, various existing tools can also be used to convert existing audio files in MP3 format, WMA format, WAV format, etc. into MIDI format; or, audio files in other formats, such as MP3 format, WMA format, WAV format, can also be used. The embodiment of the present invention does not limit the format of the audio corpus. Then, these audio corpora are marked according to the classification of emotional categories, for example, an audio corpus in a MIDI format is marked to correspond to the emotion of "happy", and another audio corpus in a MIDI format corresponds to the emotion of "angry", and so on. Among them, MIDI is the most widely used music standard format in the arrangement industry, which can be called a musical score that can be understood by a computer. It uses digital control signals of musical notes to record audio. A complete MIDI audio is only tens of KB in size and can contain dozens of audio tracks.

[0068] Step B2: Use a recurrent neural network model to train the audio corpus to obtain an audio generation model.

[0069] In this step, the RNN recurrent neural network model can be used to train the audio corpus of step B1 to obtain an audio generation model. Specifically, the audio generation model that uses RNN to generate melody is "Melody_RNN", and the audio generation model that uses RNN to generate polyphony is "Polyphony_RNN". Both of these RNNs can use LSTM structures (long short-term memory structures).

[0070] Specifically, the midi audio data after emotion classification in step B1 can be converted into a TFRecord file in the data format that is compatible with the processing of the second-generation artificial intelligence learning system "tensorflow", and then according to the above two models "Melody_RNN and Polyphony_RNN", the data representing the melody or polyphony is extracted from the audio data in the TFRecord format to form a new TFRecord file, and then the new TFRecord file is used to train and verify the audio generation model using the corresponding "Melody_RNN and Polyphony_RNN" models.

[0071] In practical applications, batch size, model structure, and number of trainings can be set during model training. For example, in model training, the batch size is set to 64, the model structure is a two-layer RNN, each layer contains 128 processing units, and the number of trainings is set to 100,000. The three parameters in the model verification process can be kept consistent with the parameter settings in the model training process. Because a complete audio (melody or polyphony) is a sequence, and the RNN recurrent neural network can predict the next melody or polyphony according to the current melody or polyphony sequence, and so on until the end of the audio sequence, and then through the BPTT (Backpropagation through time) algorithm, the training error is propagated forward to optimize the entire RNN, and finally form an audio generation model.

[0072] After training the emotion category recognition model and the audio generation model, these two models can be used to automatically generate audio that matches the emotions of the characters in the photos or videos taken by the user. Figure 1 , shows a flow chart of an audio generation method embodiment of the present invention, and this embodiment may include the following steps:

[0073] Step 101: Acquire multimedia content for which audio is to be generated.

[0074] In this step, the acquired multimedia content may include photos or videos, etc. Specifically, the camera installed on the user's handheld smart terminal may be used to take photos or record videos in real time, and the photos or recorded videos may be used as the multimedia content for generating audio. Of course, it may also be photos or videos selected by the user from the gallery of the smart terminal, etc., and the corresponding photos or videos may be determined as multimedia content only in response to the user's selection or shooting operation.

[0075] Step 102: Determine the emotion category of the multimedia content.

[0076] In this step, a pre-trained emotion category recognition model can be used to determine the emotion category of the multimedia content. Specifically, for photos, the taken photos can be used as the input of the emotion category recognition model, and then the emotion category recognition model can first obtain the objects that meet the preset conditions in the photos, such as faces or scenery. If a face is extracted from the photo, the pixel information of the position of the face is passed to the convolutional neural network CNN structure, and the weight of the expression on the face belonging to a certain emotion category is calculated through each step of the network layer. Finally, the emotion category recognition model can output a list including various emotion categories and their corresponding weights for the photo, and the list can be, for example, in the form of: {"happy": 0.82, "surprise": 0.10, "angry": 0.003, "contempt": 0.002, "disgust": 0.004, "fright": 0.003, "natural": 0.05, "sad": 0.006, ...}. Of course, the emotion categories and their corresponding weights may not be output in the form of a list. When there is only one determined emotion category, for example, the weight of the emotion category of happiness is close to or equal to 1, while the weights of other emotion categories are close to or equal to 0, only happiness and its weight 1 may be output as the determined emotion category. If the scene is extracted from the photo, the emotion of the user taking the photo at the time may be determined according to the pre-saved correspondence between the scene and various emotion categories. For example, the rainy scene reflects the sad emotional state of the user taking the photo at the time, and so on. This correspondence may be pre-set, and may be saved by an emotion category recognition model, or may be saved in other ways, as long as the preset emotion category can be queried according to the scene.

[0077] In practical applications, the emotion category corresponding to the weight with the largest value can be used as the emotion category of the photo, that is, "happy". Of course, the emotion categories whose weight values ​​meet the preset weight threshold can also be used as the emotion category to which the photo belongs. For example, the emotion categories with weight values ​​greater than 0.5 can be used as the emotion category to which the photo belongs, and so on. The size of the preset weight threshold can be set independently by technical personnel in this field.

[0078] As for videos, since videos are synthesized from photos at a certain frame rate, they are actually composed of several frames of photos. Therefore, each frame of photos in the video can be used as the input of the emotion category recognition model, and then the emotion category recognition model can output a weight list corresponding to the emotion category for each frame of photos. Each photo can take the emotion corresponding to the maximum weight value as the emotion category to which the photo belongs (or the emotion category corresponding to the weight value greater than the preset weight threshold, etc.), and then the emotion category of each frame of photos can be determined for the video according to the emotion category of each frame of photos in the manual labeling method in step A1. For example, for a video including 100 frames of photos, one or more corresponding emotion categories can be determined for every 20 frames of photos, or one or more corresponding emotion categories can be determined for every 50 frames of photos, and so on.

[0079] Of course, if the entire video includes a small number of photo frames, or the emotion of the video has not changed as a whole, a corresponding emotion category can also be determined for the entire video.

[0080] Step 103: Generate audio matching the emotion category for the multimedia content.

[0081] In this step, the pre-trained audio generation model is used to generate audio that matches the emotion category determined in step 102. Specifically, the audio segments that match the emotion category are first queried from the preset music segment library, and then the pre-trained audio generation model is used to generate the audio of the multimedia content from the matching audio segments. The format of the audio segments can be the same as the format of the audio corpus, but because when training the audio generation model, relatively complete audio such as music or songs is used as the music corpus, and the audio segments are part of the audio used to combine and generate audio, so shorter audio can be selected as the audio segments.

[0082] Among them, the audio clips can also be selected as audio in MIDI format. The time of the audio clips does not need to be very long, and the audio clips of a few seconds or more than ten seconds can be used. In addition, each audio clip in MIDI format in the audio clip library has been marked with the emotion category to which it belongs. Therefore, after the emotion category is determined in step 102, if there is only one emotion category, one or more audio clips in MIDI format corresponding to the emotion category can be queried in the audio clip library. In practical applications, multiple audio clips in MIDI format can be randomly combined first, and then the combined audio can be used as the input of the audio generation model to obtain audio that matches the emotion to which the photo or video belongs. If there are multiple emotion categories, one or more audio clips in MIDI format corresponding to the multiple emotion categories can be queried in the audio clip library. In practical applications, multiple audio clips in MIDI format can be randomly combined first, and then the combined audio can be used as the input of the audio generation model to obtain audio that matches the emotion to which the photo or video belongs.

[0083] In actual applications, after obtaining the audio of a photo or video, the photo or video can be saved together with the audio, and when the user opens the photo or video later, the saved audio can be played synchronously to the user. Of course, the photo or video can also be published together with the audio to social networking software, such as a circle of friends or a log status. Specifically, the multimedia content to be published can be published to a social network together with the automatically generated audio, such as a circle of friends or a log status. Specifically, the address of the audio can be embedded in the page corresponding to the corresponding photo or video. If there are multiple photos, the address of the audio corresponding to each photo can be embedded in the page corresponding to each photo.

[0084] There is another situation in actual application. It is possible that a user posts multiple photos in a circle of friends or a log status, and these multiple photos may have different emotion categories. In this case, step 102 and step 103 can be performed for each photo respectively, so as to generate audio matching the emotion category to which each photo belongs.

[0085] After publishing the audio and multimedia content together, the audio corresponding to the multimedia content such as photos or videos can be played in response to the triggering operation of the multimedia content. If the user publishes multimedia content and audio together, and other users see the user's circle of friends or log status, and open the photo or video, the audio embedded in the page will be played at the same time.

[0086] In the case where a user posts multiple photos in a circle of friends or a log status, if other users switch from the current photo to the next photo, that is, open the next photo, then in response to the user's switching operation on the multimedia content, the audio corresponding to the switched multimedia content can be played. If the user switches the photo to display, for example, the emotion of the currently opened photo is happy, then the audio matching the emotion of happy is currently played, and if the user switches to display the next photo, the audio corresponding to the next photo will be played for the user, thereby ensuring that other users can hear the audio matching the emotion category of the photo every time they see a new photo when they are viewing the switched photos.

[0087] It can be seen that in the embodiments of the present invention, deep learning can be used to train an emotion category recognition model, so as to automatically recognize the emotions of photos or videos, and a pre-trained audio generation model can be used to automatically generate audio that matches the emotion category for the photo or video. The user can save the audio together with the photo or video, or post them to a circle of friends or a log status at the same time, so that when the photo or video is opened, the generated audio can be played together with the photo or video, thereby achieving the purpose of playing audio that matches the emotions of the characters in the photo or video.

[0088] For the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, some steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0089] Corresponding to the method provided in the embodiment of the audio generation method of the present invention, see Figure 2 The present invention also provides an embodiment of an audio generation device. In this embodiment, the device may include:

[0090] The acquisition unit 201 is used to acquire multimedia content for generating audio.

[0091] The determination unit 202 is configured to determine the emotion category of the multimedia content.

[0092] The determining unit 202 may be specifically configured to: determine the emotion category of the multimedia content using a pre-trained emotion category recognition model.

[0093] The emotion category recognition model is trained in the following manner:

[0094] Obtaining training data for multimedia content;

[0095] The training data is trained using a convolutional neural network model to obtain a sentiment category recognition model.

[0096] The generating unit 203 is configured to generate audio matching the emotion category for the multimedia content.

[0097] The generating unit 203 may specifically include:

[0098] A query subunit is used to query a music clip that matches the emotion category from a preset music clip library; and a generation subunit is used to use a pre-trained music generation model to generate the audio of the multimedia content from the matching music clip.

[0099] The music generation model is trained in the following way:

[0100] Various music corpora corresponding to various emotion categories are obtained; and the music corpora are trained using a recurrent neural network model to obtain a music generation model.

[0101] Wherein, the device may further include:

[0102] The first playing unit is used to play the audio corresponding to the multimedia content in response to a triggering operation on the multimedia content.

[0103] Wherein, the device may further include:

[0104] The second playback unit is used to respond to the switching operation of the multimedia content and play the audio corresponding to the switched multimedia content. It can be seen that in the embodiment of the present invention, deep learning can be used to train an emotion category recognition model, so as to automatically recognize the emotions of photos or videos, and the pre-trained audio generation model can be used to automatically generate audio matching the emotion category for the photo or video. The user can save the audio and the photo or video at the same time, or publish them to the circle of friends or log status at the same time, so that when the photo or video is opened, the generated audio can be played together with the photo or video, thereby achieving the purpose of playing audio matching the emotions of the characters in the photo or video.

[0105] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0106] Figure 3800 is a structural block diagram of a device for generating audio according to an exemplary embodiment. For example, the device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0107] Reference Figure 3 , the device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0108] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0109] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0110] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.

[0111] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0112] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0113] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0114] The sensor assembly 814 includes one or more sensors for providing various aspects of the status assessment of the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0115] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0116] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0117] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0118] A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to execute an audio generation method, the method comprising: obtaining multimedia content for which audio is to be generated; determining an emotion category of the multimedia content; and generating audio matching the emotion category for the multimedia content.

[0119] Wherein, determining the emotion category of the multimedia content may include:

[0120] A pre-trained emotion category recognition model is used to determine the emotion category of the multimedia content.

[0121] The emotion category recognition model can be trained in the following manner:

[0122] Obtaining training data for multimedia content;

[0123] The training data is trained using a convolutional neural network model to obtain a sentiment category recognition model.

[0124] The step of generating audio matching the emotion category for the multimedia content may include:

[0125] Querying a preset music library for music clips that match the emotion category;

[0126] The matched music fragments are generated as audio of the multimedia content using a pre-trained music generation model.

[0127] The music generation model can be trained in the following manner:

[0128] Obtain various music corpora corresponding to various emotional categories;

[0129] The music corpus is trained using a recurrent neural network model to obtain a music generation model.

[0130] The device 800 may also be configured to execute, by one or more processors, the one or more programs including instructions for performing the following operations:

[0131] In response to a triggering operation on the multimedia content, audio corresponding to the multimedia content is played.

[0132] The device 800 may also be configured to execute, by one or more processors, the one or more programs including instructions for performing the following operations:

[0133] In response to the switching operation on the multimedia content, the audio corresponding to the switched multimedia content is played.

[0134] Those skilled in the art will readily appreciate other embodiments of the invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.

[0135] It should be understood that the present invention is not limited to the precise structure described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

[0136] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. An audio generation method, It is characterized in that include: Acquire multimedia content for which audio is to be generated, wherein the multimedia content includes photos or videos, and the video is composed of photos; Determining the emotion category of each photo in the multimedia content, including: using a pre-trained emotion category recognition model to obtain an object in the photo that meets preset conditions; if the object is a human face, passing pixel information of the position of the human face to a convolutional neural network structure to calculate the weight of the expression on the human face belonging to the emotion category; based on a preset weight threshold, determining the emotion category corresponding to the photo according to the weight of the expression on the human face belonging to the emotion category; if the object is a scene, determining the emotion category of the user at that time reflected by the scene in the photo according to the pre-saved correspondence between the scene and various emotion categories; generating audio matching the emotion category for each photo in the multimedia content; In response to a triggering operation on the multimedia content, playing the audio corresponding to the multimedia content, wherein the address of the audio is embedded into a corresponding page of the corresponding photo, and the audio embedded in the page is played when the photo is opened; In response to a switching operation on the multimedia content, playing audio corresponding to the switched multimedia content; The step of generating audio matching the emotion category for each photo in the multimedia content includes: Querying a preset music library for music clips that match the emotion category; Using a pre-trained music generation model, the matched music fragment is generated as audio of the photo of the multimedia content; The music generation model is trained in the following way: Obtain various music corpora corresponding to various emotional categories; The music corpus is trained using a recurrent neural network model to obtain a music generation model, which includes: converting the emotion-classified midi audio data into a TFRecord file, extracting data representing the melody or polyphony from the audio data in TFRecord format based on a first audio generation model that uses RNN to generate melody and a second audio generation model that uses RNN to generate polyphony, respectively, to form a new TFRecord file, and using the new TFRecord file, respectively using the first audio generation model and the second audio generation model to train and verify the music generation model to obtain the music generation model.

2. The method according to claim 1, It is characterized in that The emotion category recognition model is trained in the following manner: Obtaining training data for multimedia content; The training data is trained using a convolutional neural network model to obtain a sentiment category recognition model.

3. An audio generating device, It is characterized in that include: An acquisition unit, configured to acquire multimedia content for generating audio, wherein the multimedia content includes photos or videos, and the video is composed of photos; A determination unit is used to determine the emotion category of each photo in the multimedia content, including: using a pre-trained emotion category recognition model to obtain an object in the photo that meets preset conditions; if the object is a face, passing pixel information of the position of the face to a convolutional neural network structure to calculate the weight of the expression on the face belonging to the emotion category; based on a preset weight threshold, determining the emotion category corresponding to the photo according to the weight of the expression on the face belonging to the emotion category; if the object is a scene, determining the emotion category of the user at that time reflected by the scene in the photo according to the pre-saved correspondence between the scene and various emotion categories; A generating unit, configured to generate audio matching the emotion category for each photo in the multimedia content; A first playing unit, configured to play the audio corresponding to the multimedia content in response to a triggering operation on the multimedia content, wherein the address of the audio is embedded into a corresponding page of the corresponding photo, and the audio embedded in the page is played when the photo is opened; A second playing unit, configured to play audio corresponding to the switched multimedia content in response to a switching operation on the multimedia content; Wherein, the generating unit comprises: A query subunit, used for querying a music clip that matches the emotion category from a preset music clip library; A generating subunit, configured to generate the matched music fragments into audio of the photos of the multimedia content by using a pre-trained music generation model; The music generation model is trained in the following way: Obtain various music corpora corresponding to various emotional categories; The music corpus is trained using a recurrent neural network model to obtain a music generation model, which includes: converting the emotion-classified midi audio data into a TFRecord file, extracting data representing the melody or polyphony from the audio data in TFRecord format based on a first audio generation model that uses RNN to generate melody and a second audio generation model that uses RNN to generate polyphony, respectively, to form a new TFRecord file, and using the new TFRecord file, respectively using the first audio generation model and the second audio generation model to train and verify the music generation model to obtain the music generation model.

4. The device according to claim 3, It is characterized in that The emotion category recognition model is trained in the following manner: Obtaining training data for multimedia content; The training data is trained using a convolutional neural network model to obtain a sentiment category recognition model.

5. A device for generating audio, It is characterized in that The system comprises a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the following operations: Acquire multimedia content for which audio is to be generated, wherein the multimedia content includes photos or videos, and the video is composed of photos; Determining the emotion category of each photo in the multimedia content, including: using a pre-trained emotion category recognition model to obtain an object in the photo that meets preset conditions; if the object is a human face, passing pixel information of the position of the human face to a convolutional neural network structure to calculate the weight of the expression on the human face belonging to the emotion category; based on a preset weight threshold, determining the emotion category corresponding to the photo according to the weight of the expression on the human face belonging to the emotion category; if the object is a scene, determining the emotion category of the user at that time reflected by the scene in the photo according to the pre-saved correspondence between the scene and various emotion categories; generating audio matching the emotion category for each photo in the multimedia content; In response to a triggering operation on the multimedia content, playing the audio corresponding to the multimedia content, wherein the address of the audio is embedded into a corresponding page of the corresponding photo, and the audio embedded in the page is played when the photo is opened; In response to a switching operation on the multimedia content, playing audio corresponding to the switched multimedia content; The step of generating audio matching the emotion category for each photo in the multimedia content includes: Querying a preset music library for music clips that match the emotion category; Using a pre-trained music generation model, the matched music fragment is generated as audio of the photo of the multimedia content; The music generation model is trained in the following way: Obtain various music corpora corresponding to various emotional categories; The music corpus is trained using a recurrent neural network model to obtain a music generation model, which includes: converting the emotion-classified midi audio data into a TFRecord file, extracting data representing the melody or polyphony from the audio data in TFRecord format based on a first audio generation model that uses RNN to generate melody and a second audio generation model that uses RNN to generate polyphony, respectively, to form a new TFRecord file, and using the new TFRecord file, respectively using the first audio generation model and the second audio generation model to train and verify the music generation model to obtain the music generation model.

6. The device according to claim 5, It is characterized in that The emotion category recognition model is trained in the following manner: Obtaining training data for multimedia content; The training data is trained using a convolutional neural network model to obtain a sentiment category recognition model.

7. A computer-readable medium having instructions stored thereon, which, when executed by one or more processors, causes a device to perform the audio generation method according to claim 1 or 2.

Citation Information

Patent Citations

  • Media player for implementing classified playing and classified playing method

    CN101149950A

  • Method and device for outputting image

    CN101271528A

  • Social and interactive applications for mass media

    CN101517550A

  • Method for recognizing face emotion by using integrated convolutional neural network

    CN106529503A

  • Neural network and transfer learning-based multi-mode emotion recognition method and system

    CN107609572A