CN110517656B - Lyric rhythm generation method, device, storage medium and apparatus - Google Patents

Lyric rhythm generation method, device, storage medium and apparatus Download PDF

Info

Publication number
CN110517656B
CN110517656B CN201910728238.9A CN201910728238A CN110517656B CN 110517656 B CN110517656 B CN 110517656B CN 201910728238 A CN201910728238 A CN 201910728238A CN 110517656 B CN110517656 B CN 110517656B
Authority
CN
China
Prior art keywords
lyric
rhythm
beat
matrix
sentence
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910728238.9A
Other languages
Chinese (zh)
Other versions
CN110517656A (en
Inventor
朱照华
王健宗
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910728238.9A priority Critical patent/CN110517656B/en
Publication of CN110517656A publication Critical patent/CN110517656A/en
Application granted granted Critical
Publication of CN110517656B publication Critical patent/CN110517656B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/60Information retrieval; Database structures therefor; File system structures therefor of audio data
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10HELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
    • G10H1/00Details of electrophonic musical instruments
    • G10H1/36Accompaniment arrangements
    • G10H1/40Rhythm

Abstract

The invention discloses a lyric rhythm generation method, a device, a storage medium and a device, wherein the method is characterized in that a plurality of lyric texts to be processed are obtained, multithreading processing is carried out on the lyric texts to be processed, a plurality of sentences are extracted from the lyric texts to be processed, word count statistics is carried out on the extracted sentences respectively, the extracted sentences are stored in a data buffer, sentences in the data buffer are traversed according to a first-in first-out rule, and the traversed sentences are used as current sentences; selecting an initial probability matrix from a beat matrix set of a preset lyric rhythm generation model according to a first word number of a current sentence; selecting a beat rhythm from the initial probability matrix as the sentence rhythm of the current sentence; and splicing the generated sentence rhythms according to time sequence to obtain the lyric rhythms corresponding to the lyric text to be processed, and generating the lyric rhythms through a preset lyric rhythms generation model obtained based on Markov model training to improve the expansibility of the lyric rhythms.

Description

Lyric rhythm generation method, device, storage medium and apparatus
Technical Field
The present invention relates to the field of artificial intelligence, and in particular, to a lyric rhythm generating method, device, storage medium, and apparatus.
Background
At present, the main emphasis of the existing automatic composing technology is the generation of melodies, which is often not paid attention to the rhythms, but the rhythms play a great role in the presentation of music, so the automatic generation of the rhythms is an important research direction in the field of automatic composing. In the process of automatic song creation, whether the melody change can be expressed by a singer or not is considered, and whether the song rhythm distribution can be reasonably combined with the lyrics or not is also considered. At present, the generation of lyrics requires strict and standard lyric input, and the lyrics cannot be well generated to adapt to the music rhythms of different styles, so that the lyrics cannot be suitable for the music rhythms of different styles, and the expandability is poor.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The invention mainly aims to provide a lyric rhythm generation method, device, storage medium and device, and aims to solve the technical problems of poor adaptability and poor expandability of lyric rhythms to music rhythms of different styles in the prior art.
In order to achieve the above object, the present invention provides a lyric rhythm generation method, which includes the steps of:
the lyric rhythm generating device acquires a plurality of lyric texts to be processed;
The multi-thread processor of the lyric rhythm generating device carries out multi-thread processing on a plurality of lyric texts to be processed, extracts a plurality of sentences from the lyric texts to be processed, and carries out word count statistics on the extracted sentences respectively;
The lyric rhythm generating device stores the extracted sentences into a data buffer, traverses the sentences in the data buffer according to a first-in first-out rule, and takes the traversed sentences as current sentences;
The lyric rhythm generating device selects an initial probability matrix from a beat matrix set of a preset lyric rhythm generating model according to a first word number of the current sentence, and the preset lyric rhythm generating model is obtained by training a Markov model;
the lyric rhythm generating device selects a beat rhythm from the initial probability matrix as the sentence rhythm of the current sentence;
The lyric rhythm generating device splices the generated sentence rhythms according to time sequence to obtain the lyric rhythm corresponding to the lyric text to be processed, and sends the lyric rhythm to the playing device.
Preferably, before the generating each sentence rhythm is spliced according to time sequence to obtain a lyric rhythm corresponding to the lyric text to be processed, the lyric rhythm generating method further includes:
the lyric rhythm generating device acquires the initial word number of the sentence rhythm;
calculating the remaining word number of the current sentence according to the first word number and the initial word number;
Judging whether the residual word number is zero or not;
If the number of the remaining words is zero, judging whether the current sentence is the last sentence traversed;
And if the current sentence is the last sentence traversed, executing the time sequence splicing of the generated sentence rhythms to obtain the lyric rhythms corresponding to the lyric text to be processed.
Preferably, after the determining whether the remaining word number is zero, the lyrics tempo generation method further includes:
The lyric rhythm generating device selects a subsequent rhythm matrix from a transfer matrix set of the preset lyric rhythm generating model according to the residual word number when the residual word number is not zero;
selecting a beat rhythm from the follow-up rhythm matrix as the next rhythm of the current sentence, and obtaining a second word number of the next rhythm;
And calculating the new residual word number of the current sentence according to the residual word number and the second word number, and returning to the step of judging whether the residual word number is zero.
Preferably, before the obtaining the plurality of lyric texts to be processed, the lyric rhythm generating method further includes:
the lyric rhythm generating device establishes a basic Markov model and acquires a song sample set;
Training the Markov model according to the music samples in the song sample set to obtain a preset lyric rhythm generation model.
Preferably, the training the markov model according to the music samples in the song sample set to obtain a preset lyric rhythm generating model includes:
the lyric rhythm generating device extracts rhythm sequences corresponding to the music samples from the music samples in the song sample set;
counting non-repeated rhythm sequences in rhythm sequences corresponding to the music samples;
Recording the non-repeated rhythm sequence into a non-repeated rhythm set;
counting the type and the number of rhythms of the first beat in each sentence in each music sample, and recording the type and the number of the rhythms of the first beat to a beat matrix;
Counting the transfer condition between two adjacent beats of the music sample in each sentence, and recording the transfer condition between the two adjacent beats of the music sample into a transfer matrix;
training a Markov model through the non-repeated rhythm set, the beat matrix and the transfer matrix to obtain a preset lyric rhythm generation model.
Preferably, the selecting an initial probability matrix from the beat matrix set of the preset lyric rhythm generation model according to the first word number of the current sentence includes:
The lyric rhythm generating device acquires a third word number corresponding to each beat matrix in a beat matrix set of the preset lyric rhythm generating model;
Judging whether beat matrixes corresponding to the first word number of the current sentence exist in each beat matrix according to the third word number;
And if the beat matrix corresponding to the first word number of the current sentence exists in each beat matrix, selecting the beat matrix corresponding to the first word number as an initial probability matrix.
Preferably, after determining whether a beat matrix corresponding to the first word number of the current sentence exists in each beat matrix according to the third word number, the lyric rhythm generating method further includes:
the lyric rhythm generating device calculates word number differences between the first word number and the third word numbers respectively when the beat matrix corresponding to the first word number of the current sentence does not exist in the beat matrices;
and selecting a beat matrix corresponding to the minimum value in the word number difference value as an initial probability matrix.
In addition, to achieve the above object, the present invention also proposes a lyric tempo generation device comprising a memory, a processor and a lyric tempo generation program stored on the memory and executable on the processor, the lyric tempo generation program being configured to implement the steps of the lyric tempo generation method as described above.
In addition, to achieve the above object, the present invention also proposes a storage medium having stored thereon a lyric tempo generation program which, when executed by a processor, implements the steps of the lyric tempo generation method as described above.
In addition, in order to achieve the above object, the present invention also provides a lyric rhythm generating device, including:
the obtaining module is used for obtaining a plurality of lyric texts to be processed;
The multi-thread processing module is used for carrying out multi-thread processing on a plurality of lyric texts to be processed, extracting a plurality of sentences from the lyric texts to be processed, and respectively carrying out word count statistics on the extracted sentences;
The traversing module is used for storing the extracted sentences into the data buffer, traversing the sentences in the data buffer according to a first-in first-out rule, and taking the traversed sentences as current sentences;
the selection module is used for selecting an initial probability matrix from a beat matrix set of a preset lyric rhythm generation model according to the first word number of the current sentence, wherein the preset lyric rhythm generation model is obtained by training a Markov model;
the selecting module is further configured to select, by the lyric tempo generating device, a beat tempo from the initial probability matrix as a sentence tempo of the current sentence;
The splicing module is used for splicing the generated sentence rhythms according to time sequence to obtain the lyric rhythms corresponding to the lyric text to be processed, and sending the lyric rhythms to a target terminal.
According to the lyric rhythm generation device, a plurality of lyric texts to be processed are acquired, a multithread processor of the lyric rhythm generation device carries out multithread processing on the lyric texts to be processed, a plurality of sentences are extracted from the lyric texts to be processed, word count statistics is carried out on the extracted sentences respectively, the lyric rhythm generation device stores the extracted sentences into a data buffer, the sentences in the data buffer are traversed according to a first-in first-out rule, the traversed sentences are used as current sentences, and lyric rhythm generation of all sentences is achieved through traversing the extracted sentences; selecting an initial probability matrix from a beat matrix set of a preset lyric rhythm generation model according to the first word number of the current sentence, selecting a beat rhythm from the initial probability matrix as the sentence rhythm of the current sentence, splicing the generated sentence rhythms according to time sequence to obtain the lyric rhythm corresponding to the lyric text to be processed, generating the lyric rhythm by the preset lyric rhythm generation model based on Markov model training, generating the lyric rhythm, and generating the compatible lyric rhythms for music rhythms of different styles to improve expansibility of the lyric rhythm.
Drawings
FIG. 1 is a schematic diagram of a lyric rhythm generating device in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart of a first embodiment of the lyric tempo generation method of the present invention;
FIG. 3 is a flowchart of a second embodiment of the lyric tempo generation method of the present invention;
FIG. 4 is a flowchart of a third embodiment of the lyric tempo generation method of the present invention;
Fig. 5 is a block diagram showing the construction of a first embodiment of the lyric tempo generation device of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a lyric rhythm generating device in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the lyric tempo generation device may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display (Display), and the optional user interface 1003 may also include a standard wired interface, a wireless interface, and the wired interface for the user interface 1003 may be a USB interface in the present invention. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., a wireless FIdelity (WI-FI) interface). The Memory 1005 may be a high-speed random access Memory (Random Access Memory, RAM) Memory or a stable Memory (NVM), such as a disk Memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the structure shown in fig. 1 does not constitute a limitation of the apparatus for generating a cadence of words, and may include more or fewer components than shown, or may combine certain components, or may be arranged in different ways.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and a lyric tempo generation program may be included in a memory 1005 as one type of computer storage medium.
In the lyric rhythm generating device shown in fig. 1, the network interface 1004 is mainly used for connecting a background server and performing data communication with the background server; the user interface 1003 is mainly used for connecting user equipment; the lyric tempo generation device invokes a lyric tempo generation program stored in the memory 1005 via the processor 1001 and executes the lyric tempo generation method provided by the embodiment of the present invention.
Based on the above hardware structure, an embodiment of the lyric rhythm generating method of the present invention is provided.
Referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of a lyric rhythm generating method according to the present invention.
In a first embodiment, the lyric tempo generation method includes the steps of:
step S10: the lyric rhythm generating device acquires a plurality of lyric texts to be processed.
Note that, the execution subject of the embodiment is the lyric tempo generation device, where the lyric tempo generation device may be an electronic device such as a personal computer or a server, and the embodiment is not limited thereto. In order to improve the lyric rhythm generation efficiency, a plurality of lyric texts to be processed can be obtained at the same time, so that the plurality of lyric texts to be processed are processed in a multithreading mode, batch processing is realized, and the processing efficiency is improved.
Step S20: the multi-thread processor of the lyric rhythm generating device carries out multi-thread processing on a plurality of lyric texts to be processed, extracts a plurality of sentences from the lyric texts to be processed, and carries out word count statistics on the extracted sentences respectively.
It should be appreciated that the multithreaded processor may concurrently process a plurality of lyric texts to be processed, thereby improving processing efficiency. The lyric text to be processed is a given lyric text U= { U1, U2, … Ui …, us }, i is an integer greater than or equal to 1, s is the number of sentences in the lyric text, and the number of words of each sentence is counted to obtain the number of words of each sentence. Extracting a plurality of sentences from the lyric text to be processed generally requires extracting all sentences in the lyric text to be processed, and counting the number of words of all sentences to obtain the number of sentence words corresponding to all sentences in the lyric text to be processed.
Step S30: the lyric rhythm generating device stores the extracted sentences into a data buffer, traverses the sentences in the data buffer according to a first-in first-out rule, and takes the traversed sentences as current sentences.
It can be understood that, in order to implement corresponding processing on each sentence to generate a lyric rhythm corresponding to each sentence in the lyric text to be processed, the extracted sentences need to be traversed, and for each sentence Ui in the lyric text to be processed, traversing is performed according to the sequence of occurrence of each sentence in the initial lyric text. The extracted sentences can be stored in the data buffer firstly, and when the sentences need to be further processed, the sentences in the data buffer are traversed through a first-in first-out rule; the extracted sentences can be ranked according to the sequence of the sentences in the initial lyric text, and the ranked sentences are traversed according to the sequence; and taking the traversed sentence as the current sentence.
Step S40: the lyric rhythm generating device selects an initial probability matrix from a beat matrix set of a preset lyric rhythm generating model according to the first word number of the current sentence, and the preset lyric rhythm generating model is obtained through training a Markov model.
It should be noted that the preset lyric rhythm generation model is a trained markov model. Establishing a basic Markov model, acquiring a song sample set, and training the Markov model according to music samples in the song sample set to acquire a preset lyric rhythm generation model. In the training phase, the types and the number of rhythm types occurring in the first beat in each sentence of the music sample are counted and recorded into a specific matrix Wnum, wherein num represents the length of the remaining lyrics of the current sentence, and the matrix Wnum is added to the beat matrix set W. A suitable matrix may be selected from the beat matrix W of the preset lyric tempo generation model according to the first word number of the current sentence as an initial probability matrix of its generated tempo. If the matrix Wnum corresponding to the first word number of the current sentence belongs to the beat matrix W of the preset lyric rhythm generation model, directly selecting Wnum as an initial probability matrix, otherwise, selecting a matrix with the smallest difference value with the first word number of the current sentence from the beat matrices W of the preset lyric rhythm generation model as an initial probability matrix.
Step S50: the lyric tempo generation device selects a beat tempo from the initial probability matrix as a sentence tempo of the current sentence.
It should be understood that, after the initial probability matrix is selected, a beat rhythm is randomly selected from the probabilities of each item in the initial probability matrix as the starting rhythm thereof, or the beat rhythm with the highest probability can be selected as the starting rhythm thereof according to the probabilities of each item, which is not limited. And updating the remaining number of words num=num-c, c being the number of notes of the selected sentence rhythm. And judging whether the number of the remaining words is zero, if the number of the remaining words is not zero, selecting a subsequent rhythm matrix from a transfer matrix of the lyric rhythm generation model according to the number of the remaining words, selecting a beat rhythm from the subsequent rhythm matrix as the next rhythm of the current sentence, returning to the step of judging whether the number of the remaining words is zero until the number of the remaining words is zero, and selecting the corresponding beat rhythm from the characters in the current sentence, namely splicing the sentence rhythm and the subsequent next rhythm to form the complete sentence rhythm of the current sentence.
Step S60: the lyric rhythm generating device splices the generated sentence rhythms according to time sequence to obtain the lyric rhythm corresponding to the lyric text to be processed, and sends the lyric rhythm to the playing device.
It should be noted that, the extracted sentences are traversed, so that the extracted sentences are all completed to select the corresponding beat rhythm from the beat matrix of the preset lyric rhythm generation model as the sentence rhythm. And if all sentences in the lyric text to be processed are selected to be completed, the sentence rhythms of all sentences in the lyric text to be processed can be spliced according to a time sequence, so that the lyric rhythms corresponding to the lyric text to be processed are obtained. The playing device can be a device with playing function such as a player, a smart phone or a computer, and the lyric rhythm is sent to the playing device, and the lyric rhythm is played through the playing device.
In this embodiment, a lyric rhythm generating device acquires a plurality of lyric texts to be processed, a multithreading processor of the lyric rhythm generating device performs multithreading processing on the plurality of lyric texts to be processed, extracts a plurality of sentences from the lyric texts to be processed, and performs word count statistics on the extracted sentences respectively, the lyric rhythm generating device stores the extracted sentences into a data buffer, traverses sentences in the data buffer according to a first-in first-out rule, takes the traversed sentences as current sentences, and performs lyric rhythm generation on all sentences by traversing the extracted sentences; selecting an initial probability matrix from a beat matrix set of a preset lyric rhythm generation model according to the first word number of the current sentence, selecting a beat rhythm from the initial probability matrix as the sentence rhythm of the current sentence, splicing the generated sentence rhythms according to time sequence to obtain the lyric rhythm corresponding to the lyric text to be processed, generating the lyric rhythm by the preset lyric rhythm generation model based on Markov model training, generating the lyric rhythm, and generating the compatible lyric rhythms for music rhythms of different styles to improve expansibility of the lyric rhythm.
Referring to fig. 3, fig. 3 is a schematic flow chart of a second embodiment of the lyric rhythm generating method according to the present invention, and based on the first embodiment shown in fig. 2, the second embodiment of the lyric rhythm generating method according to the present invention is proposed.
In a second embodiment, before the step S60, the method further includes:
Step S501: the lyric rhythm generating device acquires a starting word number of the sentence rhythm.
It should be understood that if the matrix Wnum corresponding to the first word number of the current sentence belongs to the beat matrix W of the preset lyric tempo generation model, then Wnum is directly selected as an initial probability matrix, otherwise, a matrix with the smallest word number difference with the first word number of the current sentence is selected from the beat matrices W of the preset lyric tempo generation model as the initial probability matrix. When the selected initial probability matrix is the matrix with the smallest word number difference with the first word number, the word number of the beat rhythm selected from the initial probability matrix may be smaller than the first word number of the current sentence, and the rest words in the current sentence do not select the corresponding beat rhythm.
Step S502: and calculating the residual word number of the current sentence according to the first word number and the initial word number.
It is understood that, generally, in order to select an appropriate beat rhythm, when the matrix Wnum corresponding to the first word number of the current sentence does not belong to the beat matrix W of the preset lyric rhythm generation model, a matrix having the smallest difference from the word number of the first word number of the current sentence and having a word number smaller than the first word number is selected from the beat matrices W of the preset lyric rhythm generation model as the initial probability matrix. The beat rhythm selected from the initial probability matrix can only correspond to a part of the characters of the current sentence, and the rest of the characters also need to select a proper beat rhythm from the conversion matrix. Subtracting the initial word number from the first word number to obtain the remaining word number of the current sentence.
Step S503: and judging whether the residual word number is zero.
It should be noted that, whether the number of the remaining words is zero is determined, and if the number of the remaining words is zero, it is indicated that all the words in the current sentence have corresponding beat rhythms. And if the number of the remaining words is not zero, indicating that part of words in the current sentence have no corresponding beat rhythm.
Step S504: and if the number of the remaining words is zero, judging whether the current sentence is the last sentence traversed.
In a specific implementation, if the number of remaining words is zero, which indicates that all words in the current sentence have corresponding beat rhythms, it may be further determined whether the current sentence is the last sentence traversed. If the extracted sentences are ranked according to the sequence appearing in the initial lyric text, and then the ranked sentences are traversed according to the sequence, only whether the traversed current sentence has a next sentence in a ranked sentence list or not is judged, if the traversed current sentence does not have the next sentence, the current sentence is judged to be the last traversed sentence, and otherwise, the current sentence is not the last traversed sentence.
After the step S504, the method further includes: if the current sentence is the last sentence traversed, the step S60 is performed.
It should be understood that if the current sentence is the last sentence traversed, the step of splicing the generated sentence tempos in time sequence to obtain the lyric tempo corresponding to the lyric text to be processed is performed. If the current sentence is the last sentence traversed, the text of all sentences in the lyric text to be processed is stated to be provided with corresponding beats, and if all sentences in the lyric text to be processed are selected to be completed, the sentence rhythms of all sentences in the lyric text to be processed can be spliced according to a time sequence, so that the lyric rhythms corresponding to the lyric text to be processed are obtained.
In this embodiment, after the step S503, the method further includes:
step S506: and when the number of the remaining words is not zero, the lyric rhythm generating device selects a subsequent rhythm matrix from a transfer matrix set of the preset lyric rhythm generating model according to the number of the remaining words.
It can be understood that training the markov model according to the music samples in the song sample set to obtain a preset lyric rhythm generation model. In the training phase, the transfer condition between two adjacent beats of the music is counted in each sentence, and the transfer condition is recorded in a specific transfer matrix Hnum and added to a transfer matrix set H, wherein num represents the length of the remaining lyrics of the current sentence before the change of the rhythm.
In a specific implementation, if the number of remaining words is not zero, it is indicated that a beat rhythm corresponding to a part of words does not exist in the current sentence, and a proper matrix is selected from the transfer matrix H of the preset lyric rhythm generation model according to the number of remaining words to serve as a transfer matrix for generating a subsequent rhythm. If the matrix Hnum corresponding to the residual word number belongs to the transfer matrix H of the preset lyric rhythm generation model, directly selecting Hnum as the transfer matrix, otherwise, selecting a transfer matrix with the minimum word number difference value with the residual word number from a plurality of transfer matrices H of the preset lyric rhythm generation model as the subsequent rhythm matrix.
Step S507: and selecting a beat rhythm from the follow-up rhythm matrix as the next rhythm of the current sentence, and acquiring a second word number of the next rhythm.
It should be noted that, according to the number of remaining words in the current sentence, a beat rhythm is selected from the subsequent rhythm matrix as the next rhythm of the current sentence, specifically, according to the probabilities of each item in the subsequent rhythm matrix, a beat rhythm is randomly selected to be used as the next rhythm, and a beat rhythm with the highest probability may also be selected according to the probabilities of each item to be used as the starting rhythm.
Step S508: and calculating the new remaining word number of the current sentence according to the remaining word number and the second word number, and returning to the step S503.
In a specific implementation, the next tempo is selected, and the remaining word number num=num-c is updated, where c is the number of notes of the selected next tempo, i.e. the second word number. When the new number num of the remaining words is not equal to zero, it is indicated that the corresponding beats are not set for the words in the current sentence, and the corresponding beats need to be selected for the remaining words.
Further, the step S503 is returned to, i.e., it is determined whether the new remaining word number is zero.
It should be understood that whether the new number of remaining words is zero is determined, and if the new number of remaining words is zero, it is indicated that all words in the current sentence have a corresponding beat rhythm. And if the new residual word number is not zero, indicating that part of words in the current sentence have no corresponding beat rhythm.
Further, if the new number of remaining words is zero, the step of determining whether the current sentence is the last sentence traversed is performed.
It can be understood that if the new number of remaining words is zero, which indicates that all words in the current sentence have corresponding beat rhythms, it can be further determined whether the current sentence is the last sentence traversed. If the extracted sentences are ranked according to the sequence appearing in the initial lyric text, and then the ranked sentences are traversed according to the sequence, only whether the traversed current sentence has a next sentence in a ranked sentence list or not is judged, if the traversed current sentence does not have the next sentence, the current sentence is judged to be the last traversed sentence, and otherwise, the current sentence is not the last traversed sentence. When the new number of remaining words is zero, it is indicated that the words in the current sentence are all provided with corresponding beats, and if all sentences in the lyric text to be processed are selected to be beat-selected, the generated beats can be spliced according to time sequence, so that the lyric beat corresponding to the lyric text to be processed can be generated.
Further, if the new remaining word number is not zero, a step of selecting a subsequent tempo matrix from the transfer matrix set of the preset lyric tempo generation model according to the remaining word number is returned.
It should be noted that, if the new remaining word number is not zero, a step of selecting a subsequent rhythm matrix from the transfer matrix set of the preset lyric rhythm generation model according to the remaining word number is returned until the lyric text in the current sentence selects an appropriate beat rhythm from the preset lyric rhythm generation model until the remaining word number is zero, and then the characters in the current sentence select the corresponding beat rhythm, that is, the sentence rhythm and one or more subsequent next beats are spliced to form the complete sentence rhythm of the current sentence.
In this embodiment, if the number of remaining words is not zero, a subsequent rhythm matrix is selected from the transfer matrix of the preset lyric rhythm generation model according to the number of remaining words, one beat rhythm is selected from the subsequent rhythm matrix as the next rhythm of the current sentence, and the above steps are repeated until the number of remaining words is zero, so that the corresponding beat rhythms are selected for the characters in the current sentence, and therefore, all lyrics of all sentences in the lyric text to be processed can be selected to have a proper beat rhythm, and a reasonable beat rhythm is adaptively generated according to the lyrics, so that strict standard lyric input is not required, and the lyric text processing method has better adaptability.
Referring to fig. 4, fig. 4 is a schematic flow chart of a third embodiment of the lyric rhythm generating method according to the present invention, and based on the second embodiment shown in fig. 3, the third embodiment of the lyric rhythm generating method according to the present invention is proposed.
In a third embodiment, before the step S10, the method further includes:
Step S01: the lyric rhythm generating device establishes a basic Markov model and acquires a song sample set.
It will be appreciated that a song tempo sequence may be regarded as a sequence having markov properties, that a tempo change at a nearby moment is regarded as a markov process, that a basic markov model is built on this basis, and that a music tempo may be generated by means of the trained markov model by training said basic markov model.
It can be understood that the song sample set t= { T1, T2, … Ti …, TN } of the model constructed by randomly selecting N song samples from the music sample library, ti represents any music sample in the song sample set, i is an integer greater than or equal to 1, and the beat number of the music sample is denoted as a/B, where a represents the number of beats per bar and B represents the time length of one beat.
Step S02: training the Markov model according to the music samples in the song sample set to obtain a preset lyric rhythm generation model.
It should be noted that, in the training stage, the types and the numbers of the rhythm types appearing in the first beat in each sentence of the music sample are counted and recorded into a specific matrix Wnum, where num represents the length of the remaining lyrics of the current sentence, and the matrix Wnum is added to the beat matrix set W. And counting the transfer condition between every two adjacent beats of the playing in each sentence, recording the transfer condition into a specific transfer matrix Hnum and adding the transfer matrix Hnum into a transfer matrix set H, wherein num represents the length of the remaining lyrics of the current sentence before the change of the rhythm. The training of the Markov model is done by doing the same for all music samples, and then dividing the elements of each row in each matrix by the sum of the elements of that row. Training the Markov model according to the music samples in the song sample set through the training process, so as to obtain a preset lyric rhythm generation model.
In this embodiment, the step S02 includes:
the lyric rhythm generating device extracts rhythm sequences corresponding to the music samples from the music samples in the song sample set;
counting non-repeated rhythm sequences in rhythm sequences corresponding to the music samples;
Recording the non-repeated rhythm sequence into a non-repeated rhythm set;
counting the type and the number of rhythms of the first beat in each sentence in each music sample, and recording the type and the number of the rhythms of the first beat to a beat matrix;
Counting the transfer condition between two adjacent beats of the music sample in each sentence, and recording the transfer condition between the two adjacent beats of the music sample into a transfer matrix;
training a Markov model through the non-repeated rhythm set, the beat matrix and the transfer matrix to obtain a preset lyric rhythm generation model.
In a specific implementation, pitch information is removed from the music samples in the song sample set to obtain a rhythm sequence corresponding to each music sample, and the rhythm sequence after pitch information is removed is Ri= { Ri,1; ri,2; … ri, j; …; ri, n, where ri, j represents a rhythm sequence in the j-th beat of the sample, n=m×a, m represents the number of bars of the sample, and i is an integer greater than or equal to 1, so that the rhythm sequence can be extracted. After a music sample is obtained, firstly dividing a rhythm sequence according to the sentence number in lyric information, and recording the divided rhythm sequence Ri= { Ri 1; ri,2; …; ri, a }, where a is the number of sentences in the music sample, ri, k is the cadence sequence covered by each sentence, and if the number of hops covered by each sentence is nk, then there areRi1={ri,l|1≤l≤n1},/>Training a model by adopting the following mode for the rhythm sequence in each sentence in a song sample, firstly counting the non-repeated rhythm sequences in all beats in the sample, and recording the non-repeated rhythm sequences in a specific set U; then, counting the types and the number of rhythm types appearing in the first beat in each sentence, recording the types and the number of rhythm types into a specific matrix Wnum and adding the types and the number of rhythm types into a set W, wherein num represents the length of the remaining lyrics of the current sentence; in addition, the transfer situation between two adjacent beats of the rhythm in each sentence is counted, recorded in a specific transfer matrix Hnum and added to the set H, wherein num represents the length of the remaining lyrics of the current sentence before the rhythm change. The training of the model can be completed by performing the same processing on all the music samples, and then dividing the element of each row in each matrix by the sum of the elements of the row to probability the element. Training the Markov model according to the music samples in the song sample set through the training process, so as to obtain a lyric rhythm generation model.
In this embodiment, the step S30 includes:
The lyric rhythm generating device acquires a third word number corresponding to each beat matrix in a beat matrix set of the preset lyric rhythm generating model;
Judging whether beat matrixes corresponding to the first word number of the current sentence exist in each beat matrix according to the third word number;
And if the beat matrix corresponding to the first word number of the current sentence exists in each beat matrix, selecting the beat matrix corresponding to the first word number as an initial probability matrix.
It should be appreciated that an appropriate matrix may be selected from the beat matrix W of the preset lyric tempo generation model as its initial probability matrix for generating a tempo according to the first word number of the current sentence. And obtaining a third word number corresponding to each beat matrix in the beat matrix set of the preset lyric rhythm generation model, comparing each third word number with the first word number, and if the third word number is consistent with the first word number, namely, a matrix Wnum corresponding to the first word number of the current sentence belongs to the beat matrix W of the preset lyric rhythm generation model, directly selecting Wnum as an initial probability matrix.
In this embodiment, after determining, according to the third word count, whether a beat matrix corresponding to the first word count of the current sentence exists in each of the beat matrices, the method further includes:
the lyric rhythm generating device calculates word number differences between the first word number and the third word numbers respectively when the beat matrix corresponding to the first word number of the current sentence does not exist in the beat matrices;
and selecting a beat matrix corresponding to the minimum value in the word number difference value as an initial probability matrix.
It may be understood that if there is no third word number consistent with the first word number, that is, the matrix Wnum corresponding to the first word number of the current sentence does not belong to the beat matrix W of the preset lyric tempo generation model, a beat matrix with the smallest word number difference with the first word number of the current sentence is selected from the beat matrix set W of the preset lyric tempo generation model as the initial probability matrix.
In this embodiment, a basic markov model is established, a song sample set is obtained, the markov model is trained according to music samples in the song sample set, a preset lyric rhythm generation model is obtained, the lyric rhythm prediction is performed on the lyric text to be processed through the preset lyric rhythm generation model obtained through training, and the generated lyric rhythm can be well suitable for music rhythm expansion of different styles and has good expansibility.
In addition, the embodiment of the invention also provides a storage medium, wherein a lyric rhythm generating program is stored on the storage medium, and the lyric rhythm generating program realizes the steps of the lyric rhythm generating method when being executed by a processor.
In addition, referring to fig. 5, an embodiment of the present invention further provides a lyric tempo generation device, where the lyric tempo generation device includes:
an obtaining module 10, configured to obtain a plurality of lyric texts to be processed.
It should be noted that, in order to improve the lyric rhythm generation efficiency, a plurality of lyric texts to be processed may be obtained at the same time, so as to perform multithread processing on the plurality of lyric texts to be processed, so as to implement batch processing and improve the processing efficiency.
The multithreading module 20 is configured to perform multithreading on a plurality of lyric texts to be processed, extract a plurality of sentences from the lyric texts to be processed, and perform word count statistics on the extracted sentences, respectively.
It should be appreciated that the multithreaded processor may concurrently process a plurality of lyric texts to be processed, thereby improving processing efficiency. The lyric text to be processed is a given lyric text U= { U1, U2, … Ui...us }, i is an integer greater than or equal to 1, s is the number of sentences in the lyric text, and the number of words of each sentence is counted to obtain the number of words of each sentence. Extracting a plurality of sentences from the lyric text to be processed generally requires extracting all sentences in the lyric text to be processed, and counting the number of words of all sentences to obtain the number of sentence words corresponding to all sentences in the lyric text to be processed.
The traversing module 30 is configured to store the extracted sentence in a data buffer, traverse the sentence in the data buffer according to a first-in first-out rule, and take the traversed sentence as a current sentence.
It can be understood that, in order to implement corresponding processing on each sentence to generate a lyric rhythm corresponding to each sentence in the lyric text to be processed, the extracted sentences need to be traversed, and for each sentence Ui in the lyric text to be processed, traversing is performed according to the sequence of occurrence of each sentence in the initial lyric text. The extracted sentences can be stored in the data buffer firstly, and when the sentences need to be further processed, the sentences in the data buffer are traversed through a first-in first-out rule; the extracted sentences can be ranked according to the sequence of the sentences in the initial lyric text, and the ranked sentences are traversed according to the sequence; and taking the traversed sentence as the current sentence.
A selection module 40, configured to select an initial probability matrix from a set of beat matrices of a preset lyric tempo generation model according to the first word number of the current sentence, where the preset lyric tempo generation model is obtained by training a markov model.
It should be noted that the preset lyric rhythm generation model is a trained markov model. Establishing a basic Markov model, acquiring a song sample set, and training the Markov model according to music samples in the song sample set to acquire a preset lyric rhythm generation model. In the training phase, the types and the number of rhythm types occurring in the first beat in each sentence of the music sample are counted and recorded into a specific matrix Wnum, wherein num represents the length of the remaining lyrics of the current sentence, and the matrix Wnum is added to the beat matrix set W. A suitable matrix may be selected from the beat matrix W of the preset lyric tempo generation model according to the first word number of the current sentence as an initial probability matrix of its generated tempo. If the matrix Wnum corresponding to the first word number of the current sentence belongs to the beat matrix W of the preset lyric rhythm generation model, directly selecting Wnum as an initial probability matrix, otherwise, selecting a matrix with the smallest difference value with the first word number of the current sentence from the beat matrices W of the preset lyric rhythm generation model as an initial probability matrix.
The selecting module 40 is further configured to select a beat rhythm from the initial probability matrix as a sentence rhythm of the current sentence.
It should be understood that, after the initial probability matrix is selected, a beat rhythm is randomly selected from the probabilities of each item in the initial probability matrix as the starting rhythm thereof, or the beat rhythm with the highest probability can be selected as the starting rhythm thereof according to the probabilities of each item, which is not limited. And updating the remaining number of words num=num-c, c being the number of notes of the selected sentence rhythm. And judging whether the number of the remaining words is zero, if the number of the remaining words is not zero, selecting a subsequent rhythm matrix from a transfer matrix of the lyric rhythm generation model according to the number of the remaining words, selecting a beat rhythm from the subsequent rhythm matrix as the next rhythm of the current sentence, returning to the step of judging whether the number of the remaining words is zero until the number of the remaining words is zero, and selecting the corresponding beat rhythm from the characters in the current sentence, namely splicing the sentence rhythm and the subsequent next rhythm to form the complete sentence rhythm of the current sentence.
And the splicing module 50 is used for splicing the generated sentence rhythms according to time sequence to obtain the lyric rhythms corresponding to the lyric text to be processed, and sending the lyric rhythms to a playing device.
It should be noted that, the extracted sentences are traversed, so that the extracted sentences are all completed to select the corresponding beat rhythm from the beat matrix of the preset lyric rhythm generation model as the sentence rhythm. And if all sentences in the lyric text to be processed are selected to be completed, the sentence rhythms of all sentences in the lyric text to be processed can be spliced according to a time sequence, so that the lyric rhythms corresponding to the lyric text to be processed are obtained. The playing device can be a device with playing function such as a player, a smart phone or a computer, and the lyric rhythm is sent to the playing device, and the lyric rhythm is played through the playing device.
In this embodiment, a multithreading processor of the lyric rhythm generating device performs multithreading on a plurality of lyric texts to be processed by acquiring the plurality of lyric texts to be processed, extracts a plurality of sentences from the lyric texts to be processed, and performs word count statistics on the extracted sentences respectively, where the lyric rhythm generating device stores the extracted sentences in a data buffer, traverses sentences in the data buffer according to a first-in first-out rule, and uses the traversed sentences as current sentences, and performs lyric rhythm generation on all sentences by traversing the extracted sentences; selecting an initial probability matrix from a beat matrix set of a preset lyric rhythm generation model according to the first word number of the current sentence, selecting a beat rhythm from the initial probability matrix as the sentence rhythm of the current sentence, splicing the generated sentence rhythms according to time sequence to obtain the lyric rhythm corresponding to the lyric text to be processed, generating the lyric rhythm by the preset lyric rhythm generation model based on Markov model training, generating the lyric rhythm, and generating the compatible lyric rhythms for music rhythms of different styles to improve expansibility of the lyric rhythm.
In an embodiment, the lyric tempo generation device further includes:
the obtaining module 10 is configured to obtain a starting word number of the sentence rhythm;
a calculation module, configured to calculate a remaining word count of the current sentence according to the first word count and the initial word count;
the judging module is used for judging whether the residual word number is zero or not;
The judging module is further configured to judge whether the current sentence is the last sentence traversed if the remaining word number is zero;
the concatenation module 50 is further configured to execute the temporal sequence concatenation of the generated sentence tempos if the current sentence is the last sentence traversed, so as to obtain a lyric tempo corresponding to the lyric text to be processed.
In an embodiment, the selecting module 40 is further configured to select, when the remaining word number is not zero, a subsequent tempo matrix from the set of transfer matrices of the preset lyric tempo generation model according to the remaining word number; selecting a beat rhythm from the follow-up rhythm matrix as the next rhythm of the current sentence, and obtaining a second word number of the next rhythm;
the calculation module is further configured to calculate a new remaining word number of the current sentence according to the remaining word number and the second word number, and return to the step of determining whether the remaining word number is zero.
In an embodiment, the lyric tempo generation device further includes:
The establishing module is used for establishing a basic Markov model and acquiring a song sample set;
and the training module is used for training the Markov model according to the music samples in the song sample set to obtain a preset lyric rhythm generation model.
In an embodiment, the training module is further configured to extract a rhythm sequence corresponding to each music sample from the music samples in the song sample set; counting non-repeated rhythm sequences in rhythm sequences corresponding to the music samples; recording the non-repeated rhythm sequence into a non-repeated rhythm set; counting the type and the number of rhythms of the first beat in each sentence in each music sample, and recording the type and the number of the rhythms of the first beat to a beat matrix; counting the transfer condition between two adjacent beats of the music sample in each sentence, and recording the transfer condition between the two adjacent beats of the music sample into a transfer matrix; training a Markov model through the non-repeated rhythm set, the beat matrix and the transfer matrix to obtain a preset lyric rhythm generation model.
In an embodiment, the selecting module 40 is further configured to obtain a third word number corresponding to each beat matrix in the beat matrix set of the preset lyric rhythm generating model; judging whether beat matrixes corresponding to the first word number of the current sentence exist in each beat matrix according to the third word number; and if the beat matrix corresponding to the first word number of the current sentence exists in each beat matrix, selecting the beat matrix corresponding to the first word number as an initial probability matrix.
In an embodiment, the selecting module 40 is further configured to calculate, when there is no beat matrix corresponding to the first word number of the current sentence in each of the beat matrices, a word number difference between the first word number and each of the third word numbers; and selecting a beat matrix corresponding to the minimum value in the word number difference value as an initial probability matrix.
Other embodiments or specific implementation manners of the lyric rhythm generating device of the present invention may refer to the above method embodiments, and are not described herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the terms first, second, third, etc. do not denote any order, but rather the terms first, second, third, etc. are used to interpret the terms as labels.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. read only memory mirror (Read Only Memory image, ROM)/random access memory (Random Access Memory, RAM), magnetic disk, optical disk), comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to each of the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (6)

1. A lyric rhythm generation method, characterized in that the lyric rhythm generation method comprises the following steps:
the lyric rhythm generating device acquires a plurality of lyric texts to be processed;
The multi-thread processor of the lyric rhythm generating device carries out multi-thread processing on a plurality of lyric texts to be processed, extracts a plurality of sentences from the lyric texts to be processed, and carries out word count statistics on the extracted sentences respectively;
The lyric rhythm generating device stores the extracted sentences into a data buffer, traverses the sentences in the data buffer according to a first-in first-out rule, and takes the traversed sentences as current sentences;
the lyric rhythm generating device selects an initial probability matrix from a beat matrix set of a preset lyric rhythm generating model according to the first word number of the current sentence, and the preset lyric rhythm generating model is obtained by training a Markov model;
the lyric rhythm generating device selects a beat rhythm from the initial probability matrix as the sentence rhythm of the current sentence;
The lyric rhythm generating device splices the generated sentence rhythms according to time sequence to obtain a lyric rhythm corresponding to the lyric text to be processed, and sends the lyric rhythm to the playing device;
Before the obtaining of the plurality of lyrics to be processed, the lyrics rhythm generating method further includes:
the lyric rhythm generating device establishes a basic Markov model and acquires a song sample set;
Training the Markov model according to the music samples in the song sample set to obtain a preset lyric rhythm generation model;
The training the markov model according to the music samples in the song sample set to obtain a preset lyric rhythm generating model comprises the following steps:
the lyric rhythm generating device extracts rhythm sequences corresponding to the music samples from the music samples in the song sample set;
counting non-repeated rhythm sequences in rhythm sequences corresponding to the music samples;
Recording the non-repeated rhythm sequence into a non-repeated rhythm set;
counting the type and the number of rhythms of the first beat in each sentence in each music sample, and recording the type and the number of the rhythms of the first beat to a beat matrix;
Counting the transfer condition between two adjacent beats of the music sample in each sentence, and recording the transfer condition between the two adjacent beats of the music sample into a transfer matrix;
Training a Markov model through the non-repeated rhythm set, the beat matrix and the transfer matrix to obtain a preset lyric rhythm generation model;
Wherein the selecting an initial probability matrix from a beat matrix set of a preset lyric rhythm generation model according to the first word number of the current sentence includes:
The lyric rhythm generating device acquires a third word number corresponding to each beat matrix in a beat matrix set of the preset lyric rhythm generating model;
Judging whether beat matrixes corresponding to the first word number of the current sentence exist in each beat matrix according to the third word number;
if the beat matrixes corresponding to the first word number of the current sentence exist in the beat matrixes, selecting the beat matrix corresponding to the first word number as an initial probability matrix;
After determining whether a beat matrix corresponding to the first word number of the current sentence exists in each beat matrix according to the third word number, the lyric rhythm generating method further includes:
the lyric rhythm generating device calculates word number differences between the first word number and the third word numbers respectively when the beat matrix corresponding to the first word number of the current sentence does not exist in the beat matrices;
and selecting a beat matrix corresponding to the minimum value in the word number difference value as an initial probability matrix.
2. The lyric tempo generation method of claim 1 wherein before the generating each of the sentence tempos is spliced in time order to obtain a lyric tempo corresponding to the lyric text to be processed, the lyric tempo generation method further comprises:
the lyric rhythm generating device acquires the initial word number of the sentence rhythm;
calculating the remaining word number of the current sentence according to the first word number and the initial word number;
Judging whether the residual word number is zero or not;
If the number of the remaining words is zero, judging whether the current sentence is the last sentence traversed;
And if the current sentence is the last sentence traversed, executing the time sequence splicing of the generated sentence rhythms to obtain the lyric rhythms corresponding to the lyric text to be processed.
3. The lyric tempo generation method of claim 2 wherein after said determining whether the number of words remaining is zero, the lyric tempo generation method further comprises:
The lyric rhythm generating device selects a subsequent rhythm matrix from a transfer matrix set of the preset lyric rhythm generating model according to the residual word number when the residual word number is not zero;
selecting a beat rhythm from the follow-up rhythm matrix as the next rhythm of the current sentence, and obtaining a second word number of the next rhythm;
And calculating the new residual word number of the current sentence according to the residual word number and the second word number, and returning to the step of judging whether the residual word number is zero.
4. A lyric tempo generation device characterized by comprising: a memory, a processor and a lyric tempo generation program stored on said memory and executable on said processor, said lyric tempo generation program when executed by said processor implementing the steps of the lyric tempo generation method of any of claims 1 to 3.
5. A storage medium having stored thereon a lyric tempo generation program which when executed by a processor performs the steps of the lyric tempo generation method of any of claims 1-3.
6. A lyric tempo generation device, characterized by comprising:
the obtaining module is used for obtaining a plurality of lyric texts to be processed;
The multi-thread processing module is used for carrying out multi-thread processing on a plurality of lyric texts to be processed, extracting a plurality of sentences from the lyric texts to be processed, and respectively carrying out word count statistics on the extracted sentences;
The traversing module is used for storing the extracted sentences into the data buffer, traversing the sentences in the data buffer according to a first-in first-out rule, and taking the traversed sentences as current sentences;
The selection module is used for selecting an initial probability matrix from a beat matrix set of a preset lyric rhythm generation model according to the first word number of the current sentence, and the preset lyric rhythm generation model is obtained by training a Markov model;
the selecting module is further configured to select, by the lyric tempo generating device, a beat tempo from the initial probability matrix as a sentence tempo of the current sentence;
The splicing module is used for splicing the generated sentence rhythms according to time sequence to obtain the lyric rhythms corresponding to the lyric text to be processed, and sending the lyric rhythms to a target terminal;
The establishing module is used for establishing a basic Markov model and acquiring a song sample set;
the training module is used for training the Markov model according to the music samples in the song sample set to obtain a preset lyric rhythm generation model;
The training module is further used for extracting rhythm sequences corresponding to the music samples from the music samples in the song sample set; counting non-repeated rhythm sequences in rhythm sequences corresponding to the music samples; recording the non-repeated rhythm sequence into a non-repeated rhythm set; counting the type and the number of rhythms of the first beat in each sentence in each music sample, and recording the type and the number of the rhythms of the first beat to a beat matrix; counting the transfer condition between two adjacent beats of the music sample in each sentence, and recording the transfer condition between the two adjacent beats of the music sample into a transfer matrix; training a Markov model through the non-repeated rhythm set, the beat matrix and the transfer matrix to obtain a preset lyric rhythm generation model;
The selection module is further configured to obtain a third word number corresponding to each beat matrix in the beat matrix set of the preset lyric rhythm generation model; judging whether beat matrixes corresponding to the first word number of the current sentence exist in each beat matrix according to the third word number; if the beat matrixes corresponding to the first word number of the current sentence exist in the beat matrixes, selecting the beat matrix corresponding to the first word number as an initial probability matrix;
The selecting module is further configured to calculate a word number difference value between the first word number and each of the third word numbers when a beat matrix corresponding to the first word number of the current sentence does not exist in each of the beat matrices; and selecting a beat matrix corresponding to the minimum value in the word number difference value as an initial probability matrix.
CN201910728238.9A 2019-08-02 2019-08-02 Lyric rhythm generation method, device, storage medium and apparatus Active CN110517656B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910728238.9A CN110517656B (en) 2019-08-02 2019-08-02 Lyric rhythm generation method, device, storage medium and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910728238.9A CN110517656B (en) 2019-08-02 2019-08-02 Lyric rhythm generation method, device, storage medium and apparatus

Publications (2)

Publication Number Publication Date
CN110517656A CN110517656A (en) 2019-11-29
CN110517656B true CN110517656B (en) 2024-04-26

Family

ID=68625335

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910728238.9A Active CN110517656B (en) 2019-08-02 2019-08-02 Lyric rhythm generation method, device, storage medium and apparatus

Country Status (1)

Country Link
CN (1) CN110517656B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112908288B (en) * 2021-01-25 2023-11-21 北京达佳互联信息技术有限公司 Beat detection method, beat detection device, electronic equipment and storage medium
CN113920968A (en) * 2021-10-09 2022-01-11 北京灵动音科技有限公司 Information processing method, information processing device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105513607A (en) * 2015-11-25 2016-04-20 网易传媒科技(北京)有限公司 Method and apparatus for music composition and lyric writing
CN109166564A (en) * 2018-07-19 2019-01-08 平安科技(深圳)有限公司 For the method, apparatus and computer readable storage medium of lyrics text generation melody
CN109841202A (en) * 2019-01-04 2019-06-04 平安科技(深圳)有限公司 Rhythm generation method, device and terminal device based on speech synthesis

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180322854A1 (en) * 2017-05-08 2018-11-08 WaveAI Inc. Automated Melody Generation for Songwriting

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105513607A (en) * 2015-11-25 2016-04-20 网易传媒科技(北京)有限公司 Method and apparatus for music composition and lyric writing
CN109166564A (en) * 2018-07-19 2019-01-08 平安科技(深圳)有限公司 For the method, apparatus and computer readable storage medium of lyrics text generation melody
CN109841202A (en) * 2019-01-04 2019-06-04 平安科技(深圳)有限公司 Rhythm generation method, device and terminal device based on speech synthesis

Also Published As

Publication number Publication date
CN110517656A (en) 2019-11-29

Similar Documents

Publication Publication Date Title
US11461388B2 (en) Generating a playlist
US7769763B1 (en) Large scale machine learning systems and methods
JP6019858B2 (en) Music analysis apparatus and music analysis method
CN110517656B (en) Lyric rhythm generation method, device, storage medium and apparatus
EP1970895A1 (en) Speech synthesis apparatus and method
JP5477635B2 (en) Information processing apparatus and method, and program
CN101452696A (en) Signal processing device, signal processing method and program
JP2015230570A (en) Learning model creation device, determination system and learning model creation method
JP5638503B2 (en) Text summarization apparatus, method and program
CN113010730B (en) Music file generation method, device, equipment and storage medium
JP6301647B2 (en) SEARCH DEVICE, SEARCH METHOD, AND PROGRAM
CN110516103B (en) Song rhythm generation method, device, storage medium and apparatus based on classifier
JP2017090848A (en) Music analysis device and music analysis method
CN109785868A (en) Music file conversion and playback method, device, computer equipment and storage medium
JP5623369B2 (en) Text summarization apparatus, method and program
CN110708619B (en) Word vector training method and device for intelligent equipment
CN112580669A (en) Training method and device for voice information
CN110959172B (en) Performance analysis method, performance analysis device, and storage medium
CN107688661B (en) Lyric similarity calculation method, terminal device and computer-readable storage medium
US20220005443A1 (en) Musical analysis method and music analysis device
KR20080026899A (en) Method for recommending words associated with an object of search and system for executing the method
CN111198965B (en) Song retrieval method, song retrieval device, server and storage medium
CN111967518B (en) Application labeling method, application labeling device and terminal equipment
WO2019171538A1 (en) Meaning inference system, method, and program
US20240013760A1 (en) Text providing method and text providing device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant