CN109841202A - Rhythm generation method, device and terminal device based on speech synthesis - Google Patents

Rhythm generation method, device and terminal device based on speech synthesis Download PDF

Info

Publication number
CN109841202A
CN109841202A CN201910008106.9A CN201910008106A CN109841202A CN 109841202 A CN109841202 A CN 109841202A CN 201910008106 A CN201910008106 A CN 201910008106A CN 109841202 A CN109841202 A CN 109841202A
Authority
CN
China
Prior art keywords
rhythm
simulation
duration
target
word
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
CN201910008106.9A
Other languages
Chinese (zh)
Other versions
CN109841202B (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 CN201910008106.9A priority Critical patent/CN109841202B/en
Publication of CN109841202A publication Critical patent/CN109841202A/en
Application granted granted Critical
Publication of CN109841202B publication Critical patent/CN109841202B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Electrophonic Musical Instruments (AREA)
  • Auxiliary Devices For Music (AREA)

Abstract

The present invention is suitable for technical field of data processing, provide rhythm generation method, device, terminal device and computer readable storage medium based on speech synthesis, include: to obtain the target lyrics, beat type and small joint number, rhythm duration is calculated according to the beat type and the small joint number;Obtain at least two default notes, at least two simulation rhythm are generated based on the target lyrics, the rhythm duration and at least two default notes, and each described simulation rhythm is scored to obtain rhythm fractional value, wherein, each of described target lyrics word corresponds at least one described default note;The simulation rhythm corresponding to the maximum rhythm fractional value of numerical value is determined as target rhythm, and exports the target rhythm.The present invention preferentially chooses the high rhythm that scores by automatically generating rhythm, improves the convenience and accuracy of rhythm generation.

Description

Rhythm generation method, device and terminal device based on speech synthesis
Technical field
The invention belongs to technical field of data processing, more particularly to the rhythm generation method based on speech synthesis, device, end End equipment and computer readable storage medium.
Background technique
As time goes on, music has become the essential a part of people's daily life.Musical composition includes writing words And composition, it is relatively simple due to writing words, it is easier to grasp, therefore it is current common for being carried out setting a song to music according to the lyrics created Musical composition mode.
In the prior art, it is only capable of the operation such as existing music rhythm being detected, identified and extracted, and does not deposit In the generation technique of music rhythm, cause music rhythm that can only write manually, the difficulty for the people for being unfamiliar with music theory knowledge It is higher.To sum up, the corresponding rhythm that artificially writes a song is needed in the prior art, and the difficulty that rhythm generates is high.
Summary of the invention
In view of this, the embodiment of the invention provides based on speech synthesis rhythm generation method, device, terminal device with And computer readable storage medium, it is high with the difficulty for solving the problems, such as that rhythm generates in the prior art.
The first aspect of the embodiment of the present invention provides a kind of rhythm generation method based on speech synthesis, comprising:
The target lyrics, beat type and small joint number are obtained, rhythm is calculated according to the beat type and the small joint number Note duration, the rhythm duration are used to indicate the duration of rhythm corresponding with the target lyrics;
At least two default notes are obtained, the target lyrics, the rhythm duration and at least two institutes are based on It states default note and generates at least two simulation rhythm, and each described simulation rhythm is scored to obtain rhythm fractional value, Wherein, each of described target lyrics word corresponds at least one described default note;
The simulation rhythm corresponding to the maximum rhythm fractional value of numerical value is determined as target rhythm, and exports institute State target rhythm.
The second aspect of the embodiment of the present invention provides a kind of rhythm generating means based on speech synthesis, comprising:
Computing unit, for obtaining the target lyrics, beat type and small joint number, according to the beat type and described small Joint number calculates rhythm duration, and the rhythm duration is used to indicate the duration of rhythm corresponding with the target lyrics;
Score unit, for obtain at least two default notes, based on the target lyrics, the rhythm duration with And at least two the default note generate at least two simulation rhythm, and each described simulation rhythm is scored to obtain Rhythm fractional value, wherein each of described target lyrics word corresponds at least one described default note;
Output unit, for the simulation rhythm corresponding to the maximum rhythm fractional value of numerical value to be determined as target Rhythm, and export the target rhythm.
The third aspect of the embodiment of the present invention provides a kind of terminal device, and the terminal device includes memory, processing Device and storage in the memory and the computer program that can run on the processor, described in the processor execution Following steps are realized when computer program:
The target lyrics, beat type and small joint number are obtained, rhythm is calculated according to the beat type and the small joint number Note duration, the rhythm duration are used to indicate the duration of rhythm corresponding with the target lyrics;
At least two default notes are obtained, the target lyrics, the rhythm duration and at least two institutes are based on It states default note and generates at least two simulation rhythm, and each described simulation rhythm is scored to obtain rhythm fractional value, Wherein, each of described target lyrics word corresponds at least one described default note;
The simulation rhythm corresponding to the maximum rhythm fractional value of numerical value is determined as target rhythm, and exports institute State target rhythm.
The fourth aspect of the embodiment of the present invention provides a kind of computer readable storage medium, the computer-readable storage Media storage has computer program, and the computer program realizes following steps when being executed by processor:
The target lyrics, beat type and small joint number are obtained, rhythm is calculated according to the beat type and the small joint number Note duration, the rhythm duration are used to indicate the duration of rhythm corresponding with the target lyrics;
At least two default notes are obtained, the target lyrics, the rhythm duration and at least two institutes are based on It states default note and generates at least two simulation rhythm, and each described simulation rhythm is scored to obtain rhythm fractional value, Wherein, each of described target lyrics word corresponds at least one described default note;
The simulation rhythm corresponding to the maximum rhythm fractional value of numerical value is determined as target rhythm, and exports institute State target rhythm.
Existing beneficial effect is the embodiment of the present invention compared with prior art:
The embodiment of the present invention calculates rhythm duration according to the beat type got and small joint number, is sung according to target Word, rhythm duration and at least two default notes generate at least two simulation rhythm for reaching rhythm duration, and Each simulation rhythm of generation is scored to obtain rhythm fractional value, it will the wherein corresponding mould of the highest rhythm fractional value of numerical value Quasi- rhythm is exported, and the embodiment of the present invention is based on the target lyrics, beat type and small joint number and automatically generates rhythm, and according to spy Fixed scoring scores to rhythm, improves the convenience and accuracy of rhythm generation.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is the implementation flow chart for the rhythm generation method based on speech synthesis that the embodiment of the present invention one provides;
Fig. 2 is the implementation flow chart of the rhythm generation method provided by Embodiment 2 of the present invention based on speech synthesis;
Fig. 3 is the implementation flow chart for the rhythm generation method based on speech synthesis that the embodiment of the present invention three provides;
Fig. 4 is the implementation flow chart for the rhythm generation method based on speech synthesis that the embodiment of the present invention four provides;
Fig. 5 is the structural block diagram for the rhythm generating means based on speech synthesis that the embodiment of the present invention five provides;
Fig. 6 is the schematic diagram for the terminal device that the embodiment of the present invention six provides.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific The present invention also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity The detailed description of road and method, in case unnecessary details interferes description of the invention.
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.
Fig. 1 shows the implementation process of the rhythm generation method provided in an embodiment of the present invention based on speech synthesis, is described in detail It is as follows:
In S101, the target lyrics, beat type and small joint number are obtained, according to the beat type and the small joint number Rhythm duration is calculated, the rhythm duration is used to indicate the duration of rhythm corresponding with the target lyrics.
In order to realize automatically generating for rhythm, the target lyrics, beat type and the correspondence of rhythm to be added are obtained first Small joint number, wherein the target lyrics be text formatting in embodiments of the present invention can be by each sentence in the lyrics write The lyrics can also input all lyrics collectively as the target lyrics separately as a target lyrics.Beat type refers to Show the combination rule of strong beat and weak beat, the beat type in the embodiment of the present invention include but is not limited to a quarter clap, four/ Two bats, four/triple time, four-quarter time and eight/triple time, and trifle is that length relevant to beat type is drawn in rhythm Divide unit, for example, assuming that beat type is four-quarter time, then clap with a crotchet for one, in each trifle It is clapped including four.Small joint number refers to the quantity of trifle, and the small joint number in the embodiment of the present invention can be customized in advance.
Optionally, number of words is measured operation compared with number carries out with preset trifle by the number of words for obtaining the target lyrics, and will be into Row carries out obtaining small joint number into an operation compared to the result obtained after operation.In embodiments of the present invention, small in addition to presetting Outside joint number, also small joint number can be calculated according to the number of words of the target lyrics.Specifically, setting trifle first measures number, and numerical value can Rule of thumb or according to beat type be configured, for example be set as 8, then by the number of words of the target lyrics and trifle measure number into Row compares operation, since note duration extra in trifle can be filled using rest, therefore will carry out obtaining compared to after operation To result carry out obtaining small joint number into an operation, prevent small joint number very few, cause the simulation rhythm being subsequently generated excessively compact. For example, if the number of words of the target lyrics is 7, then the number of words of the target lyrics is measured with trifle and is obtained after operation compared with number carries out The result arrived is 0.875, and carrying out the small joint number obtained after into an operation is 1, that is, limits the corresponding simulation rhythm of the target lyrics It only include a trifle.
Calculate rhythm duration according to obtained beat type and small joint number, rhythm duration instruction it is expected with The duration of the corresponding rhythm of the target lyrics, wherein note duration indicates the duration of note, for ease of description, in this hair The total duration of rhythm is calculated in bright embodiment using the note duration of crotchet as basic unit, specifically by the note of crotchet Duration is determined as 1.Illustrated with example, it is assumed that beat type is four-quarter time, and small joint number is 2, due to containing 8 in whole trifles A crotchet, therefore can determine that rhythm duration is 8.But it should know, this is not constituted to the embodiment of the present invention Limit, in practical application scene can also using other note durations as basic unit, as quaver note duration or The note duration etc. of semiquaver.
In S102, at least two default notes are obtained, based on the target lyrics, the rhythm duration and extremely Few two default notes generate at least two simulation rhythm, and are scored to obtain rhythm each described simulation rhythm Fractional value, wherein each of described target lyrics word corresponds at least one described default note.
After determining rhythm duration, starts the building for carrying out rhythm, that is, obtain at least two as building basis A default note, default note can carry out free setting according to practical application scene, in order to reduce the calculation amount of building rhythm, this A kind of setting means of inventive embodiments is not consider tritone and grace, set all default notes include whole note, Symbol point minim, minim, symbol point crotchet, crotchet, symbol point quaver, quaver and 16 partials Symbol, corresponding note duration is respectively 4,3,2,1.5,1,0.75,0.5 and 0.25.Based on obtain the target lyrics, rhythm Duration and at least two default notes generate at least two simulation rhythm at random, wherein generate at random based on default note It when simulating rhythm, is generated according to following condition: (1) simulating the sum of note duration of all notes and rhythm in rhythm Duration is identical;(2) the default note of at least one of all corresponding simulation rhythm of each of target lyrics word, and it is different The corresponding default note of word is different the location of in simulation rhythm.For obtained each simulation rhythm, it is commented Get rhythm fractional value, scoring can freely be set, for example tend to generate more continuous rhythm, then can be in advance for not With default note set different scores, and score corresponding to the higher default note of note duration is higher.It is worth one It is mentioned that, when generating simulation rhythm, in order to promote order, is generated according to the sequence of word in the target lyrics.
Optionally, if the sum of note duration of all notes not up to rhythm duration in the simulation rhythm generated, Rest is filled into simulation rhythm, until the sum of the note duration of all notes in simulation rhythm reaches rhythm duration Until.For some simulation rhythm of generation, if the sum of the note duration of all notes is more than rhythm in simulation rhythm Duration then deletes the simulation rhythm, is not included in the range of subsequent scoring;If simulating the sum of the note duration of all notes in rhythm Not up to rhythm duration, then the uniformity for all simulation rhythm for guaranteeing on the sum of note duration, also for The scale for expanding the simulation rhythm generated, rest filled into the simulation rhythm, until all notes in simulation rhythm The sum of note duration reach rhythm duration until.It is noted that before filling rest, in calculating simulation rhythm The absolute value of difference between the sum of note duration of all notes and rhythm duration, and it is true according to the absolute value of the difference The type of fixed rest to be filled, for example the absolute value of difference is 1, then fills crotchet rest to simulation rhythm;Difference Absolute value be 0.25, then by sixteenth rest fill to simulation rhythm.Wherein, rest can be filled to the sentence of simulation rhythm First place is set or sentence tail position, and it is not limited in the embodiment of the present invention.
In S103, the simulation rhythm corresponding to the maximum rhythm fractional value of numerical value is determined as target section It plays, and exports the target rhythm.
Determine the maximum rhythm fractional value of numerical value in all rhythm fractional values obtained after scoring, rhythm fractional value can Note is preset contained in simulation rhythm for determining, but not can determine that default note putting in order in simulation rhythm, Therefore the maximum rhythm fractional value of numerical value often corresponds at least one simulation rhythm.In order to realize output rhythm diversity, just It is selected in user, all simulation rhythm corresponding to the maximum rhythm fractional value of numerical value is determined as target rhythm one by one, And export all target rhythm.In addition to this, can also the numerical order based on rhythm fractional value all simulation rhythm are arranged Sequence, and export sequence after simulation rhythm, the range of choice to extend one's service, wherein numerical order can for rhythm fractional value from greatly to Small sequence can also be the sequence of rhythm fractional value from small to large.
By embodiment illustrated in fig. 1 it is found that in embodiments of the present invention, by obtain the target lyrics, beat type and Small joint number calculates rhythm duration according to beat type and small joint number, and obtains at least two default notes, is sung based on target Word, rhythm duration and at least two default notes generate at least two simulation rhythm, and to each simulation rhythm into Row scoring obtain rhythm fractional value, finally using simulation rhythm corresponding to the maximum rhythm fractional value of numerical value as target rhythm into Row output, the embodiment of the present invention realize the generation of the rhythm based on the lyrics, improve the convenience of rhythm generation, and are based on commenting Extension set system improves the accuracy of rhythm generation.
It is that will be scored to obtain rhythm to each simulation rhythm on the basis of the embodiment of the present invention one shown in Fig. 2 A kind of method that the process of fractional value obtains after being refined.The embodiment of the invention provides the rhythm generations based on speech synthesis The implementation flow chart of method, as shown in Fig. 2, the rhythm generation method may comprise steps of:
In S201, the corresponding basis point of each note in the simulation rhythm is obtained, wherein different notes is corresponding The different bases point.
In embodiments of the present invention, rhythm fractional value for ease of calculation can be set in advance for different notes different Basis point, such as a kind of setting means are as follows: whole note, symbol point minim and the corresponding basis minute of minim are all provided with It is set to 35;Symbol point crotchet and the corresponding basis minute of crotchet are set as 20;By symbol point quaver, quaver And the corresponding basis point of semiquaver is set as 10;The corresponding basis of rest is set up separately and is set to 0, it is certainly, above-mentioned Setting means is only a kind of example, can also set basis point using other modes in practical application scene.For building Each simulation rhythm obtains the corresponding basis point of each note in simulation rhythm.
In S202, determines the word type of the corresponding word of each note in the simulation rhythm, obtain the word type Corresponding weighting coefficient, and summation is weighted to all bases point according to the weighting coefficient and obtains the rhythm score Value, wherein the word type includes initial consonant word and rhythm alphabetic word, and the different word types corresponds to the different weighting coefficients.
Since simulation rhythm is generated based on the target lyrics, therefore point other than basis, the embodiment of the present invention is also according to word Word type obtain weighting coefficient, and basis point is weighted according to weighting coefficient, word type includes initial consonant word and rhythm alphabetic word. A kind of setting means of weighting coefficient is that the corresponding weighting coefficient of initial consonant word is determined as 2, by the corresponding weighting coefficient of rhythm alphabetic word Be determined as 1, wherein initial consonant word refers to the word containing initial consonant, initial consonant include b, p, m, f, d, t, n, l, g, k, h, j, q, x, zh, Ch, sh, r, z, c, s, y and w, initial consonant word such as " no ", "ON" or " returning ";Rhythm alphabetic word refers to word only containing simple or compound vowel of a Chinese syllable, rhythm main bag Include a, o, e, i, u, ü, ai, ei, ui, ao, ou, iu, ie, ü e, er, an, en, in, un, ü n, ang, eng, ing and ong, simple or compound vowel of a Chinese syllable Word such as " proud ", " Europe " or " peace ", certainly, actual setting means is not limited to this, but in setting, as shared by rhythm alphabetic word Pronunciation duration it is shorter, therefore limit the corresponding weighting coefficient of initial consonant word and be higher than the corresponding weighting coefficient of rhythm alphabetic word.In addition to this, also Can the word type of in advance that the tone is lighter and containing initial consonant word be set as rhythm alphabetic word.
For each simulation rhythm of generation, determines the word type of the corresponding word of each note in simulation rhythm, obtain The corresponding weighting coefficient of word type is taken, is added according to the corresponding weighting coefficient of each note basis point corresponding to the note Power, and the result after the corresponding weighting of notes all in simulation rhythm is summed to obtain rhythm fractional value, rhythm fractional value Calculation formula it is as follows:
In above-mentioned calculation formula, g is rhythm fractional value, and k is the quantity for simulating note in rhythm, k >=l, ziIt is i-th The corresponding basis point of note, yziFor the corresponding weighting coefficient of i-th of note.
By embodiment illustrated in fig. 2 it is found that in embodiments of the present invention, simulating each note pair in rhythm by obtaining The basis answered point and weighting coefficient are weighted basis point based on weighting coefficient, and all weighted results are summed Rhythm fractional value is obtained, the embodiment of the present invention improves by setting specific scoring and calculates the accurate of rhythm fractional value Property.
It is on the basis of the embodiment of the present invention one, to based on the target lyrics, rhythm duration and extremely shown in Fig. 3 A kind of method that the process that few two default notes generate at least two simulation rhythm obtains after being refined.The embodiment of the present invention The implementation flow chart of the rhythm generation method based on speech synthesis is provided, as shown in figure 3, the rhythm generation method may include Following steps:
In S301, the conjunction and non-conjunction word in the target lyrics are analyzed, includes at least two in the conjunction Word.
Generate simulate rhythm when, in embodiments of the present invention, in the target lyrics conjunction and non-conjunction word implement Different note matching way, wherein conjunction is made of at least two words in the target lyrics.In analysis conjunction and non-conjunction word When, the target lyrics can be matched with preset conjunction library, determine the conjunction of successful match in the target lyrics, and by target Word in the lyrics in addition to conjunction is determined as non-conjunction word, wherein conjunction library includes at least two conjunctions, and such as " sleep " " flies Xiang " and " having a meal " etc., the conjunction in conjunction library can be freely arranged, or call directly the conjunction library of open source.
It is raw based on the target lyrics, the rhythm duration and at least two default notes in S302 At at least two simulation rhythm, wherein the corresponding default sound of conjunction described in each of described target lyrics It accords with, the corresponding default note of non-conjunction word described in each of described target lyrics.
At least two simulation rhythm are generated based on the target lyrics, rhythm duration and at least two default notes, In, since conjunction is usually liaison, shared duration is shorter, therefore limits each of target lyrics conjunction corresponding one and preset Note, and the corresponding default note of non-conjunction word that each of limits the target lyrics.
Optionally, the note duration for limiting each of the target lyrics corresponding default note of conjunction is greater than or equal to four The note duration of dieresis.Conjunction duration shared in rhythm is too short in order to prevent, therefore can limit each in the target lyrics The note duration of the corresponding default note of a conjunction is greater than or equal to the note duration of crotchet, improves the simulation section of generation That plays is musicogenic.
By embodiment illustrated in fig. 3 it is found that in embodiments of the present invention, by analyzing conjunction in the target lyrics and non- Conjunction word generates at least two simulation rhythm based on the target lyrics, rhythm duration and at least two default notes, In, the corresponding default note of each of target lyrics conjunction, the non-conjunction word of each of target lyrics corresponds to one Default note, the embodiment of the present invention by the target lyrics conjunction and non-conjunction word implement different note matching ways, Improve the simulation audibility of rhythm and musicogenic.
It is on the basis of the embodiment of the present invention one, to by mould corresponding to the maximum rhythm fractional value of numerical value shown in Fig. 4 Quasi- rhythm is determined as target rhythm, and the process for exporting target rhythm refined after a kind of obtained method.The present invention is implemented Example provides the implementation flow chart of the rhythm generation method based on speech synthesis, as shown in figure 4, the rhythm generation method can wrap Include following steps:
In S401, the corresponding beat strong or weak relation of the beat type is obtained.
In order to promote the audibility of target rhythm, in embodiments of the present invention, the also corresponding beat of acquisition beat type is strong Weak relationship, beat strong or weak relation indicate the dynamics strong or weak relation of each bat in each trifle, if beat type is 4/4ths It claps, then corresponding beat strong or weak relation is strong-weak-secondary strong-weak;Beat type is four/triple time, then corresponding beat is strong and weak Relationship is strong-weak-weak.
In S402, according to the beat strong or weak relation to the force value of each bat in each trifle of target rhythm into Row setting, and export the target rhythm after the completion of setting.
It is set according to force value of the beat strong or weak relation to each bat in each trifle of target rhythm, specifically may be used Target rhythm is input in musical instrument digital interface (Musical Instrument Digital Interface, MIDI), and The corresponding force value (i.e. velocity) of setting beat strong or weak relation is clapped for each, such as in settable beat strong or weak relation The value range of strong corresponding force value be 100 to 127, the value range of secondary strong corresponding force value is 81 to 99, The value range of weak corresponding force value is 60 to 80, by being randomly choosed in value range, to complete dynamics The setting of numerical value, such as beat type are four-quarter time, then in some trifle relevant to the beat type, Yi Zhongshe The result made are as follows: the force value of first crotchet is 101, and the force value of second crotchet is 61, third The force value of a crotchet is 90, and the force value of the 4th crotchet is 62.It completes to each in target rhythm After the force value setting of trifle, the target rhythm of output setting completion.
By embodiment illustrated in fig. 4 it is found that in embodiments of the present invention, passing through the corresponding beat power of acquisition beat type Relationship is set according to force value of the beat strong or weak relation to each bat in each trifle of target rhythm, and is exported and set Target rhythm after the completion of fixed improves the audibility of target rhythm and musicogenic.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit It is fixed.
Corresponding to the rhythm generation method described in foregoing embodiments based on speech synthesis, Fig. 5 shows implementation of the present invention The structural block diagram for the rhythm generating means based on speech synthesis that example provides, referring to Fig. 5, which includes:
Computing unit 51, for obtaining the target lyrics, beat type and small joint number, according to the beat type and described Small joint number calculates rhythm duration, the rhythm duration be used to indicate rhythm corresponding with the target lyrics when It is long;
Score unit 52, for obtaining at least two default notes, is based on the target lyrics, the rhythm duration And at least two the default note generate at least two simulation rhythm, and each described simulation rhythm score To rhythm fractional value, wherein each of described target lyrics word corresponds at least one described default note;
Output unit 53, for the simulation rhythm corresponding to the maximum rhythm fractional value of numerical value to be determined as mesh Rhythm is marked, and exports the target rhythm.
Optionally, scoring unit 52 includes:
Acquiring unit is divided on basis, for obtaining the corresponding basis point of each note in the simulation rhythm, wherein different Note correspond to the different bases point;
Summation unit obtains the word for determining the word type of the corresponding word of each note in the simulation rhythm The corresponding weighting coefficient of type, and summation is weighted to all bases point according to the weighting coefficient and obtains the rhythm Fractional value, wherein the word type includes initial consonant word and rhythm alphabetic word, and the different word types corresponds to the different weighting systems Number.
Optionally, scoring unit 52 includes:
Analytical unit includes at least in the conjunction for analyzing conjunction and non-conjunction word in the target lyrics Two words;
Generation unit, for being based on the target lyrics, the rhythm duration and at least two default sounds Symbol generates at least two simulation rhythm, wherein conjunction described in each of described target lyrics corresponding one described pre- If note, the corresponding default note of non-conjunction word described in each of described target lyrics.
Optionally, computing unit 51 includes:
Compared to unit, for obtaining the number of words of the target lyrics, the number of words and preset trifle is measured into number and carried out Compared to operation, and will carry out carrying out obtaining the small joint number into an operation compared to the result obtained after operation.
Optionally, output unit 53 includes:
Relation acquisition unit, for obtaining the corresponding beat strong or weak relation of the beat type;
Dynamics setup unit, for the power according to the beat strong or weak relation to each bat in each trifle of target rhythm Degree value is set, and exports the target rhythm after the completion of setting.
Optionally, scoring unit 52 includes:
Fills unit, if the sum of the note duration for all notes in the simulation rhythm is not up to the rhythm Duration then fills rest into the simulation rhythm, until the sum of the note duration of all notes in the simulation rhythm Until reaching the rhythm duration.
Therefore, the rhythm generating means provided in an embodiment of the present invention based on speech synthesis are by automatically generating rhythm, and The highest rhythm of preferential output scoring, improves the convenience and accuracy of rhythm generation.
Fig. 6 is the schematic diagram of terminal device provided in an embodiment of the present invention.As shown in fig. 6, the terminal device 6 of the embodiment Include: processor 60, memory 61 and is stored in the calculating that can be run in the memory 61 and on the processor 60 Machine program 62, such as the rhythm based on speech synthesis generate program.The processor 60 executes real when the computer program 62 Step in existing above-mentioned each rhythm generation method embodiment based on speech synthesis, such as step S101 shown in FIG. 1 is extremely S103.Alternatively, the processor 60 realizes that the above-mentioned respectively rhythm based on speech synthesis generates when executing the computer program 62 The function of each unit in Installation practice, such as the function of unit 51 to 53 shown in Fig. 5.
Illustratively, the computer program 62 can be divided into one or more units, one or more of Unit is stored in the memory 61, and is executed by the processor 60, to complete the present invention.One or more of lists Member can be the series of computation machine program instruction section that can complete specific function, and the instruction segment is for describing the computer journey Implementation procedure of the sequence 62 in the terminal device 6.For example, the computer program 62 can be divided into computing unit, comment Sub-unit and output unit, each unit concrete function are as follows:
Computing unit, for obtaining the target lyrics, beat type and small joint number, according to the beat type and described small Joint number calculates rhythm duration, and the rhythm duration is used to indicate the duration of rhythm corresponding with the target lyrics;
Score unit, for obtain at least two default notes, based on the target lyrics, the rhythm duration with And at least two the default note generate at least two simulation rhythm, and each described simulation rhythm is scored to obtain Rhythm fractional value, wherein each of described target lyrics word corresponds at least one described default note;
Output unit, for the simulation rhythm corresponding to the maximum rhythm fractional value of numerical value to be determined as target Rhythm, and export the target rhythm.
The terminal device 6 can be the calculating such as desktop PC, notebook, palm PC and cloud server and set It is standby.The terminal device may include, but be not limited only to, processor 60, memory 61.It will be understood by those skilled in the art that Fig. 6 The only example of terminal device 6 does not constitute the restriction to terminal device 6, may include than illustrating more or fewer portions Part perhaps combines certain components or different components, such as the terminal device can also include input-output equipment, net Network access device, bus etc..
Alleged processor 60 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng.
The memory 61 can be the internal storage unit of the terminal device 6, such as the hard disk or interior of terminal device 6 It deposits.The memory 61 is also possible to the External memory equipment of the terminal device 6, such as be equipped on the terminal device 6 Plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card dodge Deposit card (Flash Card) etc..Further, the memory 61 can also both include the storage inside list of the terminal device 6 Member also includes External memory equipment.The memory 61 is for storing needed for the computer program and the terminal device Other programs and data.The memory 61 can be also used for temporarily storing the data that has exported or will export.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function Can unit division progress for example, in practical application, can according to need and by above-mentioned function distribution by different functions Unit is completed, i.e., the internal structure of the terminal device is divided into different functional units, to complete whole described above Or partial function.Each functional unit in embodiment can integrate in one processing unit, be also possible to each unit list It is solely physically present, can also be integrated in one unit with two or more units, above-mentioned integrated unit can both use Formal implementation of hardware can also be realized in the form of software functional units.In addition, the specific name of each functional unit also only It is the protection scope that is not intended to limit this application for the ease of mutually distinguishing.The specific work process of unit in above system, It can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed terminal device and method can pass through it Its mode is realized.For example, terminal device embodiment described above is only schematical, for example, the unit is drawn Point, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components can To combine or be desirably integrated into another system, or some features can be ignored or not executed.Another point, it is shown or beg for The mutual coupling or direct-coupling or communication connection of opinion can be through some interfaces, the INDIRECT COUPLING of device or unit Or communication connection, it can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-described embodiment side All or part of the process in method can also instruct relevant hardware to complete, the computer by computer program Program can be stored in a computer readable storage medium, and the computer program is when being executed by processor, it can be achieved that above-mentioned each The step of a embodiment of the method.Wherein, the computer program includes computer program code, and the computer program code can Think source code form, object identification code form, executable file or certain intermediate forms etc..The computer-readable medium can be with It include: any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic disk, light that can carry the computer program code Disk, computer storage, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that described computer-readable The content that medium includes can carry out increase and decrease appropriate according to the requirement made laws in jurisdiction with patent practice, such as at certain A little jurisdictions do not include electric carrier signal and telecommunication signal according to legislation and patent practice, computer-readable medium.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of rhythm generation method based on speech synthesis characterized by comprising
The target lyrics, beat type and small joint number are obtained, rhythm is calculated according to the beat type and the small joint number Duration, the rhythm duration are used to indicate the duration of rhythm corresponding with the target lyrics;
At least two default notes are obtained, it is described pre- based on the target lyrics, the rhythm duration and at least two If note generates at least two simulation rhythm, and is scored to obtain rhythm fractional value each described simulation rhythm, wherein Each of target lyrics word corresponds at least one described default note;
The simulation rhythm corresponding to the maximum rhythm fractional value of numerical value is determined as target rhythm, and exports the mesh Mark rhythm.
2. rhythm generation method as described in claim 1, which is characterized in that described to comment each described simulation rhythm Get rhythm fractional value, comprising:
Obtain the corresponding basis point of each note in the simulation rhythm, wherein different notes corresponds to the different bases Plinth point;
The word type for determining the corresponding word of each note in the simulation rhythm obtains the corresponding weighting system of the word type Number, and summation is weighted to all bases point according to the weighting coefficient and obtains the rhythm fractional value, wherein it is described Word type includes initial consonant word and rhythm alphabetic word, and the different word types corresponds to the different weighting coefficients.
3. rhythm generation method as described in claim 1, which is characterized in that described to be based on the target lyrics, the rhythm Note duration and at least two default notes generate at least two simulation rhythm, comprising:
The conjunction and non-conjunction word in the target lyrics are analyzed, includes at least two words in the conjunction;
It is generated described at least two based on the target lyrics, the rhythm duration and at least two default notes Simulate rhythm, wherein the corresponding default note of conjunction described in each of described target lyrics, the target lyrics Each of described in the corresponding default note of non-conjunction word.
4. rhythm generation method as described in claim 1, which is characterized in that the acquisition target lyrics, beat type and Small joint number, comprising:
The number of words is measured operation compared with number carries out with preset trifle, and will carried out by the number of words for obtaining the target lyrics It carries out obtaining the small joint number into an operation compared to the result obtained after operation.
5. rhythm generation method as described in claim 1, which is characterized in that described by the maximum rhythm fractional value of numerical value The corresponding simulation rhythm is determined as target rhythm, and exports the target rhythm, comprising:
Obtain the corresponding beat strong or weak relation of the beat type;
It is set, and exported according to force value of the beat strong or weak relation to each bat in each trifle of target rhythm The target rhythm after the completion of setting.
6. rhythm generation method as described in claim 1, which is characterized in that described to be based on the target lyrics, the rhythm Note duration and at least two default notes generate at least two simulation rhythm, comprising:
If the not up to rhythm duration of the sum of note duration of all notes, rest is filled out in the simulation rhythm It is charged in the simulation rhythm, when the sum of the note duration of all notes in the simulation rhythm reaches the rhythm Until value.
7. a kind of rhythm generating means based on speech synthesis characterized by comprising
Computing unit, for obtaining the target lyrics, beat type and small joint number, according to the beat type and the small joint number Rhythm duration is calculated, the rhythm duration is used to indicate the duration of rhythm corresponding with the target lyrics;
Score unit, for obtaining at least two default notes, based on the target lyrics, the rhythm duration and extremely Few two default notes generate at least two simulation rhythm, and are scored to obtain rhythm each described simulation rhythm Fractional value, wherein each of described target lyrics word corresponds at least one described default note;
Output unit, for the simulation rhythm corresponding to the maximum rhythm fractional value of numerical value to be determined as target section It plays, and exports the target rhythm.
8. a kind of terminal device, which is characterized in that the terminal device includes memory, processor and is stored in the storage In device and the computer program that can run on the processor, the processor are realized as follows when executing the computer program Step:
The target lyrics, beat type and small joint number are obtained, rhythm is calculated according to the beat type and the small joint number Duration, the rhythm duration are used to indicate the duration of rhythm corresponding with the target lyrics;
At least two default notes are obtained, it is described pre- based on the target lyrics, the rhythm duration and at least two If note generates at least two simulation rhythm, and is scored to obtain rhythm fractional value each described simulation rhythm, wherein Each of target lyrics word corresponds at least one described default note;
The simulation rhythm corresponding to the maximum rhythm fractional value of numerical value is determined as target rhythm, and exports the mesh Mark rhythm.
9. terminal device as claimed in claim 8, which is characterized in that described score each described simulation rhythm To rhythm fractional value, comprising:
Obtain the corresponding basis point of each note in the simulation rhythm, wherein different notes corresponds to the different bases Plinth point;
The word type for determining the corresponding word of each note in the simulation rhythm obtains the corresponding weighting system of the word type Number, and summation is weighted to all bases point according to the weighting coefficient and obtains the rhythm fractional value, wherein it is described Word type includes initial consonant word and rhythm alphabetic word, and the different word types corresponds to the different weighting coefficients.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In the step of realization rhythm generation method as described in any one of claim 1 to 6 when the computer program is executed by processor Suddenly.
CN201910008106.9A 2019-01-04 2019-01-04 Rhythm generation method and device based on voice synthesis and terminal equipment Active CN109841202B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910008106.9A CN109841202B (en) 2019-01-04 2019-01-04 Rhythm generation method and device based on voice synthesis and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910008106.9A CN109841202B (en) 2019-01-04 2019-01-04 Rhythm generation method and device based on voice synthesis and terminal equipment

Publications (2)

Publication Number Publication Date
CN109841202A true CN109841202A (en) 2019-06-04
CN109841202B CN109841202B (en) 2023-12-29

Family

ID=66883696

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910008106.9A Active CN109841202B (en) 2019-01-04 2019-01-04 Rhythm generation method and device based on voice synthesis and terminal equipment

Country Status (1)

Country Link
CN (1) CN109841202B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110516103A (en) * 2019-08-02 2019-11-29 平安科技(深圳)有限公司 Song rhythm generation method, equipment, storage medium and device based on classifier
CN110517656A (en) * 2019-08-02 2019-11-29 平安科技(深圳)有限公司 Lyrics rhythm generation method, equipment, storage medium and device
CN113658570A (en) * 2021-10-19 2021-11-16 腾讯科技(深圳)有限公司 Song processing method, apparatus, computer device, storage medium, and program product

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100186579A1 (en) * 2008-10-24 2010-07-29 Myles Schnitman Media system with playing component
CN106373580A (en) * 2016-09-05 2017-02-01 北京百度网讯科技有限公司 Singing synthesis method based on artificial intelligence and device
CN106652984A (en) * 2016-10-11 2017-05-10 张文铂 Automatic song creation method via computer
CN108231048A (en) * 2017-12-05 2018-06-29 北京小唱科技有限公司 Correct the method and device of audio rhythm

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100186579A1 (en) * 2008-10-24 2010-07-29 Myles Schnitman Media system with playing component
CN106373580A (en) * 2016-09-05 2017-02-01 北京百度网讯科技有限公司 Singing synthesis method based on artificial intelligence and device
CN106652984A (en) * 2016-10-11 2017-05-10 张文铂 Automatic song creation method via computer
CN108231048A (en) * 2017-12-05 2018-06-29 北京小唱科技有限公司 Correct the method and device of audio rhythm

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110516103A (en) * 2019-08-02 2019-11-29 平安科技(深圳)有限公司 Song rhythm generation method, equipment, storage medium and device based on classifier
CN110517656A (en) * 2019-08-02 2019-11-29 平安科技(深圳)有限公司 Lyrics rhythm generation method, equipment, storage medium and device
CN110516103B (en) * 2019-08-02 2022-10-14 平安科技(深圳)有限公司 Song rhythm generation method, device, storage medium and apparatus based on classifier
CN110517656B (en) * 2019-08-02 2024-04-26 平安科技(深圳)有限公司 Lyric rhythm generation method, device, storage medium and apparatus
CN113658570A (en) * 2021-10-19 2021-11-16 腾讯科技(深圳)有限公司 Song processing method, apparatus, computer device, storage medium, and program product
CN113658570B (en) * 2021-10-19 2022-02-11 腾讯科技(深圳)有限公司 Song processing method, apparatus, computer device, storage medium, and program product

Also Published As

Publication number Publication date
CN109841202B (en) 2023-12-29

Similar Documents

Publication Publication Date Title
CN109166564B (en) Method, apparatus and computer readable storage medium for generating a musical composition for a lyric text
CN109841202A (en) Rhythm generation method, device and terminal device based on speech synthesis
CN109801608A (en) A kind of song generation method neural network based and system
Chakraborty et al. Computational musicology in Hindustani music
CN108877782A (en) Audio recognition method and device
CN110164460A (en) Sing synthetic method and device
CN112164379A (en) Audio file generation method, device, equipment and computer readable storage medium
Ramalho et al. An artificially intelligent jazz performer
Bresin et al. Evaluation of computer systems for expressive music performance
Haus et al. Scoresynth: A system for the synthesis of music scores based on petri nets and a music algebra
CN109859739B (en) Melody generation method and device based on voice synthesis and terminal equipment
CN108255956A (en) The method and system of dictionary are adaptively obtained based on historical data and machine learning
Manilow et al. Improving source separation by explicitly modeling dependencies between sources
CN112989109A (en) Music structure analysis method, electronic equipment and storage medium
CN109635841B (en) Lyric evaluation method and device, storage medium and computer equipment
CN112420002A (en) Music generation method, device, electronic equipment and computer readable storage medium
Lyons et al. Creating new interfaces for musical expression
CN106205572B (en) Sequence of notes generation method and device
Kirke et al. Artificial Social Composition: A Multi-Agent System for Composing Music Performances by Emotional Communication
Camurri et al. An experiment on analysis and synthesis of musical expressivity
CN107871489A (en) The recording medium of chord decision maker, chord decision method and non-transitory
CN111782868A (en) Audio processing method, device, equipment and medium
Antoine et al. Towards intelligent orchestration systems
Suzuki The second phase development of case based performance rendering system kagurame
Martins et al. Enhancing sound design with conceptual blending of sound descriptors

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