CN108109634B - Song pitch generation method, device and equipment - Google Patents

Song pitch generation method, device and equipment Download PDF

Info

Publication number
CN108109634B
CN108109634B CN201711353128.6A CN201711353128A CN108109634B CN 108109634 B CN108109634 B CN 108109634B CN 201711353128 A CN201711353128 A CN 201711353128A CN 108109634 B CN108109634 B CN 108109634B
Authority
CN
China
Prior art keywords
song
lyric
pitch
lyrics
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711353128.6A
Other languages
Chinese (zh)
Other versions
CN108109634A (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.)
Guangzhou Kugou Computer Technology Co Ltd
Original Assignee
Guangzhou Kugou Computer Technology 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 Guangzhou Kugou Computer Technology Co Ltd filed Critical Guangzhou Kugou Computer Technology Co Ltd
Priority to CN201711353128.6A priority Critical patent/CN108109634B/en
Publication of CN108109634A publication Critical patent/CN108109634A/en
Application granted granted Critical
Publication of CN108109634B publication Critical patent/CN108109634B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/90Pitch determination of speech signals
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/48Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use
    • G10L25/51Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use for comparison or discrimination

Landscapes

  • Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Reverberation, Karaoke And Other Acoustics (AREA)

Abstract

The application relates to a method, a device and equipment for generating song pitches, and belongs to the technical field of computers. The method comprises the following steps: acquiring lyric information of a first song and lyric information of a second song; acquiring the integral similarity of the first song and the second song according to the lyric information of the first song and the lyric information of the second song; when the overall similarity of the songs meets a first preset condition, acquiring a time deviation value of the lyrics corresponding to each group in the first song and the second song; determining pitch information for each sentence of lyrics of the second song based on the pitch information for each sentence of lyrics of the first song and the time offset value. The pitch information of the second song is determined according to the pitch information of the first song and the time offset value. Because the pitch information of the second song is automatically generated according to the pitch information of the first song, manual extraction is not needed, the labor cost is saved, the time consumption for acquiring the pitch information can be reduced, and the efficiency for acquiring the pitch information is improved.

Description

Song pitch generation method, device and equipment
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a method, a device and equipment for generating song pitches.
Background
When a user plays a song with music playing software or sings a song with song ordering software, the music playing software or song ordering software usually displays the pitch of the song lyrics, so that the user can know the tone trend of the song conveniently.
In the related art, when displaying the pitch of the lyrics of a song, pitch information of the song needs to be acquired first. The pitch information includes a pitch value corresponding to each sentence of lyrics. Typically, the same song will usually have multiple versions, e.g., a song being sung by multiple singers. Pitch information of one version cannot be applied to other versions of the same song due to differences between the different versions. Thus, each time a new version of a song appears, pitch information for that version needs to be retrieved. For a new version of song that needs to obtain pitch information again, a manual extraction mode is usually adopted to obtain the pitch information of the lyrics word by word.
In the related technology, the pitch information of the song lyrics is acquired word by adopting a manual extraction mode for the new edition of song, so that excessive time and labor cost are consumed for acquiring the pitch information of the new edition of song.
Disclosure of Invention
The embodiment of the application provides a method, a device and equipment for generating a song pitch, which can be used for solving the problem that excessive time and labor cost are consumed when pitch information of a new version of song is acquired. The technical scheme is as follows:
in a first aspect, a method for generating a pitch of a song is provided, the method comprising:
acquiring lyric information of a first song and lyric information of a second song;
acquiring the song overall similarity of the first song and the second song according to the lyric information of the first song and the lyric information of the second song;
when the overall similarity of the songs meets a first preset condition, acquiring a time offset value of the lyrics corresponding to each group in the first song and the second song;
determining pitch information of each lyric of the second song according to the pitch information and a time offset value of each lyric of the first song, wherein the pitch information of each lyric comprises: a start timestamp of the pitch, a duration of the pitch, and a pitch value.
In a second aspect, there is provided an apparatus for generating a pitch of a song, the apparatus comprising:
the lyric obtaining module is used for obtaining the lyric information of the first song and the lyric information of the second song;
the similarity obtaining module is used for obtaining the overall similarity of the first song and the second song according to the lyric information of the first song and the lyric information of the second song;
the time obtaining module is used for obtaining a time deviation value of the corresponding lyrics of each group in the first song and the second song when the overall similarity of the songs meets a first preset condition;
a pitch determining module, configured to determine pitch information of each lyric of the second song according to the pitch information of each lyric of the first song and a time offset value, where the pitch information of each lyric includes: a start timestamp of the pitch, a duration of the pitch, and a pitch value.
In a third aspect, there is provided a computer device comprising a processor and a memory having stored therein a computer program which, when loaded and executed by the processor, implements the method of generating a pitch of a song according to the first aspect.
In a fourth aspect, there is provided a computer readable storage medium having stored therein a computer program which is loaded and executed by a processor to implement the method of generating a pitch of a song according to the first aspect.
In a fifth aspect, there is provided a computer program product for performing the method of generating a pitch of a song according to the first aspect when the computer program product is executed.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
after the integral similarity of the songs is determined to meet the first preset condition, the time deviation value of each group of corresponding lyrics in the first song and the second song is obtained, so that the pitch information of each sentence of lyrics in the second song can be determined according to the pitch information and the time deviation value of each sentence of lyrics in the first song. Because the computer equipment automatically generates the pitch information of the second song according to the pitch information of the first song, compared with a manual extraction mode, manual extraction is not needed, the labor cost is saved, the time consumption for acquiring the pitch information of a new version of song can be reduced, and the efficiency for acquiring the pitch information is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
FIG. 1 is a flow diagram illustrating a method for generating song pitches in accordance with an exemplary embodiment;
FIG. 2 is a flow diagram illustrating a method for generating song pitches in accordance with another exemplary embodiment;
FIG. 3 is a block diagram illustrating an apparatus for generating pitches of a song in accordance with an exemplary embodiment;
FIG. 4 is a schematic diagram illustrating a configuration of a computer device, according to an example embodiment.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
In the method provided by the embodiment of the present application, the execution subject of each step may be a Computer device, for example, the Computer device may be a PC (Personal Computer), a server, or a mobile phone. For convenience of explanation, in the following method embodiments, only the execution subject of each step is described as a computer device, but the present invention is not limited thereto.
Referring to fig. 1, a flowchart of a method for generating a pitch of a song according to an embodiment of the present application is shown. The method may include the steps of:
step 101, obtaining lyric information of a first song and lyric information of a second song.
The first song and the second song are different versions of the same song. The versions may be different in singers, or the singers may be the same but have different singing places, and the embodiment of the present application is not particularly limited to specific types of versions. Illustratively, the first song is song a singing in zhang and the second song is song a singing in lie, and the singer of the first song is different from the singer of the second song. Or the first song is song a sung in album by zhang san, the second song is song a sung at concert by zhang san, and the sung places of the first song and the second song are different. Further, the pitch information of the first song is already determined, while the pitch information of the second song is not yet determined.
When the computer device obtains the lyric information of the first song, pitch information of the first song is also obtained. Wherein the pitch information includes: a start timestamp of the pitch, a duration of the pitch, and a pitch value. The start time stamp of the pitch is used to indicate the start time of the pitch of the lyric of the sentence. The pitch information of the first song may include pitch information of each sentence of lyrics and may further include pitch information of each word in the lyrics. Illustratively, the start time indicated by the start time stamp for the pitch of a sentence of lyrics is 1:00, the duration of the pitch is 2 seconds, and the pitch value is c4The singer begins singing the lyrics at 1:00 of the song with the pitch value of c4And after 2 seconds, singing of the lyrics of the sentence is finished at 1: 02. It should be noted that the lyrics of a sentence or the pitch value of a word in the lyrics may be fixed or may change within the duration. For example, the duration of the pitch of a lyric is 2 seconds, and the pitch value of the 1 st second is c4The pitch value at 2 s is d4
Optionally, the lyric information includes: the starting timestamp, duration and lyric content of each sentence of lyrics. The start time stamp of the lyrics is used to indicate the start time of the lyrics of the sentence.
And 102, acquiring the integral similarity of the first song and the second song according to the lyric information of the first song and the lyric information of the second song.
The computer device can calculate the duration of all lyrics according to the starting time stamp of the first lyric, the starting time stamp of the last lyric and the duration of the last lyric included in the lyric information. And the computer equipment adds the starting time indicated by the starting timestamp of the last lyric to the duration of the last lyric to obtain the ending time of the last lyric. And the computer equipment subtracts the starting time indicated by the starting time stamp of the first lyric from the ending time of the last lyric to obtain the duration of all the lyrics. The computer equipment acquires the song overall similarity of the first song and the second song according to the duration of all lyrics of the first song, the duration of all lyrics of the lyrics content of the first song and all lyrics of the second song, and the lyrics content of the first song and all lyrics of the second song.
Optionally, the step 102 includes the following sub-steps:
1. and determining the content similarity of the first song and the second song according to the lyric content of the first song and the lyric content of the second song.
The content similarity of songs refers to the similarity of two songs on the content of lyrics. The computer device determines the number of words of the same lyrics between the first song and the second song based on the lyric content of the first song and the lyric content of the second song, determines the song with the lower number of words of the lyrics in the first song and the second song, and takes the number of words of the lyrics of the song as the total number of words. The computer device divides the number of words of the same lyric by the total number of words to obtain a content similarity of the first song and the second song. Illustratively, the lyric content of the first song is: no o is done today, so it is good at happy. The lyric content of the second song is: today, there is no exercise and there is a good mind. If the word number of the same lyric is 9 and the total word number is 10, the content similarity is 0.9.
2. And determining the time length similarity of the first song and the second song according to the duration of all the lyrics of the first song and the duration of all the lyrics of the second song.
The time length similarity of songs refers to the similarity of the duration of all lyrics of two songs.
In one possible embodiment, the computer device calculates a second absolute value of the difference between the duration of all lyrics of the first song and the duration of all lyrics of the second song, the second absolute value having a negative correlation with the degree of similarity of the duration of all lyrics. The larger the second absolute value is, the lower the degree of similarity is; the smaller the second absolute value, the higher the degree of similarity.
In another possible embodiment, the computer device divides a shorter duration of the durations of all the lyrics of the first song and all the lyrics of the second song by a longer duration to obtain a duration ratio of all the lyrics. The time length ratio of all the lyrics is in positive correlation with the similarity of the duration of all the lyrics. The larger the time length ratio of all the lyrics is, the higher the similarity is; the smaller the time ratio of all lyrics, the lower the degree of similarity.
By the method for determining the content similarity and the duration similarity of the songs, the accuracy of the overall similarity of the acquired first song and the second song can be ensured.
And 103, when the overall similarity of the songs meets a first preset condition, acquiring a time offset value of the lyrics corresponding to each group in the first song and the second song.
After the computer equipment acquires the overall similarity of the first song and the second song, whether the overall similarity of the songs meets a first preset condition or not is detected. The first preset condition may be set according to practical experience. When the overall similarity of the songs meets a first preset condition, the computer equipment determines that the first song and the second song are similar, and then the pitch information of the second song can be generated through the pitch information of the first song. And when the overall similarity of the songs does not meet the first preset condition, the computer equipment determines that the first song and the second song are not similar, the pitch information of the second song cannot be generated through the pitch information of the first song, and the process is ended. For example, the first song is song a sung by zhang san and the second song is song a sung by lie si, but lie si rewrites the lyrics and the melody. At this time, the first song and the second song are not similar, and the pitch information of the second song cannot be generated by the pitch information of the first song.
Optionally, when the overall similarity of the songs includes content similarity of the songs and duration similarity of the songs, the first preset condition is that the content similarity of the songs is greater than a first threshold, and the duration similarity of the songs is greater than a second threshold. Both the first threshold and the second threshold may be set empirically.
The first song and the second song are different versions of the same song, and the overall similarity of the songs meets a first preset condition, so that the corresponding relation exists between the lyrics of the first song and the lyrics of the second song. And when the overall similarity of the songs meets a first preset condition, the computer equipment acquires the time offset value of the corresponding lyrics of each group in the first song and the second song. The time offset value refers to a time difference of the start time of each group of corresponding lyrics. Because the first song and the second song are different versions of the same song, although the overall similarity of the songs meets the first preset condition, the starting time of the corresponding lyrics of each group may be different. For example, the first song is song a sung by zhang san and the second song is song a sung by lie san. When Zusanli starts singing the first lyrics at 1:00 of the song and Liqu starts singing the first lyrics at 1:02 of the song, the time offset value of the corresponding first lyrics in the first song and the second song is 2 seconds. It should be noted that the time offset value of the lyrics corresponding to each group may be the same or different.
And 104, determining the pitch information of each sentence of lyrics of the second song according to the pitch information of each sentence of lyrics of the first song and the time offset value.
Since the start time stamp of each lyric corresponds to the start time stamp of the pitch of the lyric, the start time stamp of the pitch of the lyric changes when the start time stamp of a lyric of the second song is changed compared to the start time stamp of the corresponding lyric in the first song. The value of the start timestamp change of the pitch is the same as the value of the lyric start timestamp change, i.e. the time offset value. Thus, the computer device is able to determine pitch information for each sentence of lyrics of the second song based on the pitch information for each sentence of lyrics of the first song and the time offset value described above.
Optionally, the step 104 includes the following sub-steps:
1. for a kth lyric of the second song, a start timestamp of a pitch of the kth lyric of the second song is calculated based on a start timestamp of a pitch of a target lyric of the first song and the time offset value.
The target lyrics refer to a lyric corresponding to the kth lyric in the first song, and k is a positive integer. Because the value of the start timestamp variation of the pitch is the same as the value of the lyric start timestamp variation, the computer device adds the start timestamp of the pitch of the target lyric of the first song to the time offset values of the kth lyric and the target lyric to obtain the start timestamp of the pitch of the kth lyric.
Optionally, after determining the start time of the pitch of the kth lyric, the computer device detects whether a start timestamp of the pitch of the kth lyric is greater than a start timestamp of the pitch of any one of k-1 lyrics before the second song. If not, the computer equipment determines that the pitch information of the second song cannot be determined according to the pitch information of the first song, and the process is ended; if yes, the process is continued.
2. And determining the duration of the pitch of the target lyric as the duration of the pitch of the kth lyric.
Since the target lyric and the kth lyric are corresponding lyrics in different versions of the same song, the duration of the pitch is the same even though the start time of the pitch is different. Thus, the computer device can directly determine the duration of the pitch of the target lyric as the duration of the pitch of the kth lyric.
It should be noted that the lyrics of the second song may be different from the lyrics of the first song due to the typesetting problem. Illustratively, in a first song, "goodbye to goodbye" is a single lyric, while in a second song the lyric is laid out as two lyrics: the appearance and the reiteration of the Chinese characters are realized. At this point, the computer device treats "coming reprint" and "coming" as a set of corresponding lyrics, while "reprint" has no corresponding lyrics. The computer device determines the duration of the "coming" pitch, which is still used, but cannot determine the pitch information of the "coming again". But since in the second song "coming and going again" is taken as two words of lyrics just because of the typesetting problem, "coming and going again" is still played continuously while playing. Therefore, the computer device may continue to use the pitch information of "coming again and again" when the "coming" play ends.
3. And determining the pitch value of the kth lyric according to the pitch value of the target lyric.
Since the target lyric and the kth lyric are a set of corresponding lyrics, the computer device is able to determine a pitch value of the kth lyric based on the pitch value of the target lyric.
In one possible embodiment, the computer device directly takes the pitch value of the target lyric as the pitch value of the kth lyric. Illustratively, the first song and the second song are two versions of the same singer but having different singing places. Since the singer is the same person and the pitch value does not change, the computer device directly takes the pitch value of the target lyric as the pitch value of the kth lyric.
In another possible embodiment, the pitch value of the target lyric and the pitch value of the k-th lyric are different, for example, the singer of the first song is male and the singer of the second song is female, and the pitch values may vary due to the difference in sound between male and female. In this case, the computer device analyzes the vocal audio of the second song, determines a pitch value of at least one lyric of the second song, and determines a pitch difference between the first song and the second song based on the pitch value of the at least one lyric and a pitch value of the at least one lyric in the first song. Finally, the computer device adds the pitch difference value to the pitch value of the target lyric to obtain the pitch value of the kth lyric. The computer device may determine a pitch difference value from a lyric, such as the first word in the lyric. The computer device may also determine a pitch difference value of the plurality of lyrics, and then calculate an average value of the pitch difference values of the plurality of lyrics as a final pitch difference value to ensure the accuracy of the pitch difference value.
By the above manner of determining the starting timestamp, the duration and the pitch value of the pitch, the pitch information of each sentence of lyrics of the second song can be accurately generated according to the pitch information of each sentence of lyrics of the first song.
In the embodiment of the application, after the overall similarity of the songs is determined to meet the first preset condition, the time offset value of each group of corresponding lyrics in the first song and the second song is obtained, so that the pitch information of each sentence of lyrics in the second song can be determined according to the pitch information and the time offset value of each sentence of lyrics in the first song. Because the computer equipment automatically generates the pitch information of the second song according to the pitch information of the first song, compared with a manual extraction mode, manual extraction is not needed, the labor cost is saved, the time consumption for acquiring the pitch information of a new version of song can be reduced, and the efficiency for acquiring the pitch information is improved.
Referring to fig. 2, a flowchart of a method for generating a pitch of a song according to another embodiment of the present application is shown. The method may include the steps of:
step 201, a lyric file of a first song and a lyric file of a second song are obtained.
The lyric file of the first song comprises p sentences, the lyric file of the second song comprises q sentences, and p and q are positive integers. The lyric file of a song includes a plurality of sentences and a start time stamp for each sentence. The sentence content of the plurality of sentences included in the lyric file is the text content that the computer device is displaying when playing the song, including lyric content and other content. Other content refers to text content other than lyrics, such as the name of album of the song, the name of singer, the name of writer and the name of composer, etc. The other content is typically located at the beginning or end of a plurality of sentences included in the lyric file. The lyric file also includes sentence information for each sentence, which includes a start time stamp, duration, and sentence content for each sentence. When one sentence is the lyric of the song, the sentence information is the lyric information.
In step 202, the lyric file of the first song is determined to be the lyric of the 1 st sentence and the lyric of the last sentence of the first song.
To acquire lyric information of a first song, a computer device needs to determine a sentence content as a sentence of the lyric content from p sentences included in a lyric file of the first song. Since the lyrics of a song are continuous, the above-mentioned other contents do not appear in the middle of the lyrics. Therefore, in the lyric file of the first song, the sentence information of all sentences from the 1 st to the last lyric of the first song is the lyric information of the first song.
The computer device acquires respective start time stamps of p sentences from the lyric file of the first song, and calculates a first absolute value of a difference between a start time stamp of a pitch of a 1 st sentence of lyrics in the pitch information of the first song and a start time stamp of each sentence in the lyric file of the first song. Finally, the computer device selects the sentence with the smallest first absolute value and determines the sentence as the 1 st lyric of the first song. The sentence with the first minimum absolute value is the sentence with the starting time stamp closest to the starting time stamp of the pitch of the 1 st lyric in the pitch information, and the sentence with the first minimum absolute value is determined to be the 1 st lyric of the first song because the starting time stamp of each lyric corresponds to the starting time stamp of the pitch of the lyric.
The computer device calculates a second absolute value of a difference between a start time stamp of a pitch of a last sentence of lyrics in the pitch information of the first song and a start time stamp of each sentence in the lyric file of the first song, on the same principle as the above-described determination of the 1 st sentence of lyrics of the first song. Finally, the sentence with the minimum second absolute value is selected and determined as the last lyric of the first song.
The computer device can obtain lyric information of the first song according to the lyric of the 1 st sentence and the lyric of the last sentence of the first song in p sentences included in the lyric file of the first song.
Step 203, determining the lyric of the 1 st sentence and the lyric of the last sentence of the second song from the lyric file of the second song.
Since the pitch information of the first sentence of lyrics of the second song has not been determined, the computer device cannot determine the 1 st and last sentences of lyrics of the second song by determining the 1 st and last sentences of lyrics of the first song.
For the 1 st lyric of the second song, the computer device calculates a first matching degree of the 1 st to 1+ w lyrics of the first song and the s to s + w sentence information in the lyric file of the second song according to the lyric information of the 1 st to 1+ w lyrics of the first song and the s information of the s to s + w sentences, wherein the initial value of s is 1, and w is a positive integer. The first matching degree may be a content similarity between the lyrics of the 1 st to 1+ w th sentences of the lyrics of the first song and the sentences of the s th to s + w th sentences in the lyrics file of the second song. Specifically, the computer device determines the number of words of the same content between the lyrics contents of the 1 st sentence to the 1 st + w sentence of lyrics of the first song and the contents of the s th sentence to the s + w sentence in the lyric file of the second song, determines the number of words of the respective contents of the two, and takes the smaller number of words as the total number of words. The computer device divides the number of words of the same content by the total number of words to obtain a first degree of match.
If the first matching degree is smaller than a first threshold value, making s be s +1, and the computer equipment calculates the first matching degree of the first song and the second song according to the lyric information of the 1 st sentence to the 1+ w th sentence of the lyric of the first song and the sentence information of the s th sentence to the s + w th sentence in the lyric file of the second song again, and detects whether the first matching degree is smaller than the first threshold value; and if the first matching degree is larger than a first threshold value, determining that the s sentence is the 1 st lyric of the second song. The first threshold value may be set according to practical experience. The computer equipment matches the continuous w +1 sentences in the lyric file of the second song with the lyrics of the 1 st sentence to the 1 st + w sentence of the first song in turn from the 1 st sentence to the 1 st + w sentence in the lyric file of the second song until the s to s + w sentences of which the first matching degree is greater than the first threshold value are determined. At this time, the s-th sentence is the 1 st lyric of the second song. Illustratively, the first song has 10 lyrics, and the second song has 12 sentences in the lyric file, wherein the contents of the 1 st and 2 nd sentences are the song name and the singer, and the 3 rd to 12 th sentences are the lyrics corresponding to the 10-sentence lyrics of the first song. The computer device calculates a first matching degree of the 1 st to 2 nd sentences in the lyric file of the second song and the lyrics of the first two sentences of the first song, and determines that the first matching degree is smaller than a first threshold value. The computer device calculates a first matching degree of the 2 nd to 3 rd sentences in the lyric file of the second song with the lyrics of the first two sentences of the first song, and the first matching degree is still smaller than a first threshold value. The computer device further calculates a first matching degree of the 3 rd to 4 th sentences in the lyric file of the second song with the lyrics of the first two sentences of the first song, and determines that the first matching degree is greater than a first threshold value. Finally, the computer device takes the 3 rd sentence in the lyric file of the second song as the 1 st sentence lyric of the second song.
For the last lyric of the second song, the principle is the same as that of determining the 1 st lyric of the first song, and the computer device calculates the second matching degree of the two according to the lyric information of the last x lyrics of the first song and the sentence information of the q-x-1 to the q sentences in the lyric file of the second song, wherein x is a positive integer. If the second matching degree is smaller than a second threshold value, q is made to be q-1, and the computer equipment calculates the second matching degree of the two according to the lyric information of the lyric of the last x sentences of the first song and the sentence information of the q-x-1 to the q-th sentences in the lyric file of the second song again, and detects whether the second matching degree is smaller than the second threshold value; if the second matching degree is larger than the second threshold value, the computer equipment determines that the qth sentence is the lyric of the last sentence of the second song. The second threshold may be set according to practical experience, and may be the same as the first threshold or different from the first threshold.
The computer device can obtain lyric information of the second song from the 1 st and last lyrics of the second song among the q sentences included in the lyric file of the second song.
Optionally, the computer device detects whether the lyric content has a colon when acquiring the lyric content of each sentence of lyrics. If yes, the computer device takes the content after the colocation as the lyric content of the lyric of the sentence. Because, when a colon occurs in a lyric, the content before the colon is usually not the lyric content. For example, a song is composed of two singers, male and female, and in this case, a "male: "or" woman: "is used to indicate the singer of the lyric of the sentence, and the content after the colon is the lyric content.
By the method, the computer equipment can accurately acquire the lyric information from the lyric file, and interference caused by other contents in the lyric file on acquisition of subsequent pitch information is avoided.
And 204, acquiring the integral similarity of the first song and the second song according to the lyric information of the first song and the lyric information of the second song.
Step 204 is the same as step 102 in the embodiment provided in fig. 1, please refer to the embodiment in fig. 1 for details, which will not be described again in this embodiment.
Step 205, when the overall similarity of the songs meets a first preset condition, acquiring a time offset value of the lyrics corresponding to each group in the first song and the second song.
After the computer equipment acquires the overall similarity of the first song and the second song, whether the overall similarity of the songs meets a first preset condition or not is detected. And when the overall similarity of the songs does not accord with the first preset condition, the computer equipment determines that the pitch information of the second song can not be generated through the pitch information of the first song, and the process is ended. When the integral similarity of the songs accords with a first preset condition, the computer equipment obtains the integral similarity of the lyrics of the ith sentence of the first song and the lyrics of the jth sentence of the second song, the initial value of i is 1, and the initial value of j is 1.
Optionally, the overall lyric similarity includes: content similarity and duration similarity of the lyrics. The content similarity of the lyrics refers to the similarity of two sentences of lyrics on the content of the lyrics. The computer device determines the number of words of the same lyrics between two words of lyrics, and then one lyric of which the number of words is smaller among the two words of lyrics, and takes the number of words of the one lyric as the total number of words. The computer device divides the number of words of the same lyrics by the total number of words to obtain a content similarity of two sentences of lyrics. The time length similarity of the lyrics refers to the similarity of the duration lengths of two sentences of lyrics. The computer equipment can obtain the time length similarity by calculating a third absolute value of the difference value of the duration of the two sentences of lyrics, and also can obtain the time length similarity by calculating the time length ratio of the two sentences of lyrics.
If the integral similarity of the lyrics does not meet the second preset condition, the computer equipment determines that the ith lyric of the first song and the jth lyric of the second song are not corresponding lyrics, and makes j equal to j +1, and obtains the integral similarity of the ith lyric of the first song and the jth lyric of the second song again, namely determines whether the ith lyric of the first song corresponds to the next lyric in the second song.
And if the integral similarity of the lyrics meets a second preset condition, the computer equipment determines that the ith lyric corresponds to the jth lyric. After determining that the ith lyric and the jth lyric are a group of corresponding lyrics, the computer equipment determines the time offset values of the ith lyric and the jth lyric according to the starting time stamp of the ith lyric and the starting time stamp of the jth lyric.
After determining the time offset value of a group of corresponding lyrics, the computer device makes i equal to i +1 and j equal to j +1, and obtains the overall similarity of the ith lyric of the first song and the jth lyric of the second song again, namely, the computer device searches for the lyrics corresponding to the next lyric of the first song from the next lyric of the second song. Illustratively, the computer device determines that the 1 st lyric of the first song is a set of corresponding lyrics to the 1 st lyric of the second song, the computer device determines the lyrics of the second song from the 2 nd lyric to the last lyric corresponding to the 2 nd lyric of the first song.
When i +1 or j +1, the computer device stops acquiring the time offset value of each group of corresponding lyrics in the first song and the second song. When i +1, it indicates that the computer device has traversed through each lyric of the first song. Where a denotes the total number of sentences included in the lyric information of the first song. When j equals b +1, the computer device has traversed through each lyric of the second song. Where b denotes the total number of sentences included in the lyric information of the second song. a. b is a positive integer.
Optionally, when the overall similarity of the lyrics includes content similarity and duration similarity of the lyrics, the second preset condition is that the content similarity of the lyrics is greater than a third threshold, and the duration similarity of the lyrics is greater than a fourth threshold. Both the third threshold and the fourth threshold may be set according to practical experience.
Optionally, for the same lyric in the first song, if the number of times that the computer device executes the step of obtaining the overall similarity of the lyrics of the ith lyric of the first song and the lyrics of the jth lyric of the second song is greater than a preset number of times, the computer device determines that the first song and the second song are dissimilar, and cannot generate the pitch information of the second song through the pitch information of the first song, and the process is ended. The preset times can be set according to actual experience.
Step 206, determining the pitch information of each sentence of lyrics of the second song according to the pitch information of each sentence of lyrics of the first song and the time offset value.
Step 206 is the same as step 103 in the embodiment provided in fig. 1, please refer to the embodiment in fig. 1 for details, which will not be described again in this embodiment.
In the embodiment of the application, after the overall similarity of the songs is determined to meet the first preset condition, the time offset value of each group of corresponding lyrics in the first song and the second song is obtained, so that the pitch information of each sentence of lyrics in the second song can be determined according to the pitch information and the time offset value of each sentence of lyrics in the first song. Because the computer equipment automatically generates the pitch information of the second song according to the pitch information of the first song, compared with a manual extraction mode, manual extraction is not needed, the labor cost is saved, the time consumption for acquiring the pitch information of a new version of song can be reduced, and the efficiency for acquiring the pitch information is improved.
In addition, the time offset value of each group of corresponding lyrics is accurately obtained in a mode of detecting the integral similarity of the lyrics one by one, so that the pitch information of each lyric of the second song can be accurately generated.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 3, a block diagram of an apparatus for generating pitches of songs according to an embodiment of the present application is shown. The device has the function of realizing the generation method of the song pitch in the embodiment, and the function can be realized by hardware or by hardware executing corresponding software. The apparatus may include: a lyric acquisition module 301, a similarity acquisition module 302, a time acquisition module 303, and a pitch determination module 304.
The lyric obtaining module 301 is configured to obtain lyric information of the first song and lyric information of the second song.
A similarity obtaining module 302, configured to obtain overall similarity between the first song and the second song according to the lyric information of the first song and the lyric information of the second song.
A time obtaining module 303, configured to obtain a time offset value of a lyric corresponding to each group in the first song and the second song when the overall similarity of the songs meets a first preset condition.
A pitch determining module 304, configured to determine pitch information of each lyric of the second song according to the pitch information of each lyric of the first song and the time offset value, where the pitch information of each lyric includes: a start timestamp of the pitch, a duration of the pitch, and a pitch value.
In the embodiment of the application, after the overall similarity of the songs is determined to meet the first preset condition, the time offset value of each group of corresponding lyrics in the first song and the second song is obtained, so that the pitch information of each sentence of lyrics in the second song can be determined according to the pitch information and the time offset value of each sentence of lyrics in the first song. Because the computer equipment automatically generates the pitch information of the second song according to the pitch information of the first song, compared with a manual extraction mode, manual extraction is not needed, the labor cost is saved, the time consumption for acquiring the pitch information of a new version of song can be reduced, and the efficiency for acquiring the pitch information is improved.
Optionally, the pitch determination module 304 is configured to: calculating a starting time stamp of the pitch of the kth lyric of the second song according to the starting time stamp of the pitch of the target lyric of the first song and a time offset value, wherein the target lyric is a lyric corresponding to the kth lyric in the first song, and k is a positive integer; and determining the duration of the pitch of the target lyrics as the duration of the pitch of the kth lyric. And determining the pitch value of the kth lyric according to the pitch value of the target lyric.
Optionally, the pitch determination module 304 is configured to: analyzing the human voice audio of the second song to determine a pitch value of at least one lyric of the second song; determining a pitch difference value of the first song and the second song according to a pitch value of the at least one lyric and a pitch value of the at least one lyric in the first song; and determining the pitch value of the kth lyric according to the pitch value of the target lyric and the pitch difference value.
Optionally, the similar obtaining module 302 is configured to: and acquiring the integral similarity of the ith lyric of the first song and the jth lyric of the second song, wherein the initial value of i is 1, and the initial value of j is 1. The time obtaining module 303 is configured to: when the integral similarity of the lyrics does not meet a second preset condition, making j equal to j +1, and starting to execute the step of obtaining the integral similarity of the ith lyric of the first song and the jth lyric of the second song again; when the integral similarity of the lyrics meets the second preset condition, determining that the ith lyric corresponds to the jth lyric; determining time deviation values of the ith lyric and the jth lyric according to the starting time stamp of the ith lyric and the starting time stamp of the jth lyric; and making i +1, j +1, and starting execution from the step of obtaining the overall similarity of the lyrics of the ith sentence of the first song and the jth lyric of the second song again until i +1 or j +1, ending the process, wherein a represents the total number of sentences included in the lyric information of the first song, b represents the total number of sentences included in the lyric information of the second song, and a and b are both positive integers.
Optionally, the lyric information includes: the starting timestamp, duration and lyric content of each sentence of lyrics. The similar obtaining module 302 is configured to: determining the content similarity of the first song and the second song according to the lyric content of the first song and the lyric content of the second song; determining the time length similarity of the first song and the second song according to the time length of all the lyrics of the first song and the time length of all the lyrics of the second song; wherein the overall similarity of the songs comprises the content similarity and the duration similarity.
Optionally, the similar obtaining module 302 is configured to: acquiring the word number of the same lyrics in the first song and the second song according to the lyric content of the first song and the lyric content of the second song; calculating to obtain the content similarity according to the word number and the total word number of the same lyrics; wherein the total word count is the word count of the second song when the word count of the lyrics of the first song is greater than the word count of the lyrics of the second song; when the word number of the lyrics of the first song is less than the word number of the lyrics of the second song, the total word number is the word number of the first song; when the word count of the lyrics of the first song is equal to the word count of the lyrics of the second song, the total word count is the word count of the first song or the second song.
Optionally, the lyric acquiring module 301 is further configured to: acquiring a lyric file of the first song and a lyric file of the second song, wherein the lyric file of the first song comprises p sentences, the lyric file of the second song comprises q sentences, and both p and q are positive integers; determining the 1 st lyric and the last lyric of the first song from the lyric file of the first song; and determining the 1 st sentence lyric and the last sentence lyric of the second song from the lyric file of the second song.
Optionally, the lyric acquiring module 301 is configured to: calculating a first absolute value of a difference value between a start time stamp of a pitch of a 1 st sentence of lyrics in the pitch information of the first song and a start time stamp of each sentence in a lyric file of the first song; selecting the sentence with the minimum first absolute value, and determining the sentence as the 1 st lyric of the first song; and calculating a second absolute value of a difference between a start time stamp of a pitch of a last sentence of lyrics in the pitch information of the first song and a start time stamp of each sentence in the lyric file of the first song; and selecting the sentence with the minimum second absolute value, and determining the sentence as the last lyric of the first song.
Optionally, the lyric acquiring module 301 is configured to: calculating a first matching degree of the lyrics information of the 1 st sentence to the 1+ w th sentence of the lyrics of the first song and the sentence information of the s th sentence to the s + w th sentence in the lyric file of the second song, wherein the initial value of s is 1, and w is a positive integer; when the first matching degree is smaller than a first threshold value, making s equal to s +1, and executing the step of calculating the first matching degree of the first song and the second song again from the lyric information of the lyrics from the 1 st sentence to the 1+ w th sentence of the first song and the sentence information of the s-th sentence to the s + w-th sentence in the lyric file of the second song; when the first matching degree is larger than the first threshold value, determining that the s sentence is the 1 st song lyric of the second song; calculating a second matching degree of the lyric information of the last x sentences of the lyrics of the first song and the sentence information of the q-x-1 to the q-th sentences in the lyric file of the second song, wherein x is a positive integer; when the second matching degree is smaller than a second threshold value, making q equal to q-1, and starting to execute the step of calculating the second matching degree of the two again from the lyric information of the lyric of the last x sentences of the first song and the sentence information of the q-x-1 to the q-th sentences in the lyric file of the second song; and when the second matching degree is larger than the second threshold value, determining that the q sentence is the lyric of the last sentence of the second song.
Fig. 4 shows a block diagram of a computer device 400 provided in an exemplary embodiment of the invention. The computer device 400 may be a PC, a server or a mobile phone.
Generally, the computer device 400 includes: a processor 401 and a memory 402.
Processor 401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like. The processor 401 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 401 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 401 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed by the display screen. In some embodiments, the processor 401 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 402 may include one or more computer-readable storage media, which may be non-transitory. Memory 402 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 402 is used to store a computer program for execution by processor 401 to implement the method of generating a pitch of a song provided by the method embodiments of the present application.
In some embodiments, the computer device 400 may also optionally include: a peripheral interface 403 and at least one peripheral. The processor 401, memory 402 and peripheral interface 403 may be connected by bus or signal lines. Each peripheral may be connected to the peripheral interface 403 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 404, touch screen display 405, camera 406, audio circuitry 407, positioning components 408, and power supply 409.
The peripheral interface 403 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 401 and the memory 402. In some embodiments, processor 401, memory 402, and peripheral interface 403 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 401, the memory 402 and the peripheral interface 403 may be implemented on a separate chip or circuit board, which is not limited by this embodiment.
The Radio Frequency circuit 404 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 404 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 404 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 404 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 404 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: the world wide web, metropolitan area networks, intranets, generations of mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 404 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 405 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 405 is a touch display screen, the display screen 405 also has the ability to capture touch signals on or over the surface of the display screen 405. The touch signal may be input to the processor 401 as a control signal for processing. At this point, the display screen 405 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display screen 405 may be one, providing the front panel of the computer device 400; in other embodiments, the display screen 405 may be at least two, respectively disposed on different surfaces of the computer device 400 or in a folded design; in still other embodiments, the display screen 405 may be a flexible display screen disposed on a curved surface or on a folded surface of the computer device 400. Even further, the display screen 405 may be arranged in a non-rectangular irregular pattern, i.e. a shaped screen. The Display screen 405 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and other materials.
The camera assembly 406 is used to capture images or video. Optionally, camera assembly 406 includes a front camera and a rear camera. Generally, a front camera is disposed on a front panel of a computer apparatus, and a rear camera is disposed on a rear surface of the computer apparatus. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 406 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuit 407 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 401 for processing, or inputting the electric signals to the radio frequency circuit 404 for realizing voice communication. For stereo capture or noise reduction purposes, the microphones may be multiple and located at different locations on the computer device 400. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 401 or the radio frequency circuit 404 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, audio circuitry 407 may also include a headphone jack.
The Location component 408 is used to locate the current geographic Location of the computer device 400 for navigation or LBS (Location Based Service). The Positioning component 408 can be a Positioning component based on the Global Positioning System (GPS) in the united states, the beidou System in china, or the galileo System in russia.
The power supply 409 is used to supply power to the various components in the computer device 400. The power source 409 may be alternating current, direct current, disposable or rechargeable. When the power source 409 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charge technology.
Those skilled in the art will appreciate that the configuration shown in FIG. 4 does not constitute a limitation of the computer device 400, and may include more or fewer components than those shown, or combine certain components, or employ a different arrangement of components.
In an exemplary embodiment, there is also provided a computer program product for performing the above-described method of generating a pitch of a song when the computer program product is executed.
It should be understood that reference to "a plurality" herein means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (12)

1. A method of generating pitches of a song, the method comprising:
acquiring lyric information of a first song and lyric information of a second song;
acquiring the song overall similarity of the first song and the second song according to the lyric information of the first song and the lyric information of the second song;
when the overall similarity of the songs meets a first preset condition, acquiring a time offset value of the lyrics corresponding to each group in the first song and the second song;
determining pitch information of each lyric of the second song according to the pitch information and a time offset value of each lyric of the first song, wherein the pitch information of each lyric comprises: a start timestamp of the pitch, a duration of the pitch, and a pitch value.
2. The method of claim 1, wherein determining pitch information for each lyric of the second song based on the pitch information for each lyric of the first song and a time offset value comprises:
calculating a starting time stamp of the pitch of the kth lyric of the second song according to the starting time stamp of the pitch of the target lyric of the first song and a time offset value, wherein the target lyric is a lyric corresponding to the kth lyric in the first song, and k is a positive integer;
determining the duration of the pitch of the target lyrics as the duration of the pitch of the kth lyric; and the number of the first and second groups,
and determining the pitch value of the kth lyric according to the pitch value of the target lyric.
3. The method of claim 2, wherein determining the pitch value of the k-th lyric based on the pitch value of the target lyric comprises:
analyzing the human voice audio of the second song to determine a pitch value of at least one lyric of the second song;
determining a pitch difference value of the first song and the second song according to a pitch value of the at least one lyric and a pitch value of the at least one lyric in the first song;
and determining the pitch value of the kth lyric according to the pitch value of the target lyric and the pitch difference value.
4. The method of any of claims 1 to 3, wherein obtaining a time offset value for each group of corresponding lyrics in the first song and the second song comprises:
acquiring the integral similarity of the ith lyric of the first song and the jth lyric of the second song, wherein the initial value of i is 1, and the initial value of j is 1;
if the integral similarity of the lyrics does not meet a second preset condition, making j equal to j +1, and starting to execute the step of obtaining the integral similarity of the ith lyric of the first song and the jth lyric of the second song again;
if the integral similarity of the lyrics meets the second preset condition, determining that the ith lyric corresponds to the jth lyric; determining time deviation values of the ith lyric and the jth lyric according to the starting time stamp of the ith lyric and the starting time stamp of the jth lyric; and making i +1, j +1, and starting execution from the step of obtaining the overall similarity of the lyrics of the ith sentence of the first song and the jth lyric of the second song again until i +1 or j +1, ending the process, wherein a represents the total number of sentences included in the lyric information of the first song, b represents the total number of sentences included in the lyric information of the second song, and a and b are both positive integers.
5. The method of any of claims 1 to 3, wherein the lyric information comprises: the starting time stamp, the duration and the lyric content of each sentence of lyrics;
the determining the overall similarity of the first song and the second song according to the lyric information of the first song and the lyric information of the second song comprises the following steps:
determining the content similarity of the first song and the second song according to the lyric content of the first song and the lyric content of the second song;
determining the time length similarity of the first song and the second song according to the time length of all the lyrics of the first song and the time length of all the lyrics of the second song;
wherein the overall similarity of the songs comprises the content similarity and the duration similarity.
6. The method of claim 5, wherein determining the content similarity of the first song and the second song based on the lyric content of the first song and the lyric content of the second song comprises:
acquiring the word number of the same lyrics in the first song and the second song according to the lyric content of the first song and the lyric content of the second song;
calculating to obtain the content similarity according to the word number and the total word number of the same lyrics;
wherein the total word count is the word count of the second song when the word count of the lyrics of the first song is greater than the word count of the lyrics of the second song; when the word number of the lyrics of the first song is less than the word number of the lyrics of the second song, the total word number is the word number of the first song; when the word count of the lyrics of the first song is equal to the word count of the lyrics of the second song, the total word count is the word count of the first song or the second song.
7. The method of claim 5, further comprising:
acquiring a lyric file of the first song and a lyric file of the second song, wherein the lyric file of the first song comprises p sentences, the lyric file of the second song comprises q sentences, and both p and q are positive integers;
determining the 1 st lyric and the last lyric of the first song from the lyric file of the first song;
and determining the 1 st sentence lyric and the last sentence lyric of the second song from the lyric file of the second song.
8. The method of claim 7, wherein determining the 1 st and last lyrics of the first song from the lyric file of the first song comprises:
calculating a first absolute value of a difference value between a start time stamp of a pitch of a 1 st sentence of lyrics in the pitch information of the first song and a start time stamp of each sentence in a lyric file of the first song; selecting the sentence with the minimum first absolute value, and determining the sentence as the 1 st lyric of the first song;
and the number of the first and second groups,
calculating a second absolute value of a difference between a start time stamp of a pitch of a last sentence of lyrics in the pitch information of the first song and a start time stamp of each sentence in the lyric file of the first song; and selecting the sentence with the minimum second absolute value, and determining the sentence as the last lyric of the first song.
9. The method of claim 7, wherein determining the 1 st and last lyrics of the second song from the lyric file of the second song comprises:
calculating a first matching degree of the lyrics information of the 1 st sentence to the 1+ w th sentence of the lyrics of the first song and the sentence information of the s th sentence to the s + w th sentence in the lyric file of the second song, wherein the initial value of s is 1, and w is a positive integer; if the first matching degree is smaller than a first threshold value, making s equal to s +1, and starting to execute the step of calculating the first matching degree of the first song and the second song again according to the lyric information of the 1 st sentence to the 1+ w th sentence of the lyric of the first song and the sentence information of the s th sentence to the s + w th sentence in the lyric file of the second song; if the first matching degree is larger than the first threshold value, determining that the s sentence is the 1 st song lyric of the second song;
and the number of the first and second groups,
calculating a second matching degree of the lyric information of the last x sentences of the lyrics of the first song and the sentence information of the q-x-1 to the q-th sentences in the lyric file of the second song, wherein x is a positive integer; if the second matching degree is smaller than a second threshold value, making q equal to q-1, and starting to execute the step of calculating the second matching degree of the two according to the lyric information of the lyric of the last x sentences of the first song and the sentence information of the q-x-1 to the q-th sentences in the lyric file of the second song; and if the second matching degree is greater than the second threshold value, determining that the q sentence is the last lyric of the second song.
10. An apparatus for generating pitches of a song, the apparatus comprising:
the lyric obtaining module is used for obtaining the lyric information of the first song and the lyric information of the second song;
the similarity obtaining module is used for obtaining the overall similarity of the first song and the second song according to the lyric information of the first song and the lyric information of the second song;
the time obtaining module is used for obtaining a time deviation value of the corresponding lyrics of each group in the first song and the second song when the overall similarity of the songs meets a first preset condition;
a pitch determining module, configured to determine pitch information of each lyric of the second song according to the pitch information of each lyric of the first song and a time offset value, where the pitch information of each lyric includes: a start timestamp of the pitch, a duration of the pitch, and a pitch value.
11. A computer device, characterized in that the computer device comprises a processor and a memory, in which a computer program is stored, which computer program, when loaded and executed by the processor, implements a method of generating a pitch of a song according to any one of claims 1 to 9.
12. A computer-readable storage medium, in which a computer program is stored, the computer program being loaded and executed by a processor to implement the method of generating a pitch of a song according to any one of claims 1 to 9.
CN201711353128.6A 2017-12-15 2017-12-15 Song pitch generation method, device and equipment Active CN108109634B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711353128.6A CN108109634B (en) 2017-12-15 2017-12-15 Song pitch generation method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711353128.6A CN108109634B (en) 2017-12-15 2017-12-15 Song pitch generation method, device and equipment

Publications (2)

Publication Number Publication Date
CN108109634A CN108109634A (en) 2018-06-01
CN108109634B true CN108109634B (en) 2020-12-04

Family

ID=62217369

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711353128.6A Active CN108109634B (en) 2017-12-15 2017-12-15 Song pitch generation method, device and equipment

Country Status (1)

Country Link
CN (1) CN108109634B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108172206B (en) * 2017-12-27 2021-05-07 广州酷狗计算机科技有限公司 Audio processing method, device and system
CN109446317B (en) * 2018-10-31 2022-08-02 广州酷狗计算机科技有限公司 Method, device and equipment for displaying lyrics and readable storage medium
CN110033791B (en) * 2019-03-26 2021-04-09 北京雷石天地电子技术有限公司 Song fundamental frequency extraction method and device
CN111159465B (en) * 2019-12-31 2023-09-29 杭州网易云音乐科技有限公司 Song classification method and device
CN111339350B (en) * 2020-03-27 2023-11-28 腾讯音乐娱乐科技(深圳)有限公司 Data processing method and device, storage medium and electronic equipment
CN111429949B (en) * 2020-04-16 2023-10-13 广州繁星互娱信息科技有限公司 Pitch line generation method, device, equipment and storage medium
CN113140230B (en) * 2021-04-23 2023-07-04 广州酷狗计算机科技有限公司 Method, device, equipment and storage medium for determining note pitch value
CN113436591B (en) * 2021-06-24 2023-11-17 广州酷狗计算机科技有限公司 Pitch information generation method, device, computer equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0723256B1 (en) * 1995-01-17 2001-10-24 Yamaha Corporation Karaoke apparatus modifying live singing voice by model voice
CN104715760A (en) * 2015-02-13 2015-06-17 朱威 KTV song matching analyzing method and system
CN105788589A (en) * 2016-05-04 2016-07-20 腾讯科技(深圳)有限公司 Audio data processing method and device
CN105825872A (en) * 2016-03-15 2016-08-03 腾讯科技(深圳)有限公司 Song difficulty determining method and device
CN106057213A (en) * 2016-06-30 2016-10-26 广州酷狗计算机科技有限公司 Method and apparatus for displaying voice pitch data
CN106157979A (en) * 2016-06-24 2016-11-23 广州酷狗计算机科技有限公司 A kind of method and apparatus obtaining voice pitch data
CN107122493A (en) * 2017-05-19 2017-09-01 北京金山安全软件有限公司 song playing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3319211B2 (en) * 1995-03-23 2002-08-26 ヤマハ株式会社 Karaoke device with voice conversion function

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0723256B1 (en) * 1995-01-17 2001-10-24 Yamaha Corporation Karaoke apparatus modifying live singing voice by model voice
CN104715760A (en) * 2015-02-13 2015-06-17 朱威 KTV song matching analyzing method and system
CN105825872A (en) * 2016-03-15 2016-08-03 腾讯科技(深圳)有限公司 Song difficulty determining method and device
CN105788589A (en) * 2016-05-04 2016-07-20 腾讯科技(深圳)有限公司 Audio data processing method and device
CN106157979A (en) * 2016-06-24 2016-11-23 广州酷狗计算机科技有限公司 A kind of method and apparatus obtaining voice pitch data
CN106057213A (en) * 2016-06-30 2016-10-26 广州酷狗计算机科技有限公司 Method and apparatus for displaying voice pitch data
CN107122493A (en) * 2017-05-19 2017-09-01 北京金山安全软件有限公司 song playing method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Automatic Evaluation of Karaoke Singing Based on Pitch, Volume, and Rhythm Features";W. Tsai 等;《IEEE Transactions on Audio, Speech, and Language Processing》;20111118;全文 *
"人声演唱评分系统的设计与实现";白杰;《http://www.wanfangdata.com.cn/details/detail.do?_type=degree&id=D727530》;20160504;全文 *

Also Published As

Publication number Publication date
CN108109634A (en) 2018-06-01

Similar Documents

Publication Publication Date Title
CN108109634B (en) Song pitch generation method, device and equipment
CN107978323B (en) Audio recognition method, device and storage medium
CN108008930B (en) Method and device for determining K song score
CN110931053B (en) Method, device, terminal and storage medium for detecting recording time delay and recording audio
WO2021068903A1 (en) Method for determining volume adjustment ratio information, apparatus, device and storage medium
CN109346111B (en) Data processing method, device, terminal and storage medium
CN110209871B (en) Song comment issuing method and device
CN109192218B (en) Method and apparatus for audio processing
CN109033335A (en) Audio recording method, apparatus, terminal and storage medium
CN109616090B (en) Multi-track sequence generation method, device, equipment and storage medium
CN109327707B (en) Method, device and storage medium for transferring virtual resources
CN109448761B (en) Method and device for playing songs
CN111625682B (en) Video generation method, device, computer equipment and storage medium
CN111524501A (en) Voice playing method and device, computer equipment and computer readable storage medium
CN108922562A (en) Sing evaluation result display methods and device
CN111933098A (en) Method and device for generating accompaniment music and computer readable storage medium
CN112667844A (en) Method, device, equipment and storage medium for retrieving audio
CN110349559A (en) Carry out audio synthetic method, device, system, equipment and storage medium
CN108053832B (en) Audio signal processing method, audio signal processing device, electronic equipment and storage medium
CN111081277B (en) Audio evaluation method, device, equipment and storage medium
CN112435643A (en) Method, device, equipment and storage medium for generating electronic style song audio
CN108922533A (en) Determine whether the method and apparatus sung in the real sense
CN109003627B (en) Method, device, terminal and storage medium for determining audio score
CN109036463B (en) Method, device and storage medium for acquiring difficulty information of songs
CN110717053A (en) Picture display method, device, terminal and storage medium based on songs

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