CN110517656A - Lyrics rhythm generation method, equipment, storage medium and device - Google Patents

Lyrics rhythm generation method, equipment, storage medium and device Download PDF

Info

Publication number
CN110517656A
CN110517656A CN201910728238.9A CN201910728238A CN110517656A CN 110517656 A CN110517656 A CN 110517656A CN 201910728238 A CN201910728238 A CN 201910728238A CN 110517656 A CN110517656 A CN 110517656A
Authority
CN
China
Prior art keywords
rhythm
lyrics
sentence
words
matrix
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.)
Granted
Application number
CN201910728238.9A
Other languages
Chinese (zh)
Other versions
CN110517656B (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

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Electrophonic Musical Instruments (AREA)

Abstract

The invention discloses a kind of lyrics rhythm generation method, equipment, storage medium and devices, this method is by obtaining multiple lyrics texts to be processed, multiple threads are carried out to multiple lyrics texts to be processed, multiple sentences are extracted from lyrics text to be processed, and word counting is carried out respectively to the sentence of extraction, the sentence of extraction is stored to data buffer, the sentence in data buffer is traversed according to first-in first-out rule, using the sentence traversed as current sentence;Probability matrix is selected from the beat set of matrices that default lyrics rhythm generates model according to the first number of words of current sentence;Select a bar and rhythm as the sentence rhythm of current sentence from probability matrix;Each sentence rhythm of generation is spliced in chronological order, obtains the corresponding lyrics rhythm of lyrics text to be processed, model is generated by the default lyrics rhythm obtained based on Markov model training, lyrics rhythm is generated, improves the scalability of lyrics rhythm.

Description

Lyrics rhythm generation method, equipment, storage medium and device
Technical field
The present invention relates to the technical field of artificial intelligence more particularly to a kind of lyrics rhythm generation method, equipment, storage Jie Matter and device.
Background technique
Currently, the emphasis that existing automatic composition technology is assaulted fortified position essentially consists in the generation of melody, for rhythm often It pays little attention to, and rhythm also plays huge effect in the presentation of music, therefore is also certainly for automatically generating for rhythm Act an important research direction in bent field.It not only needs during carrying out automatic song creation in view of melody Whether variation can be expressed by singer, while be also required in view of whether the distribution of song rhythm can be reasonable with the lyrics Combination, in this context, the lyrics rhythm generation method sought becomes automatic composition field and is especially automatic song wound The necessity of work.Currently, the generation of the lyrics, the lyrics input for needing to strictly regulate, for different-style music rhythm not The adaptable lyrics can be generated well, and lyrics rhythm is not applied for the music rhythm of different-style, poor expandability.
Above content is only used to facilitate the understanding of the technical scheme, and is not represented and is recognized that above content is existing skill Art.
Summary of the invention
The main purpose of the present invention is to provide a kind of lyrics rhythm generation method, equipment, storage medium and devices, it is intended to Solve in the prior art lyrics rhythm for the music rhythm of different-style bad adaptability and poor expandability the technical issues of.
To achieve the above object, the present invention provides a kind of lyrics rhythm generation method, the lyrics rhythm generation method packet Include following steps:
Lyrics rhythm generating device obtains multiple lyrics texts to be processed;
The multiline procedure processor of the lyrics rhythm generating device carries out multiple threads to multiple lyrics texts to be processed, Multiple sentences are extracted from the lyrics text to be processed, and word counting is carried out respectively to the sentence of extraction;
The lyrics rhythm generating device stores the sentence of extraction to data buffer, according to first-in first-out rule to institute The sentence stated in data buffer is traversed, using the sentence traversed as current sentence;
The lyrics rhythm generating device generates model from default lyrics rhythm according to the first number of words of the current sentence Beat set of matrices in select probability matrix, the default lyrics rhythm generates model by instructing to Markov model Practice and obtains;
The lyrics rhythm generating device selects a bar and rhythm as described current from the probability matrix The sentence rhythm of sentence;
The lyrics rhythm generating device splices each sentence rhythm of generation in chronological order, obtains described wait locate The corresponding lyrics rhythm of lyrics text is managed, and the lyrics rhythm is sent to playback equipment.
Preferably, described to splice each sentence rhythm of generation in chronological order, obtain the lyrics text to be processed Before this corresponding lyrics rhythm, the lyrics rhythm generation method further include:
The lyrics rhythm generating device obtains the starting number of words of the sentence rhythm;
The remaining number of words of the current sentence is calculated according to first number of words and the starting number of words;
Judge whether the remaining number of words is zero;
If the residue number of words is zero, judge whether the current sentence is the last one sentence traversed;
If the current sentence is the last one sentence traversed, each sentence rhythm by generation is executed Splice in chronological order, obtains the corresponding lyrics rhythm of the lyrics text to be processed.
Preferably, it is described judge whether the remaining number of words is zero after, the lyrics rhythm generation method further include:
The lyrics rhythm generating device is preset when the remaining number of words is not zero, according to the remaining number of words from described Subsequent rhythm matrix is selected in the transfer matrix set of lyrics rhythm generation model;
It selects a bar and rhythm as next rhythm of the current sentence from the subsequent rhythm matrix, obtains Second number of words of next rhythm;
The new remaining number of words of the current sentence is calculated according to the remaining number of words and second number of words, and described in return The step of whether remaining number of words is zero judged.
Preferably, before the multiple lyrics texts to be processed of acquisition, the lyrics rhythm generation method further include:
The lyrics rhythm generating device establishes the Markov model on basis, and obtains song sample set;
The Markov model is trained according to the music samples in the song sample set, obtains default song Word rhythm generates model.
Preferably, the music samples according in the song sample set instruct the Markov model Practice, obtain default lyrics rhythm and generate model, comprising:
The lyrics rhythm generating device extracts each music sample from the music samples in the song sample set This corresponding rhythm sequences;
Count unduplicated rhythm sequences in the corresponding rhythm sequences of each music samples;
By the unduplicated rhythm sequences record to not repeat rhythm set in;
The rhythm type and quantity that first count occurs in each sentence in each music samples are counted, by the first count The rhythm type and quantity of appearance are recorded to beat matrix;
Count in each music samples adjacent two breath-group in each sentence play between transfer case, by described adjacent two Breath-group play between transfer case record into transfer matrix;
Markov model is instructed by rhythm set, the beat matrix and the transfer matrix of not repeating Practice, obtains default lyrics rhythm and generate model.
Preferably, first number of words according to the current sentence generates the beat matrix of model from default lyrics rhythm Probability matrix is selected in set, comprising:
The lyrics rhythm generating device obtains the default lyrics rhythm and generates respectively to be saved in the beat set of matrices of model Clap the corresponding third number of words of matrix;
Judged in each beat matrix according to the third number of words with the presence or absence of the first number of words with the current sentence Corresponding beat matrix;
If in each beat matrix exist beat matrix corresponding with the first number of words of the current sentence, selection with The corresponding beat matrix of first number of words is as probability matrix.
Preferably, described to judge to whether there is and the current sentence in each beat matrix according to the third number of words The corresponding beat matrix of the first number of words after, the lyrics rhythm generation method further include:
There is no the first numbers of words with the current sentence in each beat matrix for the lyrics rhythm generating device When corresponding beat matrix, first number of words number of words difference between each third number of words respectively is calculated;
Select in each number of words difference the corresponding beat matrix of minimum value as probability matrix.
In addition, to achieve the above object, the present invention also proposes a kind of lyrics rhythm generating device, the lyrics rhythm is generated Equipment includes that the lyrics rhythm that can run on the memory and on the processor of memory, processor and being stored in generates Program, the lyrics rhythm generate the step of program is arranged for carrying out lyrics rhythm generation method as described above.
In addition, to achieve the above object, the present invention also proposes a kind of storage medium, the lyrics are stored on the storage medium Rhythm generates program, and the lyrics rhythm generates when program is executed by processor and realizes lyrics rhythm generation side as described above The step of method.
In addition, to achieve the above object, the present invention also proposes a kind of lyrics rhythm generating means, the lyrics rhythm is generated Device includes:
Module is obtained, for obtaining multiple lyrics texts to be processed;
Multiple threads module, for carrying out multiple threads to multiple lyrics texts to be processed, from the song to be processed Multiple sentences are extracted in word text, and word counting is carried out respectively to the sentence of extraction;
Spider module, for storing the sentence of extraction to data buffer, according to first-in first-out rule to the data Sentence in buffer is traversed, using the sentence traversed as current sentence;
Selecting module generates the beat square of model for the first number of words according to the current sentence from default lyrics rhythm Probability matrix is selected in battle array set, the default lyrics rhythm generates model by obtaining to Markov model training;
The selecting module is also used to the lyrics rhythm generating device and selects a section from the probability matrix Breath-group plays the sentence rhythm as the current sentence;
Splicing module obtains the lyrics to be processed for splicing each sentence rhythm generated in chronological order The corresponding lyrics rhythm of text, and the lyrics rhythm is sent to target terminal.
In the present invention, lyrics rhythm generating device obtains multiple lyrics texts to be processed, the lyrics rhythm generating device Multiline procedure processor multiple threads are carried out to multiple lyrics texts to be processed, extracted from the lyrics text to be processed more A sentence, and word counting carried out respectively to the sentence of extraction, the lyrics rhythm generating device by the sentence of extraction store to Data buffer traverses the sentence in the data buffer according to first-in first-out rule, and the sentence traversed is made For current sentence, the sentence extracted by traversal, to realize that the lyrics rhythm to all sentences generates;According to the current sentence The first number of words probability matrix is selected from the beat set of matrices that default lyrics rhythm generates model, from described initial general Select a bar and rhythm as the sentence rhythm of the current sentence in rate matrix, on time by each sentence rhythm of generation Between sequential concatenation, the corresponding lyrics rhythm of the lyrics text to be processed is obtained, by based on Markov model training acquisition Default lyrics rhythm generate model, generate lyrics rhythm, for different-style music rhythm can generate be adapted song Word rhythm improves the scalability of lyrics rhythm.
Detailed description of the invention
Fig. 1 is the structural representation of the lyrics rhythm generating device for the hardware running environment that the embodiment of the present invention is related to Figure;
Fig. 2 is the flow diagram of lyrics rhythm generation method first embodiment of the present invention;
Fig. 3 is the flow diagram of lyrics rhythm generation method second embodiment of the present invention;
Fig. 4 is the flow diagram of lyrics rhythm generation method 3rd embodiment of the present invention;
Fig. 5 is the structural block diagram of lyrics rhythm generating means first embodiment of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
Referring to Fig.1, Fig. 1 is the lyrics rhythm generating device structure for the hardware running environment that the embodiment of the present invention is related to Schematic diagram.
As shown in Figure 1, the lyrics rhythm generating device may include: processor 1001, such as central processing unit (Central Processing Unit, CPU), communication bus 1002, user interface 1003, network interface 1004, memory 1005.Wherein, communication bus 1002 is for realizing the connection communication between these components.User interface 1003 may include display Shield (Display), optional user interface 1003 can also include standard wireline interface and wireless interface, for user interface 1003 wireline interface can be USB interface in the present invention.Network interface 1004 optionally may include standard wireline interface, Wireless interface (such as Wireless Fidelity (WIreless-FIdelity, WI-FI) interface).Memory 1005 can be the random of high speed Memory (Random Access Memory, RAM) memory is accessed, stable memory (Non-volatile is also possible to Memory, NVM), such as magnetic disk storage.Memory 1005 optionally can also be the storage independently of aforementioned processor 1001 Device.
It will be understood by those skilled in the art that structure shown in Fig. 1 does not constitute the limit to lyrics rhythm generating device It is fixed, it may include perhaps combining certain components or different component layouts than illustrating more or fewer components.
As shown in Figure 1, as may include that operating system, network are logical in a kind of memory 1005 of computer storage medium Believe that module, Subscriber Interface Module SIM and lyrics rhythm generate program.
In lyrics rhythm generating device shown in Fig. 1, network interface 1004 is mainly used for connecting background server, with institute It states background server and carries out data communication;User interface 1003 is mainly used for connecting user equipment;The lyrics rhythm generation is set It is standby to call the lyrics rhythm stored in memory 1005 to generate program by processor 1001, and offer of the embodiment of the present invention is provided Lyrics rhythm generation method.
Based on above-mentioned hardware configuration, the embodiment of lyrics rhythm generation method of the present invention is proposed.
It is the flow diagram of lyrics rhythm generation method first embodiment of the present invention referring to Fig. 2, Fig. 2, proposes the present invention Lyrics rhythm generation method first embodiment.
In the first embodiment, the lyrics rhythm generation method the following steps are included:
Step S10: lyrics rhythm generating device obtains multiple lyrics texts to be processed.
It should be noted that the executing subject of the present embodiment is the lyrics rhythm generating device, wherein the lyrics section Playing generating device can be without restriction to this for electronic equipments, the present embodiment such as PC or servers.In order to improve the lyrics Rhythm formation efficiency can obtain multiple lyrics texts to be processed simultaneously, to carry out at multithreading to multiple lyrics texts to be processed Reason improves treatment effeciency to realize batch processing.
Step S20: the multiline procedure processor of the lyrics rhythm generating device carries out multiple lyrics texts to be processed more Thread process extracts multiple sentences from the lyrics text to be processed, and carries out word counting respectively to the sentence of extraction.
It should be understood that the multiline procedure processor can carry out parallel processing to multiple lyrics texts to be processed simultaneously, from And improve treatment effeciency.The lyrics text to be processed is one section of given lyrics text U={ U1, U2 ... Ui ..., Us }, and i is Integer more than or equal to 1, s are the sentence number in the lyrics text, count to the number of words of each sentence, obtain the word of each sentence Number.Multiple sentences are extracted from the lyrics text to be processed, it usually needs to all sentences in the lyrics text to be processed It extracts, and word counting is carried out to all sentences, it is corresponding to obtain all sentences in the lyrics text to be processed Sentence number of words.
Step S30: the lyrics rhythm generating device stores the sentence of extraction to data buffer, according to first in first out Rule traverses the sentence in the data buffer, using the sentence traversed as current sentence.
It will be appreciated that respective handling is carried out to each sentence to realize, to generate in the lyrics text to be processed The corresponding lyrics rhythm of each sentence, need to traverse the sentence of extraction, each of work as sentence for lyrics text to be processed Sub- Ui is traversed according to the sequencing that each sentence occurs in the initial lyrics text.First the sentence of extraction can be deposited Storage is into the data buffer, when needing that sentence is further processed, then by first-in first-out rule to the number It is traversed according to the sentence in buffer;It can also be successive suitable according to occurring in the initial lyrics text by the sentence of extraction Sequence is ranked up, then is traversed to the sentence of sequence according to sequencing;Using the sentence traversed as the current sentence.
Step S40: the lyrics rhythm generating device is according to the first number of words of the current sentence from default lyrics rhythm It generates and selects probability matrix in the beat set of matrices of model, the default lyrics rhythm generates model and passes through to Ma Erke Husband's model training obtains.
It should be noted that it is trained Markov model that the default lyrics rhythm, which generates model,.Establish base The Markov model of plinth obtains song sample set, according to the music samples in the song sample set to the Ma Er Section's husband's model is trained, and is obtained default lyrics rhythm and is generated model.In the training stage, each sentence of the music samples is counted The type and quantity for the rhythm type that middle first count occurs, and record into specific matrix W num, wherein num indicates current The length of the sentence residue lyrics, and the matrix W num is added in beat set of matrices W.It then can be according to the current sentence The first number of words from default lyrics rhythm generate model beat matrix W in select suitable matrix as its generate rhythm just Beginning probability matrix.If the corresponding matrix W num of the first number of words of the current sentence, which belongs to the default lyrics rhythm, generates mould Otherwise the beat matrix W of type generates model from the default lyrics rhythm then directly selecting Wnum as probability matrix Beat matrix W in select with the smallest matrix of number of words difference of the first number of words of the current sentence as its probability square Battle array.
Step S50: the lyrics rhythm generating device selected from the probability matrix bar and rhythm as The sentence rhythm of the current sentence.
It should be understood that after having selected probability matrix, according to probability every in the probability matrix The rhythm that a bar and rhythm starts as it is therefrom randomly choosed, the beat of maximum probability can also be chosen according to every probability The rhythm that rhythm starts as it, it is without restriction to this.And updating remaining residue number of words the num=num-c, c is institute The note quantity of the sentence rhythm of choosing.Judge whether the remaining number of words is zero, if the residue number of words number of words is not zero, root Subsequent rhythm matrix is selected from the transfer matrix that the lyrics rhythm generates model according to the remaining number of words, from the subsequent section The next rhythm for selecting a bar and rhythm as the current sentence in matrix is played, the judgement remaining number of words is returned The step of whether being zero, until the remaining number of words is zero, then the text in the current sentence has selected corresponding beat Rhythm, i.e., the described sentence rhythm and subsequent next rhythm are spliced to form the complete sentence rhythm of the current sentence.
Step S60: the lyrics rhythm generating device splices each sentence rhythm of generation in chronological order, obtains The corresponding lyrics rhythm of the lyrics text to be processed, and the lyrics rhythm is sent to playback equipment.
It should be noted that the sentence to extraction traverses, the sentence of extraction is completed from described pre- to realize If selecting corresponding bar and rhythm as sentence rhythm in the beat matrix of lyrics rhythm generation model.Illustrate the song to be processed The text of all sentences is provided with corresponding beat in word text, if sentence all in the lyrics text to be processed is complete It, then can be by the sentence rhythm of all sentences in the lyrics text to be processed, sequentially in time at the selection of beat Spliced, to obtain the corresponding lyrics rhythm of the lyrics text to be processed.The playback equipment can be player, intelligence The equipment that energy mobile phone or computer etc. have playing function, is sent to the playback equipment for the lyrics rhythm, by described Playback equipment plays out the lyrics rhythm.
In the present embodiment, lyrics rhythm generating device obtains multiple lyrics texts to be processed, and the lyrics rhythm generation is set Standby multiline procedure processor carries out multiple threads to multiple lyrics texts to be processed, extracts from the lyrics text to be processed Multiple sentences, and word counting is carried out respectively to the sentence of extraction, the lyrics rhythm generating device stores the sentence of extraction To data buffer, the sentence in the data buffer is traversed according to first-in first-out rule, the sentence that will be traversed As current sentence, the sentence extracted by traversal, to realize that the lyrics rhythm to all sentences generates;According to the current sentence First number of words of son selects probability matrix from the beat set of matrices that default lyrics rhythm generates model, from described initial It selects a bar and rhythm as the sentence rhythm of the current sentence in probability matrix, each sentence rhythm of generation is pressed Time sequencing splicing obtains the corresponding lyrics rhythm of the lyrics text to be processed, by obtaining based on Markov model training Default lyrics rhythm generate model, generate lyrics rhythm, the music rhythm of different-style can be generated adaptable Lyrics rhythm improves the scalability of lyrics rhythm.
It is the flow diagram of lyrics rhythm generation method second embodiment of the present invention referring to Fig. 3, Fig. 3, is based on above-mentioned Fig. 2 Shown in first embodiment, propose the second embodiment of lyrics rhythm generation method of the present invention.
In a second embodiment, before the step S60, further includes:
Step S501: the lyrics rhythm generating device obtains the starting number of words of the sentence rhythm.
It should be understood that if the corresponding matrix W num of the first number of words of the current sentence belongs to the default lyrics rhythm The beat matrix W of model is generated, then directly selecting Wnum as probability matrix, otherwise from the default lyrics rhythm life At selected in the beat matrix W of model with the smallest matrix of number of words difference of the first number of words of the current sentence as it is described just Beginning probability matrix.When the probability matrix of selection is the smallest matrix of number of words difference with first number of words, then from The number of words of the bar and rhythm selected in the probability matrix is likely less than first number of words of the current sentence, then institute State the also non-selected corresponding bar and rhythm of remaining text in current sentence.
Step S502: the remaining number of words of the current sentence is calculated according to first number of words and the starting number of words.
It will be appreciated that generally for suitable bar and rhythm is selected, it is corresponding in the first number of words of the current sentence Matrix W num when being not belonging to the default lyrics rhythm and generating the beat matrix W of model, generated from the default lyrics rhythm The number of words difference minimum with the first number of words of the current sentence is selected in the beat matrix W of model, and number of words is less than described The matrix of first number of words is as the probability matrix.The bar and rhythm then selected from the probability matrix can only be right A part of text of the current sentence is answered, remaining text need to also select suitable bar and rhythm from transition matrix.By institute It states the first number of words and subtracts the starting number of words, obtain the remaining number of words of the current sentence.
Step S503: judge whether the remaining number of words is zero.
It should be noted that judging whether the remaining number of words is zero, if the residue number of words is zero, illustrate described current All texts have corresponding bar and rhythm in sentence.If the residue number of words is not zero, illustrate exist in the current sentence Segment word does not have corresponding bar and rhythm.
Step S504: if the residue number of words is zero, judge whether the current sentence is the last one traversed Sentence.
In the concrete realization, if the residue number of words is zero, illustrate there there are corresponding all texts in the current sentence Bar and rhythm then can further judge whether the current sentence is the last one sentence traversed.If by the sentence of extraction It is ranked up according to the sequencing occurred in the initial lyrics text, then the sentence of sequence is carried out according to sequencing Traversal, then need to only judge whether there is also next sentences in the sentence list of sequence for the current sentence traversed, if There is no next sentences, then determine that the current sentence is the last one sentence traversed, and otherwise the current sentence is not It is the last one sentence traversed.
After the step S504, further includes: if the current sentence is the last one sentence traversed, execute institute State step S60.
It should be understood that executing if the current sentence is the last one sentence traversed by each described of generation The step of sentence rhythm splices in chronological order, obtains the lyrics text to be processed corresponding lyrics rhythm.If described current Sentence is the last one sentence traversed, illustrates that the text of all sentences in the lyrics text to be processed is provided with accordingly Beat can be by the song to be processed if sentence all in the lyrics text to be processed completes the selection of beat The sentence rhythm of all sentences, is spliced sequentially in time in word text, to obtain the lyrics text to be processed This corresponding lyrics rhythm.
In the present embodiment, after the step S503, further includes:
Step S506: the lyrics rhythm generating device is when the remaining number of words is not zero, according to the remaining number of words Subsequent rhythm matrix is selected from the transfer matrix set that the default lyrics rhythm generates model.
It will be appreciated that being instructed according to the music samples in the song sample set to the Markov model Practice, obtains default lyrics rhythm and generate model.In the training stage, count adjacent two breath-group in each sentence play between transfer Situation is recorded in specific transfer matrix Hnum and is added to transfer matrix set H, and wherein num indicates that rhythm becomes The length of the current sentence residue lyrics before change.
In the concrete realization, if the residue number of words is not zero, illustrate that there are segment words not to have in the current sentence Corresponding bar and rhythm generates from the default lyrics rhythm according to the remaining number of words and selects to close in the transfer matrix H of model Suitable matrix generates the transfer matrix of subsequent rhythm as it.If the corresponding matrix H num of the residue number of words belongs to described default Lyrics rhythm generates the transfer matrix H of model, then directly selecting Hnum as the transfer matrix, otherwise from the default song Word rhythm generate model multiple transfer matrix H in select with it is described residue number of words the smallest transfer matrix of number of words difference as The subsequent rhythm matrix.
Step S507: select a bar and rhythm as the next of the current sentence from the subsequent rhythm matrix Rhythm obtains the second number of words of next rhythm.
It should be noted that selecting a beat section from the subsequent rhythm matrix according to the remaining number of words of current sentence Next rhythm as the current sentence is played, is specially randomly choosed according to probability every in the subsequent rhythm matrix One bar and rhythm is used as next rhythm, can also be started according to the bar and rhythm that every probability chooses maximum probability as it Rhythm.
Step S508: calculating the new remaining number of words of the current sentence according to the remaining number of words and second number of words, And return to the step S503.
In the concrete realization, next rhythm is chosen, while updating remaining number of words num=num-c, c is selected The note quantity of next rhythm, i.e., described second number of words.When new remaining number of words num is not equal to zero, illustrate the current sentence Son then needs to continue remaining text to choose corresponding beat there is also the not set corresponding beat of text.
Further, the step S503 is returned, that is, judges whether the new remaining number of words is zero.
It should be understood that judging whether the new remaining number of words is zero, if the new remaining number of words is zero, illustrate institute Stating all texts in current sentence has corresponding bar and rhythm.If the new remaining number of words is not zero, illustrate described current There are segment words not to have corresponding bar and rhythm in sentence.
Further, it if the new remaining number of words is zero, executes and described judges whether the current sentence is traversal The step of the last one sentence arrived.
It will be appreciated that illustrating that all texts have correspondence in the current sentence if the new remaining number of words is zero Bar and rhythm, then can further judge whether the current sentence is the last one sentence traversed.If by the sentence of extraction Son is ranked up according to the sequencing occurred in the initial lyrics text, then to the sentence of sequence according to sequencing into Row traversal, then need to only judge the current sentence traversed in the sentence list of sequence whether there is also next sentence, Next sentence if it does not exist then determines that the current sentence is the last one sentence traversed, otherwise the current sentence It is not the last one sentence traversed.When the new remaining number of words is zero, illustrate that the text in the current sentence is equal It, can be by life if sentence all in the lyrics text to be processed completes the selection of beat provided with corresponding beat At rhythm splice produce the corresponding lyrics rhythm of the lyrics text to be processed in chronological order.
Further, it if the new remaining number of words is not zero, returns according to the remaining number of words from the default song The step of selecting subsequent rhythm matrix in the transfer matrix set of word rhythm generation model.
It should be noted that if the new remaining number of words is not zero, then return according to the remaining number of words from described pre- If the step of selecting subsequent rhythm matrix in the transfer matrix set of lyrics rhythm generation model, until in the current sentence Lyrics text generates in model from preset lyrics rhythm and selects suitable bar and rhythm, until the remaining number of words is zero, Then the text in the current sentence has selected corresponding bar and rhythm, i.e., the described sentence rhythm and one or more subsequent A next rhythm is spliced to form the complete words rhythm of the current sentence.
In the present embodiment, if the residue number of words is not zero, according to the remaining number of words from the default lyrics rhythm Generate model transfer matrix in select subsequent rhythm matrix, selected from the subsequent rhythm matrix bar and rhythm as Next rhythm of the current sentence, repeats the above steps, until the remaining number of words is zero, then in the current sentence Text has selected corresponding bar and rhythm, so that all lyrics of all sentences can be chosen in the lyrics text to be processed Suitable bar and rhythm does not need the lyrics strictly regulated input, tool according to the reasonable bar and rhythm of the adaptive generation of the lyrics Well adapting to property.
It is the flow diagram of lyrics rhythm generation method 3rd embodiment of the present invention referring to Fig. 4, Fig. 4, is based on above-mentioned Fig. 3 Shown in second embodiment, propose the 3rd embodiment of lyrics rhythm generation method of the present invention.
In the third embodiment, before the step S10, further includes:
Step S01: the lyrics rhythm generating device establishes the Markov model on basis, and obtains song sample collection It closes.
It should be understood that song rhythm sequence is considered as the sequence with Markov property, by the section of adjacent moment It plays variation and regards Markov process as, then construct the Markov model on basis on this basis, and to the horse on basis Er Kefu model is trained, then can generate music rhythm by trained Markov model.
It will be appreciated that selecting the song sample of N song sample building model at random from the music samples library This set T={ T1, T2 ... Ti ..., TN }, Ti indicate arbitrary music samples in the song sample set, i be greater than etc. In 1 integer, remember that the time signature of the music samples is A/B, wherein A indicates that the beat number of every trifle, B indicate that the time of a beat is long Degree.
Step S02: the Markov model is trained according to the music samples in the song sample set, is obtained Lyrics rhythm must be preset and generate model.
It should be noted that counting the tempo class that first count occurs in each sentence of the music samples in the training stage The type and quantity of type, and record into specific matrix W num, wherein num indicates the length of the current sentence residue lyrics, And the matrix W num is added in beat set of matrices W.Count adjacent two breath-group in each sentence play between transfer Situation is recorded in specific transfer matrix Hnum and is added to transfer matrix set H, and wherein num indicates that rhythm becomes The length of the current sentence residue lyrics before change.Carrying out same processing to all music samples can complete for the horse Then the element of every a line in each matrix is carried out probability to it divided by the sum of the row element by the training of Er Kefu model Change.Markov model is trained according to the music samples in the song sample set by above-mentioned training process, from And it obtains default lyrics rhythm and generates model.
In the present embodiment, the step S02, comprising:
The lyrics rhythm generating device extracts each music sample from the music samples in the song sample set This corresponding rhythm sequences;
Count unduplicated rhythm sequences in the corresponding rhythm sequences of each music samples;
By the unduplicated rhythm sequences record to not repeat rhythm set in;
The rhythm type and quantity that first count occurs in each sentence in each music samples are counted, by the first count The rhythm type and quantity of appearance are recorded to beat matrix;
Count in each music samples adjacent two breath-group in each sentence play between transfer case, by described adjacent two Breath-group play between transfer case record into transfer matrix;
Markov model is instructed by rhythm set, the beat matrix and the transfer matrix of not repeating Practice, obtains default lyrics rhythm and generate model.
In the concrete realization, pitch information rejecting is carried out to the music samples in the song sample set, obtains each institute State the corresponding rhythm sequences of music samples, reject the rhythm sequences after pitch information be Ri=ri, 1;ri,2;…ri, j;…;Ri, n }, wherein ri, j indicate that the rhythm sequences in j-th of beat of the sample, n=m*A, m indicate the trifle of the sample Number, i is the integer more than or equal to 1, so as to extract to the rhythm sequences.After obtaining music samples, root first Rhythm sequences are divided according to the sentence number in its lyrics information, note divide after rhythm sequences Ri=Ri, 1;Ri, 2;…;Ri, a }, wherein a is the sentence number in the music samples, the rhythm sequences that Ri, k are covered by each sentence, it is assumed that every The small joint number that one sentence is covered is nk, then havingRi1={ ri,l|1≤l≤n1,For the rhythm sequences in sentence each in song sample, by the way of following It carries out the training of model, counts the unduplicated rhythm sequences occurred in all beats in the sample first, be recorded In specific set U;Then, the type and quantity for counting the rhythm type that first count occurs in each sentence, are recorded In to specific matrix W num and it is added to set W, wherein num indicates the length of the current sentence residue lyrics;In addition to this, Count adjacent two breath-group in each sentence play between transfer case, be recorded in specific transfer matrix Hnum simultaneously It is added to set H, wherein num indicates the length of the current sentence residue lyrics before tempo variation.All music samples are carried out Same processing can complete the training for model, then by the element of every a line in each matrix divided by row member The sum of element carries out randomization to it.It can to Ma Er according to the music samples in the song sample set by above-mentioned training process Husband's model is trained, so that obtaining lyrics rhythm generates model.
In the present embodiment, the step S30, comprising:
The lyrics rhythm generating device obtains the default lyrics rhythm and generates respectively to be saved in the beat set of matrices of model Clap the corresponding third number of words of matrix;
Judged in each beat matrix according to the third number of words with the presence or absence of the first number of words with the current sentence Corresponding beat matrix;
If in each beat matrix exist beat matrix corresponding with the first number of words of the current sentence, selection with The corresponding beat matrix of first number of words is as probability matrix.
It should be understood that the beat square of model can be generated according to the first number of words of the current sentence from default lyrics rhythm Suitable matrix is selected to generate the probability matrix of rhythm as it in battle array W.It obtains the default lyrics rhythm and generates model Beat set of matrices in the corresponding third number of words of each beat matrix, each third number of words is compared with first number of words Compared with third number of words is consistent with first number of words if it exists, i.e., the corresponding matrix W num of the first number of words of the described current sentence belongs to The beat matrix W of model is generated in the default lyrics rhythm, then directly selecting Wnum as probability matrix.
In the present embodiment, described to be judged in each beat matrix according to the third number of words with the presence or absence of working as with described After the corresponding beat matrix of first number of words of preceding sentence, further includes:
There is no the first numbers of words with the current sentence in each beat matrix for the lyrics rhythm generating device When corresponding beat matrix, first number of words number of words difference between each third number of words respectively is calculated;
Select in each number of words difference the corresponding beat matrix of minimum value as probability matrix.
It will be appreciated that third number of words is consistent with first number of words if it does not exist, i.e., the first word of the described current sentence The corresponding matrix W num of number is not belonging to the beat matrix W that the default lyrics rhythm generates model, then from the default lyrics section Play number of words difference the smallest beat square of the selection with the first number of words of the current sentence in the beat set of matrices W for generating model Battle array is used as the probability matrix.
In the present embodiment, the Markov model on basis is established, song sample set is obtained, according to the song sample collection Music samples in conjunction are trained the Markov model, obtain default lyrics rhythm and generate model, are obtained by training The default lyrics rhythm obtained generates model and carries out the prediction of lyrics rhythm, the lyrics section of generation to the lyrics text to be processed Playing can be very good extends suitable for the music rhythm of different-style, has good scalability.
In addition, the embodiment of the present invention also proposes a kind of storage medium, the generation of lyrics rhythm is stored on the storage medium Program, the lyrics rhythm generate the step that lyrics rhythm generation method as described above is realized when program is executed by processor Suddenly.
In addition, the embodiment of the present invention also proposes a kind of lyrics rhythm generating means referring to Fig. 5, the lyrics rhythm is generated Device includes:
Module 10 is obtained, for obtaining multiple lyrics texts to be processed.
It should be noted that multiple lyrics texts to be processed can be obtained simultaneously in order to improve lyrics rhythm formation efficiency, with Multiple threads are carried out to multiple lyrics texts to be processed, to realize batch processing, improve treatment effeciency.
Multiple threads module 20, for carrying out multiple threads to multiple lyrics texts to be processed, from described to be processed Multiple sentences are extracted in lyrics text, and word counting is carried out respectively to the sentence of extraction.
It should be understood that the multiline procedure processor can carry out parallel processing to multiple lyrics texts to be processed simultaneously, from And improve treatment effeciency.The lyrics text to be processed is one section of given lyrics text U={ U1, U2 ... Ui..., Us }, i For the integer more than or equal to 1, s is the sentence number in the lyrics text, counts to the number of words of each sentence, obtains each sentence Number of words.Multiple sentences are extracted from the lyrics text to be processed, it usually needs to all sentences in the lyrics text to be processed Son extracts, and carries out word counting to all sentences, and it is corresponding to obtain all sentences in the lyrics text to be processed Sentence number of words.
Spider module 30, for storing the sentence of extraction to data buffer, according to first-in first-out rule to the number It is traversed according to the sentence in buffer, using the sentence traversed as current sentence.
It will be appreciated that respective handling is carried out to each sentence to realize, to generate in the lyrics text to be processed The corresponding lyrics rhythm of each sentence, need to traverse the sentence of extraction, each of work as sentence for lyrics text to be processed Sub- Ui is traversed according to the sequencing that each sentence occurs in the initial lyrics text.First the sentence of extraction can be deposited Storage is into the data buffer, when needing that sentence is further processed, then by first-in first-out rule to the number It is traversed according to the sentence in buffer;It can also be successive suitable according to occurring in the initial lyrics text by the sentence of extraction Sequence is ranked up, then is traversed to the sentence of sequence according to sequencing;Using the sentence traversed as the current sentence.
Selecting module 40 generates the beat of model for the first number of words according to the current sentence from default lyrics rhythm Probability matrix is selected in set of matrices, the default lyrics rhythm generates model by obtaining to Markov model training .
It should be noted that it is trained Markov model that the default lyrics rhythm, which generates model,.Establish base The Markov model of plinth obtains song sample set, according to the music samples in the song sample set to the Ma Er Section's husband's model is trained, and is obtained default lyrics rhythm and is generated model.In the training stage, each sentence of the music samples is counted The type and quantity for the rhythm type that middle first count occurs, and record into specific matrix W num, wherein num indicates current The length of the sentence residue lyrics, and the matrix W num is added in beat set of matrices W.It then can be according to the current sentence The first number of words from default lyrics rhythm generate model beat matrix W in select suitable matrix as its generate rhythm just Beginning probability matrix.If the corresponding matrix W num of the first number of words of the current sentence, which belongs to the default lyrics rhythm, generates mould Otherwise the beat matrix W of type generates model from the default lyrics rhythm then directly selecting Wnum as probability matrix Beat matrix W in select with the smallest matrix of number of words difference of the first number of words of the current sentence as its probability square Battle array.
The selecting module 40 is also used to select a bar and rhythm as described current from the probability matrix The sentence rhythm of sentence.
It should be understood that after having selected probability matrix, according to probability every in the probability matrix The rhythm that a bar and rhythm starts as it is therefrom randomly choosed, the beat of maximum probability can also be chosen according to every probability The rhythm that rhythm starts as it, it is without restriction to this.And updating remaining residue number of words the num=num-c, c is institute The note quantity of the sentence rhythm of choosing.Judge whether the remaining number of words is zero, if the residue number of words number of words is not zero, root Subsequent rhythm matrix is selected from the transfer matrix that the lyrics rhythm generates model according to the remaining number of words, from the subsequent section The next rhythm for selecting a bar and rhythm as the current sentence in matrix is played, the judgement remaining number of words is returned The step of whether being zero, until the remaining number of words is zero, then the text in the current sentence has selected corresponding beat Rhythm, i.e., the described sentence rhythm and subsequent next rhythm are spliced to form the complete sentence rhythm of the current sentence.
Splicing module 50 obtains the song to be processed for splicing each sentence rhythm generated in chronological order The corresponding lyrics rhythm of word text, and the lyrics rhythm is sent to playback equipment.
It should be noted that the sentence to extraction traverses, the sentence of extraction is completed from described pre- to realize If selecting corresponding bar and rhythm as sentence rhythm in the beat matrix of lyrics rhythm generation model.Illustrate the song to be processed The text of all sentences is provided with corresponding beat in word text, if sentence all in the lyrics text to be processed is complete It, then can be by the sentence rhythm of all sentences in the lyrics text to be processed, sequentially in time at the selection of beat Spliced, to obtain the corresponding lyrics rhythm of the lyrics text to be processed.The playback equipment can be player, intelligence The equipment that energy mobile phone or computer etc. have playing function, is sent to the playback equipment for the lyrics rhythm, by described Playback equipment plays out the lyrics rhythm.
In the present embodiment, by obtaining multiple lyrics texts to be processed, at the multithreading of the lyrics rhythm generating device It manages device and multiple threads is carried out to multiple lyrics texts to be processed, extract multiple sentences from the lyrics text to be processed, and Word counting is carried out respectively to the sentence of extraction, the lyrics rhythm generating device stores the sentence of extraction to data buffer storage Device traverses the sentence in the data buffer according to first-in first-out rule, using the sentence traversed as current sentence Son, the sentence extracted by traversal, to realize that the lyrics rhythm to all sentences generates;According to the first word of the current sentence Number selects probability matrix from the beat set of matrices that default lyrics rhythm generates model, from the probability matrix It selects a bar and rhythm as the sentence rhythm of the current sentence, each sentence rhythm of generation is spelled in chronological order It connects, obtains the corresponding lyrics rhythm of the lyrics text to be processed, pass through the default song obtained based on Markov model training Word rhythm generates model, generates lyrics rhythm, can generate adaptable lyrics rhythm for the music rhythm of different-style, mention The scalability of high lyrics rhythm.
In one embodiment, the lyrics rhythm generating means further include:
The acquisition module 10, for obtaining the starting number of words of the sentence rhythm;
Computing module, for calculating the remaining word of the current sentence according to first number of words and the starting number of words Number;
Judgment module, for judging whether the remaining number of words is zero;
The judgment module judges whether the current sentence is to traverse if being also used to the remaining number of words is zero The last one sentence;
The splicing module 50, if being also used to the current sentence is the last one sentence traversed, described in execution Each sentence rhythm of generation is spliced in chronological order, obtains the corresponding lyrics rhythm of the lyrics text to be processed.
In one embodiment, the selecting module 40 is also used to when the remaining number of words is not zero, according to the residue Number of words selects subsequent rhythm matrix from the transfer matrix set that the default lyrics rhythm generates model;From the subsequent rhythm It selects a bar and rhythm as next rhythm of the current sentence in matrix, obtains the second word of next rhythm Number;
It is new to be also used to calculate the current sentence according to the remaining number of words and second number of words for the computing module Remaining number of words, and return to described the step of whether remaining number of words is zero judged.
In one embodiment, the lyrics rhythm generating means further include:
Module is established, for establishing the Markov model on basis, and obtains song sample set;
Training module, for being instructed according to the music samples in the song sample set to the Markov model Practice, obtains default lyrics rhythm and generate model.
In one embodiment, the training module is also used to extract from the music samples in the song sample set The corresponding rhythm sequences of each music samples;Count unduplicated rhythm sequence in the corresponding rhythm sequences of each music samples Column;By the unduplicated rhythm sequences record to not repeat rhythm set in;It counts in each music samples in each sentence The rhythm type and quantity that first count occurs, rhythm type and quantity that the first count occurs are recorded to beat square Battle array;Count in each music samples adjacent two breath-group in each sentence play between transfer case, by adjacent two breath-group Transfer case between playing is recorded into transfer matrix;Rhythm set, the beat matrix and described turn are not repeated by described It moves matrix to be trained Markov model, obtains default lyrics rhythm and generate model.
In one embodiment, the selecting module 40 is also used to obtain the beat that the default lyrics rhythm generates model The corresponding third number of words of each beat matrix in set of matrices;Judge whether deposit in each beat matrix according to the third number of words In beat matrix corresponding with the first number of words of the current sentence;If existing and the current sentence in each beat matrix The corresponding beat matrix of the first number of words, then select beat matrix corresponding with first number of words as probability matrix.
In one embodiment, the selecting module 40, be also used in each beat matrix there is no with it is described current When the corresponding beat matrix of the first number of words of sentence, first number of words number of words between each third number of words respectively is calculated Difference;Select in each number of words difference the corresponding beat matrix of minimum value as probability matrix.
The other embodiments or specific implementation of lyrics rhythm generating means of the present invention can refer to above-mentioned each described Embodiment of the method, details are not described herein again.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the system that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or system.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.If listing equipment for drying Unit claim in, several in these devices, which can be, to be embodied by the same item of hardware.Word first, Second and the use of third etc. do not indicate any sequence, can be mark by these word explanations.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium (such as read-only memory mirror image (Read Only Memory image, ROM)/random access memory (Random Access Memory, RAM), magnetic disk, CD) in, including some instructions are used so that terminal device (can be mobile phone, computer, Server, air conditioner or network equipment etc.) execute method described in each a embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of lyrics rhythm generation method, which is characterized in that the lyrics rhythm generation method the following steps are included:
Lyrics rhythm generating device obtains multiple lyrics texts to be processed;
The multiline procedure processor of the lyrics rhythm generating device carries out multiple threads to multiple lyrics texts to be processed, from institute It states and extracts multiple sentences in lyrics text to be processed, and word counting is carried out respectively to the sentence of extraction;
The lyrics rhythm generating device stores the sentence of extraction to data buffer, according to first-in first-out rule to the number It is traversed according to the sentence in buffer, using the sentence traversed as current sentence;
The lyrics rhythm generating device generates the section of model according to the first number of words of the current sentence from default lyrics rhythm It claps and selects probability matrix in set of matrices, the default lyrics rhythm generates model by obtaining to Markov model training ;
The lyrics rhythm generating device selects a bar and rhythm as the current sentence from the probability matrix Sentence rhythm;
The lyrics rhythm generating device splices each sentence rhythm of generation in chronological order, obtains the song to be processed The corresponding lyrics rhythm of word text, and the lyrics rhythm is sent to playback equipment.
2. lyrics rhythm generation method as described in claim 1, which is characterized in that each sentence rhythm by generation Splice in chronological order, before obtaining the corresponding lyrics rhythm of the lyrics text to be processed, the lyrics rhythm generation method Further include:
The lyrics rhythm generating device obtains the starting number of words of the sentence rhythm;
The remaining number of words of the current sentence is calculated according to first number of words and the starting number of words;
Judge whether the remaining number of words is zero;
If the residue number of words is zero, judge whether the current sentence is the last one sentence traversed;
If the current sentence is the last one sentence traversed, each sentence rhythm by generation is executed on time Between sequential concatenation, obtain the corresponding lyrics rhythm of the lyrics text to be processed.
3. lyrics rhythm generation method as claimed in claim 2, which is characterized in that it is described judge the remaining number of words whether be After zero, the lyrics rhythm generation method further include:
The lyrics rhythm generating device is when the remaining number of words is not zero, according to the remaining number of words from the default lyrics Subsequent rhythm matrix is selected in the transfer matrix set of rhythm generation model;
Select a bar and rhythm as next rhythm of the current sentence from the subsequent rhythm matrix, described in acquisition Second number of words of next rhythm;
The new remaining number of words of the current sentence is calculated according to the remaining number of words and second number of words, and returns to the judgement The step of whether the residue number of words is zero.
4. lyrics rhythm generation method as described in claim 1, which is characterized in that the multiple lyrics texts to be processed of acquisition Before, the lyrics rhythm generation method further include:
The lyrics rhythm generating device establishes the Markov model on basis, and obtains song sample set;
The Markov model is trained according to the music samples in the song sample set, obtains default lyrics section Play generation model.
5. lyrics rhythm generation method as claimed in claim 4, which is characterized in that described according in the song sample set Music samples the Markov model is trained, obtain default lyrics rhythm and generate model, comprising:
The lyrics rhythm generating device extracts each music samples pair from the music samples in the song sample set The rhythm sequences answered;
Count unduplicated rhythm sequences in the corresponding rhythm sequences of each music samples;
By the unduplicated rhythm sequences record to not repeat rhythm set in;
The rhythm type and quantity that first count occurs in each sentence in each music samples are counted, the first count is occurred Rhythm type and quantity record to beat matrix;
Count in each music samples adjacent two breath-group in each sentence play between transfer case, by adjacent two breath-group Transfer case between playing is recorded into transfer matrix;
Markov model is trained by rhythm set, the beat matrix and the transfer matrix of not repeating, It obtains default lyrics rhythm and generates model.
6. lyrics rhythm generation method according to any one of claims 1 to 5, which is characterized in that described according to described current First number of words of sentence selects probability matrix from the beat set of matrices that default lyrics rhythm generates model, comprising:
The lyrics rhythm generating device obtains the default lyrics rhythm and generates each beat square in the beat set of matrices of model The corresponding third number of words of battle array;
Judged in each beat matrix according to the third number of words with the presence or absence of corresponding with the first number of words of the current sentence Beat matrix;
If in each beat matrix exist beat matrix corresponding with the first number of words of the current sentence, selection with it is described The corresponding beat matrix of first number of words is as probability matrix.
7. lyrics rhythm generation method as claimed in claim 6, which is characterized in that described to be judged respectively according to the third number of words After whether there is beat matrix corresponding with the first number of words of the current sentence in the beat matrix, the lyrics rhythm Generation method further include:
There is no corresponding with the first number of words of the current sentence in each beat matrix for the lyrics rhythm generating device Beat matrix when, calculate first number of words number of words difference between each third number of words respectively;
Select in each number of words difference the corresponding beat matrix of minimum value as probability matrix.
8. a kind of lyrics rhythm generating device, which is characterized in that the lyrics rhythm generating device includes: memory, processor And be stored in the lyrics rhythm that can be run on the memory and on the processor and generate program, the lyrics rhythm generates The step of lyrics rhythm generation method as described in any one of claims 1 to 7 is realized when program is executed by the processor.
9. a kind of storage medium, which is characterized in that be stored with lyrics rhythm on the storage medium and generate program, the lyrics section Play the step for generating and realizing the lyrics rhythm generation method as described in any one of claims 1 to 7 when program is executed by processor Suddenly.
10. a kind of lyrics rhythm generating means, which is characterized in that the lyrics rhythm generating means include:
Module is obtained, for obtaining multiple lyrics texts to be processed;
Multiple threads module, for carrying out multiple threads to multiple lyrics texts to be processed, from the lyrics text to be processed Multiple sentences are extracted in this, and word counting is carried out respectively to the sentence of extraction;
Spider module, for storing the sentence of extraction to data buffer, according to first-in first-out rule to the data buffer storage Sentence in device is traversed, using the sentence traversed as current sentence;
Selecting module generates the beat matrix stack of model for the first number of words according to the current sentence from default lyrics rhythm Probability matrix is selected in conjunction, the default lyrics rhythm generates model by obtaining to Markov model training;
The selecting module is also used to the lyrics rhythm generating device and selects a beat section from the probability matrix Play the sentence rhythm as the current sentence;
Splicing module obtains the lyrics text to be processed for splicing each sentence rhythm generated in chronological order Corresponding lyrics rhythm, and the lyrics rhythm is sent to target terminal.
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 true CN110517656A (en) 2019-11-29
CN110517656B 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)

Cited By (2)

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

Citations (4)

* 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
US20180322854A1 (en) * 2017-05-08 2018-11-08 WaveAI Inc. Automated Melody Generation for Songwriting
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

Patent Citations (4)

* 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
US20180322854A1 (en) * 2017-05-08 2018-11-08 WaveAI Inc. Automated Melody Generation for Songwriting
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

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112908288A (en) * 2021-01-25 2021-06-04 北京达佳互联信息技术有限公司 Beat detection method, beat detection device, electronic device, and storage medium
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

Also Published As

Publication number Publication date
CN110517656B (en) 2024-04-26

Similar Documents

Publication Publication Date Title
US8081198B1 (en) Compact clustered 2-D layout
JP4581476B2 (en) Information processing apparatus and method, and program
US20110010321A1 (en) Markovian-sequence generator and new methods of generating markovian sequences
CN109144610B (en) Audio playing method and device, electronic device and computer readable storage medium
CN106802885A (en) A kind of meeting summary automatic record method, device and electronic equipment
CN107123415A (en) A kind of automatic music method and system
US9147435B2 (en) Weighted playlist
CN110517656A (en) Lyrics rhythm generation method, equipment, storage medium and device
CN108231066A (en) Speech recognition system and method thereof and vocabulary establishing method
CN110246472A (en) A kind of conversion method of music style, device and terminal device
CN108959453A (en) Information extracting method, device and readable storage medium storing program for executing based on text cluster
CN1154529A (en) Automatic playing apparatus substituting available pattern for absent pattern
CN110198482A (en) A kind of video emphasis bridge section mask method, terminal and storage medium
JP2021037060A (en) System, method, and program for providing predetermined game, and method for creating classification of decks
CN109448697A (en) Poem melody generation method, electronic device and computer readable storage medium
CN110516103A (en) Song rhythm generation method, equipment, storage medium and device based on classifier
CN108399266A (en) Data pick-up method, apparatus, electronic equipment and computer readable storage medium
JP2008084021A (en) Animation scenario generation method, program and device
CN110012238B (en) Multimedia splicing method, device, terminal and storage medium
CN107330943A (en) One kind positioning mark matching process, device and electronic equipment
Macchiusi " Knowing is Seeing:" The Digital Audio Workstation and the Visualization of Sound
JP2004077645A (en) Lyrics generating device and program for realizing lyrics generating function
CN110070891A (en) A kind of song recognition method, apparatus and storage medium
CN113160361B (en) GIM-based simulation construction method and device, equipment and storage medium
Sporka et al. Design and implementation of a non-linear symphonic soundtrack of a video game

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