Specific embodiment
An embodiment of the present invention provides a kind of K to sing processing method and processing device, can realize that the K to chorus with star is sung and experience,
It is described in detail separately below.
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, the every other implementation that those skilled in the art are obtained without creative efforts
Example, shall fall within the protection scope of the present invention.
In addition, term " comprising " and " having " and their any deformation, it is intended that cover it is non-exclusive include, example
Such as, process, method, system, product or the equipment for containing series of steps or unit are not necessarily limited to those clearly listed
Step or unit, but may include not listing clearly or for intrinsic other of these processes, method, product or equipment
Step or unit.
It should be noted that client can specifically include mobile phone, personal computer (PC, Personal Computer)
And/or the equipment such as tablet computer.It, can be by these client logon Web pages or in these clients during specific implementation
Loading procedure or the application program (App, Application) issued using each mobile platform are serviced to access K songs.
Referring to Fig. 1, K songs processing method one embodiment includes in the embodiment of the present invention:
101st, client receives K songs request input by user;
In the present embodiment, when user wants that choosing song carries out K songs, K song requests need to be inputted to client, to trigger K
Sing process flow.
102nd, client sings the accompaniment audio file of acquisition request song, original singer's audio file and corresponding according to the K
Lyrics file;
When receiving K songs request input by user, client can sing request according to the K and determine the song that user chooses
Song, and further obtain the accompaniment audio file of the song, original singer's audio file and corresponding lyrics file.In the present embodiment
In, client can be that accompaniment audio file, original singer's audio file and the corresponding lyrics file of song are obtained from server.
In the present embodiment, accompaniment audio file and original singer's audio file are naked audio data, in actual application
In, if the accompaniment audio file or original singer's audio file that obtain are the audio data of compressed format, such as mp3 forms, then service
The audio data of compressed format decompression is first condensed to naked audio data by device.
It should be noted that in the present embodiment, lyrics file is included for identifying the temporal information that the lyrics show the time,
So that lyrics file is synchronous with accompaniment audio file, original singer's audio file according to the temporal information.Such as the lyrics file can be with
Including LRC lyrics files, the LRC lyrics files by it includes time tag come identify the lyrics show the time.
103rd, client carries out division processing to the lyrics file, obtains the first lyrics por-tion and the second lyrics por-tion, and
Accompaniment audio file is played in the first lyrics por-tion corresponding display time and records the audio data of user, in the second lyrics portion
The display time divided plays original singer's audio file.
In the present embodiment, client may be used numerous embodiments and carry out division processing to the lyrics file, obtain
First lyrics por-tion and the second lyrics por-tion, illustrate separately below:
The first is, before step 103, client receives the division instruction of user, then according to division instruction pair
The lyrics file carries out division processing, obtains the first lyrics por-tion and the second lyrics por-tion.
In the present embodiment, in the preset a variety of lyrics of client can divide processing strategy and by above-mentioned lyrics division at
Lyrics file is divided into two lyrics por-tions by reason strategy, is illustrated below:
(1), temporal information of the client in lyrics file determines the paragraph information of the lyrics file, further according to the section
It falls information and the lyrics file is divided into two lyrics por-tions.
In the present embodiment, the temporal information of the lyrics file can reflect that each paragraph of respective songs shows rising for time
Point and terminal, as a result, client can determine that lyrics file includes several paragraphs and each paragraph and corresponds to according to the temporal information
Display the time beginning and end.When being divided further according to above-mentioned paragraph information to lyrics file, server can incite somebody to action pre-
If at least one paragraph divide a lyrics por-tion into, then other parts divide another lyrics por-tion into.Specifically herein to each
It is fixed that the paragraph quantity of lyrics por-tion and specially which or which paragraph are not limited.For example, the structure of paragraph information can
To be expressed as:
typdef struct section_info{
int section_id;// paragraph id
int start_ms;// time started ms
int end_ms;// end time ms
int role_id;// role id
}Ssection,*PSection;
Wherein, above-mentioned role id is used to represent that the song corresponds to female voice singing part or male voice singing part, as
It is preferred that the corresponding paragraph of female voice singing part can be set as to a lyrics por-tion, by the corresponding paragraph of male voice singing part
Another lyrics por-tion is set as, to divide the lyrics using the difference of men and women role, obtains two lyrics of different role
Part.
(2), client determines main song part and the chorus section of the lyrics file, and main song part is determined as a song
Chorus section is determined as another lyrics por-tion by word part.
In the present embodiment, client can divide the lyrics using the difference of main song and refrain, to obtain corresponding master
One lyrics por-tion of song, another lyrics por-tion of corresponding refrain, so as to by the difference of main song and refrain by lyrics file
It is divided into two lyrics por-tions.
(3), client carries out division processing according to customized template to the lyrics file, obtains two lyrics por-tions;
In the present embodiment, client can it is self-defined in advance it is multiple divide the lyrics templates, further according to above-mentioned self-defined
Template division processing is carried out to the lyrics file, obtain two lyrics por-tions.For example, by the fixed N lyrics or N number of word
A lyrics por-tion is set as, specifically herein for customized template how to be set not limit, those skilled in the art can
To set multiple different templates according to actual conditions.
It should be noted that client uses corresponding in the division instruction for receiving user according to division instruction
The lyrics divide processing strategy and carry out division processing, so as to obtain corresponding first lyrics por-tion and the second lyrics por-tion.Optionally,
In actual application, client can also provide a selection module, for user to obtained two lyrics por-tions of division into
Row is chosen, which to be specified partly as the first lyrics por-tion or which step partly as second part.For example, pass through selection
Module, user can select, using male voice singing part as the first lyrics por-tion, to sing for oneself or male voice is sung portion
It is allocated as the second lyrics por-tion, with by star original singer.
Division processing is carried out to the lyrics file in client, obtain the first lyrics por-tion and the second lyrics por-tion it
Afterwards, client plays accompaniment audio file in the first lyrics por-tion corresponding display time and records the audio data of user,
The display time of second lyrics por-tion plays original singer's audio file.
It is for second that client obtains the first song according to whether have voice input to carry out division processing to lyrics file
Word part and the second lyrics por-tion.
It specifically includes:Client has detected whether voice input, if so, lyrics file is shown corresponding in the time
Lyrics por-tion is divided into the first lyrics por-tion, and plays accompaniment audio file and be switched to microphone input pattern to record user
Audio data, if it is not, in the corresponding lyrics por-tion shown in the time lyrics file then is divided into the second lyrics por-tion, and broadcast
Put original singer's audio file.It is understood that the same stepping of the operation such as the division processing operation of lyrics file and broadcasting, recording herein
Row, without etc. obtain the first lyrics por-tion and the second lyrics por-tion after, client is corresponding aobvious in the first lyrics por-tion again
Show that the time plays accompaniment audio file and records the audio data of user, original singer's sound is played in the display time of the second lyrics por-tion
Frequency file.
In the present embodiment, it only illustrates how to carry out division processing to the lyrics file with several examples above, obtain
First lyrics por-tion and the second lyrics por-tion, in actual application, client can carry out above-mentioned division processing mode
It is used in combination, more other division processing modes can also be used, do not limited herein specifically.
In technical solution provided in an embodiment of the present invention, client is when receiving K songs request input by user, according to this
K sings accompaniment audio file, original singer's audio file and the corresponding lyrics file of acquisition request song, wherein, the lyrics file
Temporal information including being used to identify the lyrics display time;Then division processing is carried out to the lyrics file, obtains first lyrics
Part and the second lyrics por-tion, and play accompaniment audio file in the first lyrics por-tion corresponding display time and record user's
Audio data plays original singer's audio file in the display time of the second lyrics por-tion;Again to above-mentioned through recording obtained user's
The audio data of audio data and accompaniment audio file in the first lyrics por-tion corresponding display time carries out stereo process, obtains
Target audio file, and target audio file is exported in the first lyrics por-tion corresponding display time, in the second lyrics por-tion pair
The display time output original singer's audio file answered, to generate chorus file.Therefore relative to the prior art, in the embodiment of the present invention
Client is carrying out division processing to lyrics file, after obtaining the first lyrics por-tion and the second lyrics por-tion, only in first lyrics
The part corresponding display time plays accompaniment audio file and records the audio data of user, and corresponding in the second lyrics por-tion
Show that the time plays original singer's audio file, thus, it is possible to realize that a part is drilled in the display time of the first lyrics por-tion by user
Sing, the second lyrics por-tion the display time by star original singer, sing experience so as to fulfill the K to chorus with star.Moreover, in this reality
Apply example directly can realize that the K to chorus with star sings experience in client using common accompaniment audio file.
Below on the basis of embodiment shown in Fig. 1, further describe client is how to obtain chorus file, please join
Fig. 2 is read, K song another embodiments of processing method include in the embodiment of the present invention:
201st, client receives K songs request input by user;
202nd, client sings the accompaniment audio file of acquisition request song, original singer's audio file and corresponding according to the K
Lyrics file, wherein, which includes identifying the temporal information that the lyrics show the time;
203rd, client carries out division processing to the lyrics file, obtains the first lyrics por-tion and the second lyrics por-tion, and
Accompaniment audio file is played in the first lyrics por-tion corresponding display time and records the audio data of user, in the second lyrics portion
The display time divided plays original singer's audio file.
In the present embodiment, the step 101 in step 201 to 203 process and embodiment illustrated in fig. 1 is to step 103
Process is identical, and details are not described herein again.
Which part of quick identification needs the lyrics sung for oneself for the convenience of the user, the lyrics which part is sung for star,
Client can be further to showing that the lyrics on the client be identified, as a result, preferably, the present embodiment can also be into
One step includes:Client sets first flag to the first lyrics por-tion for being shown in client, to being shown in the second of client
Lyrics por-tion sets second identifier.It is understood that above-mentioned mark can be colour code, for example, the first lyrics por-tion is shown
Show a kind of color, the second lyrics por-tion shows another color;Or the above-mentioned highlighted state that is identified as identifies, for example, the first song
Word part is shown as highlighted state, and the second lyrics por-tion is shown as non-highlighted state, specifically herein to the specific reality using mark
Existing form does not limit, and those skilled in the art can obtain more other form of identification according to demand.
204th, client to the audio data and accompaniment audio file of the user in the corresponding display of the first lyrics por-tion
Between audio data carry out stereo process, obtain target audio file;
In the present embodiment, after the audio data (i.e. the audio data of microphone acquisition) for obtaining user, client pair
Audio data of the audio data and accompaniment audio file of the user in the first lyrics por-tion corresponding display time carries out audio mixing
Processing, obtains target audio file, and the target audio file can embody all audio frequency data of user's singing part as a result,
Sound and corresponding accompaniment including user.
In the present embodiment, the detailed process of stereo process can be found in existing Mixed Audio Algorithm, for example, directly adopting correspondence
Sampling point data addition divided by two.
205th, client exports target audio file in the first lyrics por-tion corresponding display time, in the second lyrics por-tion
Corresponding display time output original singer's audio file, to generate chorus file.
In the present embodiment, during file is chorused in generation, if the first lyrics por-tion corresponding display time, then
Target audio file is exported, to obtain audio data of the target audio file in the corresponding period, if the second lyrics por-tion pair
The display time answered, then original singer's audio file is exported, to obtain audio data of the original singer's audio file in the corresponding period, then
The audio data of Each point in time is synthesized into an audio file according to time order and function sequence, the audio file of synthesis is to close
Sing file.It is emphasized that during file is chorused in above-mentioned generation, determined specifically to export mesh by the display time of the lyrics
Mark with phonetic symbols frequency file and original singer's audio file are in the audio data of which period.The chorus file obtained as a result, is in first lyrics
The part corresponding display time, output is user's singing part of corresponding period, in the corresponding display of the second lyrics por-tion
Time, output are the original singer part of corresponding period.
Optionally, in the present embodiment, client is balanced place to audio data of the above-mentioned chorus file in switching point
Reason, wherein, when which refers to display corresponding to the second lyrics por-tion by the corresponding display time-switching of the first lyrics por-tion
Between time point or by the corresponding display time-switching of the second lyrics por-tion to first lyrics por-tion corresponding display time
Time point.Herein, since target audio file is spliced by two audio files, processing is balanced in switching point in splicing
It can ensure the audio quality of target audio file.In the present embodiment, specific Balance Treatment mode can be found in existing sound
Frequency splicing, such as mean filter, overlap-add procedure etc..
Optionally, in the present embodiment, which can also be uploaded to network by user by client, so as to
Other people share the chorus of oneself and star.
The K song processing methods in the embodiment of the present invention are described above, the K in the embodiment of the present invention is sung below
Processing unit is described, referring to Fig. 3, K songs processing unit one embodiment includes in the embodiment of the present invention:
Receiving unit 301, for receiving K songs request input by user;
Acquiring unit 302, for according to the K sing the accompaniment audio file of acquisition request song, original singer's audio file with
And corresponding lyrics file, wherein, the lyrics file includes identifying the temporal information that the lyrics show the time;
Processing unit 303 for carrying out division processing to the lyrics file, obtains the first lyrics por-tion and second lyrics
Part, and play the accompaniment audio file in the first lyrics por-tion corresponding display time and record the audio number of user
According in display time broadcasting original singer's audio file of the second lyrics por-tion.
For ease of understanding, below by taking a concrete application scene as an example, the inside of the K song processing units in the present embodiment is transported
It is described as flow:
Receiving unit 301 receives K songs request input by user;Acquiring unit 302 sings acquisition request song according to the K
Accompaniment audio file, original singer's audio file and corresponding lyrics file, wherein, the lyrics file includes identifying the lyrics
Show the temporal information of time;Processing unit 303 carries out division processing to the lyrics file, obtains the first lyrics por-tion and
Two lyrics por-tions, and play the accompaniment audio file in the first lyrics por-tion corresponding display time and record user's
Audio data plays original singer's audio file in the display time of the second lyrics por-tion.
In technical solution provided in an embodiment of the present invention, the acquiring unit 302 of client is received by receiving unit 301
It is sung to K input by user when asking, the accompaniment audio file of acquisition request song, original singer's audio file and right is sung according to the K
The lyrics file answered, wherein, which includes identifying the temporal information that the lyrics show the time;Then by processing unit
303 pairs of lyrics files carry out division processing, obtain the first lyrics por-tion and the second lyrics por-tion, and in the first lyrics por-tion pair
The display time answered plays accompaniment audio file and records the audio data of user, is played in the display time of the second lyrics por-tion
Original singer's audio file;Again to the above-mentioned audio data through recording obtained user and accompaniment audio file in the first lyrics por-tion pair
The audio data of display time answered carries out stereo process, obtains target audio file, and corresponding aobvious in the first lyrics por-tion
Show that the time exports target audio file, in the corresponding display time output original singer's audio file of the second lyrics por-tion, closed with generating
Sing file.Therefore relative to the prior art, client is carrying out division processing to lyrics file in the embodiment of the present invention, obtains the
After one lyrics por-tion and the second lyrics por-tion, only accompaniment audio file and record are played in the first lyrics por-tion corresponding display time
The audio data of user processed, and original singer's audio file is played in the second lyrics por-tion corresponding display time, thus, it is possible to realize
A part is sung in the display time of the first lyrics por-tion by user, the second lyrics por-tion the display time by star original singer,
Experience is sung so as to fulfill the K to chorus with star.
Optionally, in the present embodiment, the K songs processing unit can also include:
Stereo process unit 304, for the audio data to the user and the accompaniment audio file described first
The audio data of lyrics por-tion corresponding display time carries out stereo process, obtains target audio file;
Generation unit 305, for exporting the target audio file in the first lyrics por-tion corresponding display time,
Original singer's audio file is exported in the second lyrics por-tion corresponding display time, to generate chorus file.
Optionally, in the present embodiment, the receiving unit 301 is additionally operable to receive the division instruction of the user;It is described
Processing unit 303 specifically for carrying out division processing to the lyrics file according to the division instruction, obtains the first lyrics portion
Divide and the second lyrics por-tion.
Optionally, in the present embodiment, the processing unit 303, specifically for having detected whether voice input, if so,
The lyrics file is then divided into the first lyrics por-tion, and play the accompaniment tone in the corresponding lyrics por-tion shown in the time
Frequency file and the audio data for recording user, if it is not, then drawing the lyrics file in the corresponding lyrics por-tion shown in the time
It is divided into the second lyrics por-tion, and plays original singer's audio file.
Optionally, in the present embodiment, the K songs processing unit can also include:
Unit is identified, for setting first flag to the first lyrics por-tion for being shown in the client, to being shown in
State the second lyrics por-tion setting second identifier of client.
Optionally, in the present embodiment, the K songs processing unit can also include:
Balance Treatment unit, for being balanced processing in the audio data of switching point to the chorus file, wherein, institute
Switching point is stated to refer to by the corresponding display time-switching of first lyrics por-tion to the second lyrics por-tion corresponding display time
When time point or display corresponding to first lyrics por-tion by the corresponding display time-switching of second lyrics por-tion
Between time point.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit can refer to the corresponding process in preceding method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit
It divides, only a kind of division of logic function can have other dividing mode, such as multiple units or component in actual implementation
It may be combined or can be integrated into another system or some features can be ignored or does not perform.Another point, it is shown or
The mutual coupling, direct-coupling or communication connection discussed can be the indirect coupling by some interfaces, device or unit
It closes or communicates to connect, can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separate, be shown as unit
The component shown may or may not be physical unit, you can be located at a place or can also be distributed to multiple
In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme
's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also
That each unit is individually physically present, can also two or more units integrate in a unit.Above-mentioned integrated list
The form that hardware had both may be used in member is realized, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and is independent product sale or uses
When, it can be stored in a computer read/write memory medium.Based on such understanding, technical scheme of the present invention is substantially
The part to contribute in other words to the prior art or all or part of the technical solution can be in the form of software products
It embodies, which is stored in a storage medium, is used including some instructions so that a computer
Equipment (can be personal computer, server or the network equipment etc.) performs the complete of each embodiment the method for the present invention
Portion or part steps.And aforementioned storage medium includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey
The medium of sequence code.
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to before
Embodiment is stated the present invention is described in detail, it will be understood by those of ordinary skill in the art that:It still can be to preceding
The technical solution recorded in each embodiment is stated to modify or carry out equivalent replacement to which part technical characteristic;And these
Modification is replaced, the spirit and scope for various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution.