Song generation method and electronic equipment

文档序号:1447776 发布日期:2020-02-18 浏览:12次 中文

阅读说明:本技术 一种歌曲生成方法及电子设备 (Song generation method and electronic equipment ) 是由 曹新英 秦帅 于 2019-10-31 设计创作,主要内容包括:本发明实施例公开了一种歌曲生成方法及电子设备,其中,所述方法包括:接收用户输入的图像和文字信息;依据所述图像和所述文字信息,确定目标曲调、目标节奏及目标歌词;依据所述目标曲调、目标节奏及目标歌词生成目标歌曲。本发明实施例公开的歌曲生成方法,电子设备用户仅需选择生成歌曲的图像和文字信息输入至电子设备,即可触发电子设备依据图像和文字信息生成歌曲,即便非专业人士也可轻松完成歌曲制作,操作便捷且对专业度无要求。(The embodiment of the invention discloses a song generation method and electronic equipment, wherein the method comprises the following steps: receiving image and character information input by a user; determining a target tune, a target rhythm and target lyrics according to the image and the character information; and generating a target song according to the target tune, the target rhythm and the target lyrics. According to the song generation method disclosed by the embodiment of the invention, the electronic equipment can be triggered to generate the song according to the image and the text information only by inputting the image and the text information of the generated song into the electronic equipment, even a non-professional person can easily complete the song production, the operation is convenient and fast, and no requirement is imposed on the professional degree.)

1. A song generation method applied to electronic equipment is characterized by comprising the following steps:

receiving image and character information input by a user;

determining a target tune, a target rhythm and target lyrics according to the image and the character information;

and generating a target song according to the target tune, the target rhythm and the target lyrics.

2. The method of claim 1,

the step of determining a target tune, a target rhythm and target lyrics according to the image and the text information specifically comprises the following steps:

respectively extracting the features of the image and the character information to obtain image features and character features;

performing feature fusion on the image features and the character features to obtain target features;

and determining a target tune, a target rhythm and target lyrics according to the target characteristics.

3. The method of claim 2,

the step of respectively extracting the features of the image and the character information to obtain the image features and the character features specifically comprises the following steps:

inputting the image into a first neural network model;

acquiring an image feature vector output by the first neural network model, wherein the image feature vector is used for representing the style of a target song;

inputting the text information into a second neural network model;

and acquiring a character feature vector output by the second neural network model, wherein the character feature vector is used for representing the central meaning of the target song.

4. The method of claim 2,

the step of determining a target tune, a target rhythm and target lyrics according to the target characteristics specifically comprises the following steps:

inputting the target characteristics into a tune generation network model, a rhythm generation network model and a song generation network model respectively;

and respectively acquiring a target tune output by the tune generation network model, a target rhythm output by the rhythm generation network model and a target song output by the lyric generation network model.

5. The method of claim 1,

before the step of receiving the image and the text information input by the user, the method further comprises:

determining N groups of song training data, wherein each group of song training data comprises: images, text information, tunes, rhythms and lyrics corresponding to the songs;

and training the first neural network model, the second neural network model, the tune generation network model, the rhythm generation network model and the lyric generation network model through the N groups of song training data.

6. An electronic device, characterized in that the electronic device comprises:

the receiving module is used for receiving images and character information input by a user;

the determining module is used for determining a target tune, a target rhythm and target lyrics according to the image and the character information;

and the generating module is used for generating the target song according to the target tune, the target rhythm and the target lyrics.

7. The electronic device of claim 6, wherein the determining module comprises:

the extraction submodule is used for respectively extracting the features of the image and the character information to obtain image features and character features;

the fusion submodule is used for carrying out feature fusion on the image features and the character features to obtain target features;

and the determining submodule is used for determining a target tune, a target rhythm and target lyrics according to the target characteristics.

8. The electronic device of claim 7, wherein the extraction submodule is specifically configured to:

inputting the image into a first neural network model;

acquiring an image feature vector output by the first neural network model, wherein the image feature vector is used for representing the style of a target song;

inputting the text information into a second neural network model;

and acquiring a character feature vector output by the second neural network model, wherein the character feature vector is used for representing the central meaning of the target song.

9. The electronic device of claim 7, wherein the determination submodule is specifically configured to:

inputting the target characteristics into a tune generation network model, a rhythm generation network model and a song generation network model respectively;

and respectively acquiring a target tune output by the tune generation network model, a target rhythm output by the rhythm generation network model and a target song output by the lyric generation network model.

10. The electronic device of claim 6, further comprising:

a training data determining module, configured to determine N groups of song training data before the receiving module receives image and text information input by a user, where each group of song training data includes: images, text information, tunes, rhythms and lyrics corresponding to the songs;

and the model training module is used for training the first neural network model, the second neural network model, the tune generation network model, the rhythm generation network model and the lyric generation network model through the N groups of song training data.

Technical Field

The embodiment of the invention relates to the technical field of electronic equipment, in particular to a song generation method and electronic equipment.

Background

With the rapid development of mobile internet technology and the continuous popularization of electronic devices, people are increasingly unable to leave electronic devices for work, communication, entertainment and other activities in daily life. Through the electronic device the user may watch a video, play a song, navigate or communicate, etc.

The songs played in the electronic equipment are all finished products, and the user of the electronic equipment can only select the songs from the finished products to play. Finished songs played by the electronic equipment need professional composers, word makers and other professionals to collaborate to generate, the requirement of song making on the professional degree is very high, and non-professionals cannot create and generate songs according to personal requirements.

Disclosure of Invention

The embodiment of the invention provides a song generation method, which aims to solve the problem that a non-professional person cannot create and generate a song according to personal requirements in the prior art.

In order to solve the technical problem, the invention is realized as follows:

in a first aspect, an embodiment of the present invention provides a song generating method applied to an electronic device, where the method includes: receiving image and character information input by a user; determining a target tune, a target rhythm and target lyrics according to the image and the character information; and generating a target song according to the target tune, the target rhythm and the target lyrics.

In a second aspect, an embodiment of the present invention provides an electronic device, where the electronic device includes: the receiving module is used for receiving images and character information input by a user; the determining module is used for determining a target tune, a target rhythm and target lyrics according to the image and the character information; and the generating module is used for generating the target song according to the target tune, the target rhythm and the target lyrics.

In a third aspect, an embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a computer program stored on the memory and executable on the processor, and when executed by the processor, the computer program implements the steps of any one of the song generation methods described in the embodiments of the present invention.

In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores thereon a computer program, and the computer program, when executed by a processor, implements the steps of any one of the song generation methods as described in the embodiments of the present invention.

In the embodiment of the invention, the image and the character information input by a user are received through the electronic equipment; determining a target tune, a target rhythm and target lyrics according to the image and the character information; the target song is generated according to the target tune, the target rhythm and the target lyrics, and the electronic equipment user only needs to select the image and the text information of the generated song to input into the electronic equipment, so that the electronic equipment can be triggered to generate the song according to the image and the text information, even non-professionals can easily complete song production, the operation is convenient and fast, and no requirement is imposed on the professional degree.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.

Fig. 1 is a flowchart illustrating steps of a song generation method according to a first embodiment of the present invention;

FIG. 2 is a flowchart of steps of a song generation method according to a second embodiment of the invention;

FIG. 3 is a schematic diagram of model training;

fig. 4 is a block diagram of an electronic device according to a third embodiment of the present invention;

fig. 5 is a schematic diagram of a hardware structure of an electronic device according to a fourth embodiment of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be described below clearly and completely with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

In various embodiments of the present invention, it should be understood that the sequence numbers of the following processes do not mean the execution sequence, and the execution sequence of the processes should be determined by the functions and the inherent logic, but should not constitute any limitation to the implementation process of the embodiments of the present invention

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:键盘乐器

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!