CN109584905B - Method, terminal and computer readable medium for measuring music speed - Google Patents

Method, terminal and computer readable medium for measuring music speed Download PDF

Info

Publication number
CN109584905B
CN109584905B CN201910066648.1A CN201910066648A CN109584905B CN 109584905 B CN109584905 B CN 109584905B CN 201910066648 A CN201910066648 A CN 201910066648A CN 109584905 B CN109584905 B CN 109584905B
Authority
CN
China
Prior art keywords
lyrics
syllables
lyric
music
preset
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
CN201910066648.1A
Other languages
Chinese (zh)
Other versions
CN109584905A (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.)
Tencent Music Entertainment Technology Shenzhen Co Ltd
Original Assignee
Tencent Music Entertainment Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Music Entertainment Technology Shenzhen Co Ltd filed Critical Tencent Music Entertainment Technology Shenzhen Co Ltd
Priority to CN201910066648.1A priority Critical patent/CN109584905B/en
Publication of CN109584905A publication Critical patent/CN109584905A/en
Application granted granted Critical
Publication of CN109584905B publication Critical patent/CN109584905B/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/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
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10HELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
    • G10H2210/00Aspects or methods of musical processing having intrinsic musical character, i.e. involving musical theory or musical parameters or relying on musical knowledge, as applied in electrophonic musical tools or instruments
    • G10H2210/031Musical analysis, i.e. isolation, extraction or identification of musical elements or musical parameters from a raw acoustic signal or from an encoded audio signal
    • G10H2210/076Musical analysis, i.e. isolation, extraction or identification of musical elements or musical parameters from a raw acoustic signal or from an encoded audio signal for extraction of timing, tempo; Beat detection

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)
  • Electrophonic Musical Instruments (AREA)

Abstract

The embodiment of the invention discloses a method, a terminal and a computer readable medium for measuring music speed, wherein the method comprises the following steps: the terminal acquires first lyrics of first music; each lyric in the first lyrics is associated with a time stamp, and the time stamp associated with each lyric is used for representing the duration of each lyric in the playing process; the terminal determines the total syllable number Q of the first lyrics and determines the total duration T of the first lyrics in the playing process according to the time stamp associated with each lyric in the first lyrics; the terminal determines the number of syllables played by the first lyric in unit time according to the total number Q of syllables and the total duration T, and the number of syllables played in unit time is used for measuring the playing speed of the first music. By the method and the device, the number of syllables played in unit time of the music can be determined, and the number of syllables played in unit time can be used for measuring the playing speed of the music.

Description

Method, terminal and computer readable medium for measuring music speed
Technical Field
The present invention relates to the field of computer processing technologies, and in particular, to a method, a terminal, and a computer-readable medium for measuring music speed.
Background
The playing speed of music, that is, the speed of the musical composition during playing, generally, the speed of the musical composition during playing may include: slow, medium, fast, gradual slow, slightly fast, slightly slow, free speed, and the like. In practical applications, the music station classifies music according to the playing speed of music, for example, music 1 is slow-speed type music, music 2 is medium-speed type music, and so on. However, there is no reasonable index for measuring the playing speed of music in the prior art, and how to measure the playing speed of music is a technical problem being studied by those skilled in the art.
Disclosure of Invention
Embodiments of the present invention provide a method, a terminal and a computer readable medium for measuring music speed, which can determine the number of syllables played by music in a unit time, and the number of syllables played in the unit time can be used to measure the music playing speed.
In a first aspect, an embodiment of the present invention provides a method for measuring music speed, where the method includes:
the terminal acquires first lyrics of first music; each lyric in the first lyrics is associated with a time stamp, and the time stamp associated with each lyric is used for representing the duration of each lyric in the playing process;
the terminal determines the total syllable number Q of the first lyrics and determines the total duration T of the first lyrics in the playing process according to the time stamp associated with each lyric in the first lyrics;
and the terminal determines the number of syllables played by the first lyric in unit time according to the total number Q of the syllables and the total duration T, wherein the number of the syllables played in unit time is used for measuring the playing speed of the first music.
By implementing the embodiment of the invention, the terminal can determine the number of syllables played in unit time according to the total number of syllables of the lyrics in the music and the total duration of the lyrics in the playing process, and the number of syllables played in unit time can be used for measuring the playing speed of the music.
Optionally, the duration of the first lyric is not less than a preset duration, and/or the first lyric does not include a first preset character, where the first preset character includes an arabic numeral or a special character.
Optionally, before the terminal acquires the first lyric of the first music, the method further includes:
performing one or more of a first operation, a second operation, a third operation and a fourth operation on the lyrics of the first music to filter the first lyrics, wherein the first operation comprises: deleting a second preset character when the first lyric contains the second preset character, wherein the second preset character comprises other punctuation marks or spaces except the single apostrophe of English, and the second operation comprises the following steps: when an incorrectly displayed character & apos is included in the first lyric, converting the incorrectly displayed character & apos to an English single apos, the third operation comprising: when the first lyrics contain the dirty word replacement characters obtained by replacement according to a preset dirty word filtering strategy, restoring the dirty word replacement characters according to the reverse operation specified by the preset dirty word filtering strategy; the fourth operation includes: lyrics without corresponding accompaniment are deleted.
Optionally, after the terminal acquires the first lyric of the first music, before the terminal determines the total number of syllables Q of the first lyric and determines the total duration T of the first lyric according to the duration of each lyric in the first lyric, the method further includes:
the terminal classifies the first lyrics to obtain M classification sets; the lyrics in each classification set are the same in language type, the lyrics in different classification sets are different in language type, and M is a positive integer;
and the terminal counts the number of the syllables of each lyric in each classification set of the M classification sets.
Optionally, after the terminal classifies the first lyric to obtain M classification sets, and before the terminal counts the number of the syllables of each lyric in each classification set of the M classification sets, the method further includes:
identifying the language type of the lyrics in the first classification set, and searching a target syllable number statistical strategy corresponding to the language type of the lyrics in the first classification set according to the corresponding relation between the preset language type and the syllable number statistical strategy; the first classification set is any one of the M classification sets;
the counting of the number of the syllables of each lyric in each classification set of the M classification sets comprises the following steps:
and counting the number of the syllables of each lyric in the first classification set according to the target syllable number counting strategy.
Optionally, the determining, by the terminal, the number of syllables played by the first music in unit time according to the total number of syllables Q and the total duration T includes:
the terminal determines the number of syllables actually played in the first music unit time according to the total syllable number Q and the total duration time T;
and if the number of the syllables actually played in the first music unit time is within the preset speed range, determining the number of the syllables actually played in the first music unit time as the number of the syllables played in the first music unit time.
Optionally, if the number of syllables actually played by the first music in unit time is not within the preset speed range, determining the value closest to the number of syllables actually played by the first music in unit time within the preset speed range as the number of syllables played by the first music in unit time.
In a second aspect, an embodiment of the present invention provides an apparatus for measuring music speed, which includes means for performing the method of the first aspect. Specifically, the apparatus may include:
an acquisition unit configured to acquire first lyrics of first music; each lyric in the first lyrics is associated with a time stamp, and the time stamp associated with each lyric is used for representing the duration of each lyric in the playing process;
a first determining unit for determining a total syllable number Q of the first lyrics;
the second determining unit is used for determining the total duration T of each lyric in the first lyric in the playing process according to the time stamp associated with the lyric;
a third determining unit, configured to determine, according to the total number of syllables Q and the total duration T, a number of syllables played by the first lyric in unit time, where the number of syllables played in unit time is used to measure a playing speed of the first music.
Optionally, the duration of the first lyric is not less than a preset duration, and/or the first lyric does not include a first preset character, where the first preset character includes an arabic numeral or a special character.
Optionally, the apparatus further comprises:
an execution unit, configured to perform one or more of a first operation, a second operation, a third operation, and a fourth operation on the lyrics of the first music to filter the first lyrics, where the first operation includes: deleting a second preset character when the first lyric contains the second preset character, wherein the second preset character comprises other punctuation marks or spaces except the single apostrophe of English, and the second operation comprises the following steps: when an incorrectly displayed character & apos is included in the first lyric, converting the incorrectly displayed character & apos to an English single apos, the third operation comprising: when the first lyrics contain the dirty word replacement characters obtained by replacement according to a preset dirty word filtering strategy, restoring the dirty word replacement characters according to the reverse operation specified by the preset dirty word filtering strategy; the fourth operation includes: lyrics without corresponding accompaniment are deleted.
Optionally, the apparatus further comprises:
the classification unit is used for classifying the first lyrics to obtain M classification sets; the lyrics in each classification set are the same in language type, the lyrics in different classification sets are different in language type, and M is a positive integer;
and the counting unit is used for counting the number of the syllables of each lyric in each classification set of the M classification sets.
Optionally, the apparatus further comprises:
the recognition unit is used for recognizing the language type of the lyrics in the first classification set and searching a target syllable number statistical strategy corresponding to the language type of the lyrics in the first classification set according to the corresponding relation between the preset language type and the syllable number statistical strategy; the first classification set is any one of the M classification sets;
the statistical unit is specifically configured to:
and counting the number of the syllables of each lyric in the first classification set according to the target syllable number counting strategy.
Optionally, the third determining unit includes a fourth determining unit and a fifth determining unit;
the fourth determining unit is configured to determine the number of syllables actually played in the first music unit time according to the total number of syllables Q and the total duration T;
the fifth determining unit is configured to determine the number of syllables actually played in the unit time of the first music as the number of syllables played in the unit time of the first music when the number of syllables actually played in the unit time of the first music is within a preset speed range.
Optionally, the fifth determining unit is further configured to:
and when the number of the syllables of the first music actually played in unit time is not in the preset speed range, determining the numerical value which is closest to the number of the syllables of the first music actually played in unit time in the preset speed range as the number of the syllables played in the first music unit time.
In a third aspect, an embodiment of the present invention provides another terminal, which includes a processor, an input device, an output device, and a memory, where the processor, the input device, the output device, and the memory are connected to each other, where the memory is used to store a computer program that supports the terminal to execute the foregoing method, and the computer program includes program instructions, and the processor is configured to call the program instructions to execute the foregoing method according to the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored, the computer program comprising program instructions, which, when executed by a processor, cause the processor to perform the method of the first aspect.
In a fifth aspect, an embodiment of the present invention provides a computer program, where the computer program includes program instructions for the server, and the program instructions, when executed by a processor of the server, cause the processor to execute the program designed for the server in the first aspect.
By implementing the embodiment of the invention, the terminal can determine the number of syllables played in unit time according to the total number of syllables of the lyrics in the music and the total duration of the lyrics in the playing process, and the number of syllables played in unit time can be used for measuring the playing speed of the music. In the process of determining the index of the number of syllables played in unit time, the lyrics of the music can be normalized according to one or more of the first operation, the second operation, the third operation and the fourth operation to obtain the first lyrics after screening, wherein the first lyrics are lyrics which can be sung, so that the accuracy rate in calculating the index of the number of syllables played in unit time can be improved. In addition, in the process of determining the number of syllables of the first lyrics of the music, the first lyrics are classified to obtain a plurality of classification sets, wherein the language types of the lyrics in each classification set are the same, and the language types in different classification sets are different, then the statistical strategy of the current classification set is determined according to the corresponding relation between the preset voice type and the syllable statistical strategy, then the number of the syllables of the lyrics in the current classification set is counted according to the statistical strategy, and the statistical efficiency of the number of the syllables of the first lyrics can be improved.
Drawings
In order to more clearly illustrate the technical solution of the embodiment of the present invention, the drawings used in the description of the embodiment will be briefly introduced below.
Fig. 1 is a schematic view of an application scenario to which the present invention may be applied according to an embodiment of the present invention;
FIG. 2A is a flow chart of a method for measuring music speed according to an embodiment of the present invention;
FIG. 2B is a diagram illustrating a first lyric according to an embodiment of the present invention;
fig. 3 is a schematic flowchart illustrating a specific implementation of a method for measuring music speed according to an embodiment of the present invention;
FIG. 4 is a block diagram of an apparatus for measuring music speed according to an embodiment of the present invention;
FIG. 5 is a block diagram of an apparatus for measuring music speed according to an embodiment of the present invention;
fig. 6 is a schematic block diagram of an apparatus for measuring music speed according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
In particular implementations, the terminals described in embodiments of the invention include, but are not limited to, other portable devices such as mobile phones, laptop computers, or tablet computers having touch sensitive surfaces (e.g., touch screen displays and/or touch pads). It should also be understood that in some embodiments, the device is not a portable communication device, but is a desktop computer having a touch-sensitive surface (e.g., a touch screen display and/or touchpad).
In the discussion that follows, a terminal that includes a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, mouse, and/or joystick.
The terminal supports various applications, such as one or more of the following: a drawing application, a presentation application, a word processing application, a website creation application, a disc burning application, a spreadsheet application, a gaming application, a telephone application, a video conferencing application, an email application, an instant messaging application, an exercise support application, a photo management application, a digital camera application, a web browsing application, a digital music player application, and/or a digital video player application.
Various applications that may be executed on the terminal may use at least one common physical user interface device, such as a touch-sensitive surface. One or more functions of the touch-sensitive surface and corresponding information displayed on the terminal can be adjusted and/or changed between applications and/or within respective applications. In this way, a common physical architecture (e.g., touch-sensitive surface) of the terminal can support various applications with user interfaces that are intuitive and transparent to the user.
First, the following application scenarios to which the present invention can be adapted are introduced. For example, as shown in fig. 1, the music being played on the terminal (e.g. mobile phone) is: lydia, and lyrics of the Lydia in the playing process are displayed on a display screen of the terminal. As can be known from fig. 1, each lyric in the Lydia music is associated with a time stamp, and the time stamp includes a start time and an end time of the lyric, for example, in the case of the lyric of "eye socket of getting lost", the associated time stamp is: 00:20.43. In practical applications, the duration of each lyric during playing can be determined according to the respective associated time stamp of each lyric in music, for example, the duration of the lyric of "eye socket getting lost" during playing is 2.26 seconds. It can be understood that, during the playing process of the lyric of the 'lost eye socket', there is an accompaniment corresponding to the lyric in the 'Lydia' music file, and in popular terms, the lyric of the 'lost eye socket' is the lyric that can be sung. For another example, as shown in fig. 1, 101, the lyric of "Lydia-Liao Tianye" has no accompaniment in the music file corresponding thereto, that is, the lyric of "Lydia-Liao Tianye" is a lyric that cannot be sung. As a preferred implementation manner, in the embodiment of the present invention, the lyrics are lyrics that can be sung. As an alternative implementation manner, in the embodiment of the present invention, the lyrics may include lyrics that can be sung and lyrics that cannot be sung. Then, when the lyrics include lyrics that cannot be sung (i.e. the lyrics do not have a corresponding accompaniment in the music), in the following embodiment, how the terminal processes the lyrics without the accompaniment will be described. In a specific implementation, the terminal may determine a total number of syllables of lyrics in the music and a total duration of the lyrics in the music, and then determine a number of syllables played per unit time based on the total number of syllables and the total duration.
In some application scenarios, the music speed may also be considered as the singing speed in the embodiments of the present invention.
Referring to fig. 2A, a flow diagram of a method for measuring music speed according to an embodiment of the present invention is shown below, which specifically illustrates how the embodiment of the present invention measures music speed, and may include the following steps:
step S201: the terminal acquires first lyrics of first music; and each lyric in the first lyrics is associated with a time stamp, and the time stamp associated with each lyric is used for representing the duration of each lyric in the playing process.
Illustratively, the first piece of music is Lydia, and the terminal acquires the first lyric of the first piece of music as shown in fig. 1, wherein, taking the lyric of "lost eye socket" in Lydia as an example, a timestamp is associated with the lyric, the timestamp comprises a start time and an end time of the lyric, for example, the timestamp is 00:20.43, and in a specific implementation, the terminal can determine that the duration of the lyric of "lost eye socket" is 2.26 seconds in the playing process according to the timestamp.
In one embodiment, the first lyrics include lyrics that can be sung and lyrics that cannot be sung. For example, in the case of the music piece Lydia, the first lyric may be represented in fig. 1, where 102 represents lyrics that can be sung, and 101 and 103 represent lyrics that cannot be sung.
In one embodiment, the first lyrics only include lyrics that can be sung. For example, taking the music piece Lydia as an example, the concrete expression form of the first lyric may be as shown in (B) in fig. 2B. The lyrics shown in (B) of fig. 2B are all lyrics that can be sung.
As a preferred implementation manner, a duration of the first lyric is not less than a preset duration, and/or the first lyric does not include a first preset character, where the first preset character includes an arabic numeral or a special character.
In practical application, the preset duration may be set by the terminal autonomously or according to a user requirement, and the embodiment of the present invention is not particularly limited. For example, the preset duration may be 30 milliseconds. That means that the duration of each lyric in the first lyric is no less than 30 ms.
Illustratively, the arabic numerals may include 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. Special characters may include () [ ] { } @ # $% ^ & and so on. In a preferred implementation, the first lyrics do not contain the above-mentioned arabic numerals and special characters.
Step S202: the terminal determines the total syllable number Q of the first lyrics and determines the total duration T of the first lyrics in the playing process according to the time stamp associated with each lyric in the first lyrics.
When determining the number of syllables of each lyric in the first lyric, the language type of the lyric needs to be considered, and then the number of syllables is determined according to the statistical strategy corresponding to the language type, for example, when the language type of the lyric is english, in this case, the number of syllables is determined according to the pronunciation syllables of english words; for another example, when the language type of the lyric is chinese, the number of syllables of one chinese character is 1, in which case the number of chinese characters in the first lyric is also the number of syllables of the first lyric.
As a preferred implementation manner, the total duration T of the first lyrics during playing is not less than a preset time range, for example, the preset time range may be greater than 30 seconds, which may ensure the reliability of the index of the number of syllables played in a unit time determined by the terminal, and thus may ensure the stability of the index of the number of syllables played in a unit time.
Similarly, for example, in the case of Lydia as an example, when the first lyric is shown in fig. 1, it can be known from fig. 1 that the first lyric includes two language types, which are english and chinese, respectively. The terminal respectively determines the number of syllables of each lyric in the first lyric and determines the duration of each lyric in the first lyric in the playing process according to the time stamp associated with each lyric. For example, in the case of "Lydia-lao maotai", the lyric includes english "Lydia", a special character "-" and chinese "lao maotai", wherein the number of syllables of the english "Lydia" is 2, the number of syllables of the chinese "lao maotai" is 3, the number of syllables of the special character "-" is 0, that is, the number of syllables of the lyric of Lydia-lao maotai "is 5, and the duration of the playing process is 2.84 seconds. For another example, taking "lost eye socket" as an example, the lyric only includes a language type of chinese, and at this time, the number of chinese characters in the lyric of "lost eye socket" is also the number of syllables, so it can be known that the number of syllables is 5, and the duration of the playing process is 2.26 seconds. Then, after determining the number of syllables per lyric of the first lyric and the respective duration of each lyric in the first lyric during playing, the total number of syllables Q in the first lyric and the total duration T of the first lyric during playing can be determined. When the first lyrics are as shown in fig. 1, the total number of syllables Q in the first lyrics is 134 and the total duration T of the first lyrics during playing is 1 minute 8.08 seconds.
For another example, in the case of Lydia as an example of a musical piece, when the first lyrics are shown in (B) of fig. 2B, the terminal determines the number of syllables of each lyric in the first lyrics, and determines the duration of the lyrics during playing according to the time stamps respectively associated with the lyrics in the first lyrics, for example, "Lydia" as an example, the number of syllables is 2, and the duration of the lyrics during playing is 2.26 seconds. For another example, in the case of "lost eye socket", the number of syllables is 5, and the duration of the playing process is 2.26 seconds. Then, after determining the number of syllables per lyric of the first lyric and the duration of each lyric in the first lyric during playing respectively, the total number of syllables Q in the first lyric and the total duration T of the first lyric during playing can be determined. When the first lyric is as shown in fig. 2B (B), the total number of syllables Q in the first lyric is 101 and the total duration T of the first lyric during the playing is 1 minute 5.28 seconds.
It is understood that the language type of the lyrics in the first lyrics includes a plurality of types, and the lyrics of the plurality of language types are not classified when counting the number of syllables, which in this case means that the terminal needs to face a problem of multi-language mixing when determining the number of syllables of the first lyrics, which undoubtedly increases the difficulty of determining the number of syllables by the terminal. In the following embodiments, it is specifically stated how the terminal solves the problem of the existence of multi-language mixing in the first lyrics, please refer to the related description.
Step S203, the terminal determines the number of syllables played by the first lyric in unit time according to the total number Q of syllables and the total duration T, wherein the number of syllables played in unit time is used for measuring the playing speed of the first music.
For example, when the first lyric is as shown in fig. 1, the terminal determines that the total number of syllables Q in the first lyric is 134 and the total duration T of the first lyric during the playing is 1 min 8.08 sec, and then, the terminal determines the number of syllables played per unit time based on the total number of syllables Q and the total duration T.
For example, the number of syllables played per unit time may be the number of syllables played per minute or the number of syllables played per second. In practical applications, the number of syllables played Per Minute is also referred to as the Syllable speed (Syllable Per Minute, SPM). The terminal determines the number of syllables played per minute as 118 based on the total number of syllables Q and the total duration T.
For another example, when the first lyric is as shown in fig. 2B (B), the terminal determines that the total number of syllables Q in the first lyric is 101 and the total duration T of the first lyric during the playing is 1 min 5.28 sec, and then, the terminal determines the number of syllables played per unit time based on the total number of syllables Q and the total duration T.
Illustratively, the number of syllables played per minute is 93, and the terminal determines the number of syllables played per minute based on the total number of syllables Q and the total duration T.
In practical applications, the playing amount of syllables (for example, SPM) per unit time can be widely applied to application scenarios such as search, recommendation, clustering, etc. as a label of music. In applications where a measure of speed is desired, such as a functional music station (a running station, a relaxing song station, etc.), SPM may be used as an important indicator of music screening. That is, the terminal can filter the music according to the index of the playing number of the syllables in the unit time, and the music is divided into different types.
It should be noted that the index of the playing amount of syllables Per unit time referred to in this application can be regarded as a supplement of the existing music tempo measuring method, that is, the Beat Per Minute (BPM), which is more suitable for the subjective feeling of human.
In the prior art, the BPM can be used to measure the speed of music, but the BPM is based on the music itself, and in fact, one of the important sources of the feeling of "speed" given to a song is the speed of singing by a singer, not the speed of music. For example, in music such as Rap, the BPM of the music itself is not high, but the singer gives a feeling that the song is fast because the pronunciation speed is extremely fast, and in this case, the problem of inaccurate measurement of the playing speed of the music is easily caused. The SPM provided by the embodiment of the invention can avoid the problem of inaccurate music speed measurement caused by BPM.
As an optional implementation manner, the terminal performing step S203 may include: the terminal determines the number of syllables actually played in unit time by the first music according to the total syllable number Q and the total duration T; if the number of the syllables actually played in the unit time of the first music is within the preset speed range, determining the number of the syllables actually played in the unit time of the first music as the number of the syllables played in the unit time of the first music; if the number of syllables actually played by the first music in the unit time is not in the preset speed range, determining the numerical value closest to the number of syllables actually played by the first music in the unit time in the preset speed range as the number of syllables played by the first music in the unit time.
In practical application, the preset speed range may be set by the terminal autonomously, or may be set by the terminal according to a user requirement, and is not specifically limited in the embodiment of the present invention.
Illustratively, the preset speed range may be 40-180.
As shown above, when the first lyric is as shown in fig. 1, the terminal determines the playing number of actual syllables per minute as 118 according to the total number of syllables Q and the total duration T, and the terminal determines that the currently calculated playing number of actual syllables per minute 118 is within the preset speed range, at this time, the terminal determines the playing number of syllables of the music piece Lydia in unit time as 118.
For another example, when the first lyric is as shown in fig. 2B (B), the terminal determines that the number of syllables actually played per minute is 93 according to the total number of syllables Q and the total duration T, and the terminal determines that the currently calculated actual number of syllables played per minute 93 is within the preset speed range, and at this time, the terminal determines that the number of syllables played per unit time of the music piece Lydia is 93.
For another example, the terminal determines the number of syllables actually played in the "first time" of the music piece per minute as 38 according to the total number of syllables Q and the total duration T, and the terminal determines that the currently calculated number of actually played syllables in the "first time" of the music piece per minute 38 is not in the preset speed range, at this time, the terminal determines the value closest to the number of syllables actually played in the unit time of the "first time" of the music piece in the preset speed range as the number of syllables played in the unit time of the "first time" of the music piece, for example, the terminal determines the number of syllables played in the unit time of the "first time" of the music piece as 40. By the embodiment of the invention, the abnormal situation can be avoided, and when the terminal determines the index of the number of the syllables played in unit time, the number of the syllables played in unit time determined by the terminal cannot be used for measuring the playing speed of the music.
For another example, the terminal determines that the number of syllables actually played in each minute of the syllable work "fairy tale" is 187 according to the total number of syllables Q and the total duration T, and the terminal determines that the currently calculated number of actually played syllables 187 in each minute is not within the preset speed range, at this time, the terminal determines the value closest to the number of syllables actually played in the unit time of the musical piece "fairy tale" within the preset speed range as the number of syllables played in the unit time of the musical piece "fairy tale", for example, the terminal determines that the number of syllables played in the unit time of the musical piece "first time" is 180. By the embodiment of the invention, abnormal situations can be avoided.
By implementing the embodiment of the invention, the terminal can determine the number of syllables played in unit time according to the total number of syllables of the lyrics in the music and the total duration of the lyrics in the playing process, and the number of syllables played in unit time can be used for measuring the playing speed of the music.
As an optional implementation manner, before performing step S201, the terminal may further include: the terminal performs one or more of a first operation, a second operation, a third operation and a fourth operation on the lyrics of the first music to obtain first lyrics through screening.
The following describes how the terminal performs the first operation, the second operation, the third operation, and the fourth operation on the lyrics of the first music.
In an embodiment of the present invention, the first operation includes: and deleting the second preset character when the first lyric contains the second preset character, wherein the second preset character comprises other punctuation marks or blank spaces except the single apostrophe of English.
English single apostrophe, i.e.,'. This left-hand side, read as apostrophe in English, means metastasis, avoidance, and omission. For example, in the lyric of "I'm a big big big girl", a punctuation (') means omission.
For example, a particular representation of the first lyric may be shown in FIG. 1 as "waiting for love to fly! | A | A "this lyric is an example, the lyric including a punctuation mark"! ", in which case the terminal will mark a punctuation mark"! "delete. That is, will "wait for love to fly! | A | A "this lyric is adjusted to" wait for love to fly ".
In the embodiment of the present invention, for example, when the first lyric includes an english single apostrophe ('), the lyric "I'm a big big big girl" is taken as an example, in this case, if the terminal deletes the english single apostrophe ('), the "I'm a big big big girl" becomes "Im a big big big big girl", and in this case, the terminal is likely to determine the number of the syllables of "Im" to be 1. However, in practical cases, the number of syllables of the lyric "I'm" is 2. It can be understood that, the terminal performs the first operation on the lyrics of the first music, so that the terminal can be prevented from misoperation in the process of determining the number of syllables of the first lyrics, and the accuracy of the terminal in calculating the number of played syllables in unit time is improved.
In an embodiment of the present invention, the second preset operation includes: and when the incorrect display character & apos is contained in the first lyric, converting the incorrect display character & apos into an English single apos.
For example, taking the lyric of "& apos waiting for love to fly" as an example, the lyric contains the incorrectly displayed character & apos, in this case, the terminal converts the incorrectly displayed character & apos into an english single apos, that is, the lyric of "& apos waiting for love to fly" is adjusted to be "waiting for love to fly". In a specific implementation, the reason why the terminal converts the incorrectly displayed characters & apos into an english single apos is that: in this case, the english single prime (') means avoidance. That is, the terminal does not cover (') when determining the number of syllables of the lyric of ' wait for love to fly '. It can be understood that, when the terminal performs the second operation on the lyrics of the first music, the terminal can be prevented from making a mistake in the process of determining the number of syllables of the first lyrics, thereby improving the accuracy of the terminal in calculating the number of played syllables per unit time.
In an embodiment of the present invention, the third operation includes: and when the first lyrics contain the dirty word replacement characters obtained by replacing according to a preset dirty word filtering strategy, restoring the dirty word replacement characters according to the reverse operation specified by the preset dirty word filtering strategy.
For example, taking a lyric "B × ch without face" as an example, the lyric includes a dirty word replacement character obtained by replacement according to a preset dirty word filtering policy, in this case, the terminal restores the dirty word replacement character according to a reverse operation specified by the preset dirty word filtering policy, for example, restores the dirty word replacement character to it, that is, adjusts the lyric "B × ch without face" to "pitch without face", so as to prevent the terminal from determining the pitch number of "pitch" as 1. However, in practical cases, the number of syllables of the lyric "pitch" is 2. It can be understood that, when the terminal performs the third operation on the lyrics of the first music, the terminal may be prevented from making a mistake in the process of determining the number of syllables of the first lyrics, thereby improving the accuracy of the terminal in calculating the number of played syllables per unit time.
As can be seen from the above discussion, the first operation, the second operation, and the third operation in the embodiment of the present invention can avoid the terminal from making a mistake in the process of determining the number of syllables of the first lyric, so that the accuracy of the terminal calculating the index of the number of played syllables per unit time can be improved.
In an embodiment of the present invention, the fourth operation includes: lyrics without corresponding accompaniment are deleted.
In a specific implementation, the fact that lyrics in music do not have corresponding accompaniment includes the following situations: music title, wordphone, composer, singer, and a marker character (e.g., "male:", "female:") that marks the role of singing music, etc.
For example, in an example of 101 shown in fig. 1, the lyric "Lydia-li wild" has no corresponding accompaniment in music Lydia, and in this case, the terminal deletes the lyric "Lydia-li wild". It can be understood that, the terminal performs the fourth operation on the lyrics of the first music, so that the terminal can be prevented from counting the duration of the lyrics without accompaniment when determining the total duration of the first lyrics, and the accuracy of the terminal in calculating the number of played syllables in unit time can be improved.
In practical application, the terminal may perform only the first operation on the lyrics of the first music to filter out the first lyrics. Alternatively, the terminal may perform only the second operation on the lyrics of the first music to obtain the first lyrics. Still alternatively, the terminal may perform only the third operation on the lyrics of the first music to obtain the first lyrics. Still alternatively, the terminal may perform only the fourth operation on the lyrics of the first music to obtain the first lyrics.
In some implementations, the terminal may perform several, for example, two, of the first operation, the second operation, the third operation, and the fourth operation on the lyrics of the first music. And for example, three. As another example, four, etc. The combination schemes are all within the protection scope of the application.
It is understood that, in these implementations, the terminal may perform the first operation, the second operation, the third operation, and the fourth operation on the lyrics of the first music as a preferred implementation, and at this time, the terminal may play more accurately according to the total number of syllables of the lyrics in the music and the total duration of the lyrics in the playing process, so as to better measure the playing speed of the music.
As an optional implementation manner, after performing step S201 and before performing step S203, the terminal may further include: the terminal classifies the first lyrics to obtain M classification sets; the voice types of the lyrics in each classification set are the same, the voice types in different classification sets are different, and M is a positive integer. Thereafter, the terminal determines the total syllable number of the first lyric. This is explained in detail below.
In the embodiment of the invention, M is a positive integer greater than 0. For example, M is 2; for example, M is 3, etc., and the embodiment of the present invention is not particularly limited.
Illustratively, when the concrete representation form of the first lyric is shown as (B) in fig. 2B, it can be known from (B) in fig. 2B that the first lyric includes two language types, i.e., chinese and english, respectively. In practical application, the terminal classifies the first lyric into 2 classification sets, wherein the first classification set is a Chinese classification set, and the second classification set is an English classification set.
And then, the terminal identifies the language type of the lyrics in each classification set, and searches a target syllable number statistical strategy corresponding to the language type of the lyrics in each classification set according to the corresponding relation between the preset language type and the syllable number statistical strategy.
In a specific implementation, the correspondence between the preset language type and the syllable number statistical strategy may include, but is not limited to, as shown in table 1:
TABLE 1 Table of correspondence between preset language type and syllable statistical strategy
Language type Syllable statistical strategy
Chinese character The number of syllables of a Chinese character is 1
English Determining syllable number from pronunciation syllable
Han Wen The number of syllables in Korean is 1
For example, for the first classification set, the terminal identifies the language type in the first classification set as chinese, and the terminal determines that the number of chinese characters in the current classification set is 96, that is, the number of syllables in the current classification set is 96; for another example, in the second classification set, the terminal recognizes the language type in the second classification set as english, the terminal specifies the number of syllables of the english word "Lydia" as 2, and the terminal specifies the number of syllables of the english word "Gypsy" as 3, and at this time, the terminal specifies the number of syllables in the current classification set as 5. After the terminal determines the number of syllables of the lyrics in each classification set, the terminal may add the number of syllables of the lyrics in each classification set to obtain the total number of syllables Q referred to in the present application, that is, the total number of syllables is 101.
In practical applications, since the language type of the first lyrics in the music is different, in this case, the terminal will have a different classification set for classifying the first lyrics. For example, when the language type of the first lyric includes chinese, japanese, korean, arabic, cyrillic (russian, ukraine), greek (greek), latin (english, french, german, spanish, portuguese, etc.), the terminal divides the first lyric into 5 classification sets, which are CJK classification set, arabic classification set, cyrillic classification set, greek classification set, latin classification set, respectively; wherein, Chinese, Japanese and Korean are collectively called CJK classification set, and CJK is an abbreviation of three Chinese characters, Chinese (Chinese), Japanese (Japanese) and Korean (Korean). The classification set obtained by classifying the first lyrics is only an example, and should not be construed as a limitation.
When the language type in the first lyric includes japanese, considering that japanese has a special syllable determination method, for example, a large number of japanese kanji exists in japanese, and pronunciation of the japanese kanji is related to context, the statistical strategy for the number of syllables corresponding to the language type may include:
firstly, the sentence of Japanese is analyzed grammatically, and Japanese kanji in the sentence is converted into hiragana which marks the pronunciation of the Japanese kanji. For ease of analysis, katakana is also converted to hiragana.
Then, each character in the converted hiragana character string (10 characters included in the hiragana character string, and the numbers thereof are 1, …, and 10 respectively) is analyzed:
if the hiragana character is a studios marker (lower case ぁ, etc.), the syllables are not accumulated;
if the hiragana character is a long-pitch mark (one) or a dialing (one), not accumulating syllables;
if the hiragana character is あ, い, う, え, お and the character before the character is the character in the corresponding segment, not accumulating the syllables of the character;
in the case where the above three cases are not satisfied, the number of syllables of one hiragana character is 1.
As an optimal implementation, a specific implementation process of a method for measuring music speed can be seen in fig. 3. As shown in fig. 3, when the first lyric is shown in fig. 1, the terminal first adjusts the lyrics of the first music to obtain the first lyrics through filtering, wherein the first lyrics only include lyrics that can be sung. In a specific implementation, each lyric in the first lyrics is associated with a time stamp, the terminal determines the duration of each lyric in the first lyrics in the playing process according to the respective time stamp corresponding to each lyric in the first lyrics, and then the total duration T of the first lyrics in the playing process can be determined; after the terminal obtains the first lyrics through screening, classifying the lyrics according to the language type of the first lyrics to obtain a plurality of classification sets; then, determining the syllable number of the lyrics in each classification set according to a syllable number statistic strategy corresponding to the language type, and then determining the total syllable number by the terminal according to the syllable number of the lyrics in each classification set; then, the terminal determines the number of syllables played in a unit time based on the total number of syllables Q and the total duration T. The number of syllables played in a unit time calculated according to the above implementation can be used for better measuring the music speed.
By implementing the embodiment of the invention, the terminal can classify the first lyrics and identify the language type in each classification set in the process of determining the total syllable number Q of the first lyrics, then after determining the language type of the lyrics in the classification set, a target syllable number statistical strategy of the current classification set is determined according to the corresponding relation between the preset language type and the syllable number statistical strategy, and then the syllable number of the lyrics in the current classification set is counted according to the target syllable number statistical strategy, so that the statistical efficiency of the terminal in counting the syllable number of the first lyrics can be improved.
In order to better implement the above solution of the embodiment of the present invention, the present invention further provides a device for measuring music speed, which is described in detail below with reference to the accompanying drawings:
as shown in fig. 4, the device for measuring music speed 40 according to the embodiment of the present invention may include: an acquisition unit 400, a first determination unit 402, a second determination unit 404, a third determination unit 406,
the acquiring unit 400 is configured to acquire first lyrics of first music; each lyric in the first lyrics is associated with a time stamp, and the time stamp associated with each lyric is used for representing the duration of each lyric in the playing process;
a first determining unit 402 for determining a total syllable number Q of the first lyrics;
a second determining unit 404, configured to determine a total duration T of the first lyrics during playing according to a timestamp associated with each lyric in the first lyrics;
a third determining unit 406, configured to determine, according to the total number of syllables Q and the total duration T, a number of syllables played by the first lyric in unit time, where the number of syllables played in unit time is used to measure a playing speed of the first music.
Specifically, as shown in fig. 5, the device for measuring music speed 40 according to another embodiment of the present invention includes an obtaining unit 400, a first determining unit 402, a second determining unit 404, and a third determining unit 406, and may further include an executing unit 408, a classifying unit 4010, a counting unit 4012, and an identifying unit 4014, wherein,
an executing unit 408, configured to, before the obtaining unit 402 obtains the first lyric of the first music, perform one or more of a first operation, a second operation, a third operation, and a fourth operation on the lyric of the first music to filter the first lyric, where the first operation includes: deleting a second preset character when the first lyric contains the second preset character, wherein the second preset character comprises other punctuation marks or spaces except the single apostrophe of English, and the second operation comprises the following steps: when an incorrectly displayed character & apos is included in the first lyric, converting the incorrectly displayed character & apos to an English single apos, the third operation comprising: when the first lyrics contain the dirty word replacement characters obtained by replacement according to a preset dirty word filtering strategy, restoring the dirty word replacement characters according to the reverse operation specified by the preset dirty word filtering strategy; the fourth operation includes: deleting lyrics without corresponding accompaniment;
a classifying unit 4010, configured to, after the obtaining unit 402 obtains the first lyrics of the first music, determine a total number of syllables Q of the first lyrics and classify the first lyrics before determining a total duration T of the first lyrics according to a duration of each lyric in the first lyrics, so as to obtain M classification sets; the lyrics in each classification set are the same in language type, the lyrics in different classification sets are different in language type, and M is a positive integer;
a statistic unit 4012, configured to count the number of syllables of each lyric in each of the M classification sets;
the identification unit 4014 is configured to, after the classification unit 4010 classifies the first lyric to obtain M classification sets, identify the language type of the lyric in the first classification set before the statistics unit 4012 counts the number of the musical notes of each lyric in each classification set in the M classification sets, and search for a target musical note number statistics policy corresponding to the language type of the lyric in the first classification set according to a correspondence between a preset language type and a musical note number statistics policy; the first classification set is any one of the M classification sets;
the statistic unit 4012 is specifically configured to:
and counting the number of the syllables of each lyric in the first classification set according to the target syllable number counting strategy.
The third determining unit 404 includes a fourth determining unit and a fifth determining unit;
a fourth determining unit, configured to determine the number of syllables actually played in the first music unit time according to the total number of syllables Q and the total duration T;
a fifth determining unit, configured to determine, when the number of syllables actually played in the first music unit time is in a preset speed range, the number of syllables actually played in the first music unit time as the number of syllables played in the first music unit time;
wherein the fifth determining unit is further configured to:
and when the number of the syllables of the first music actually played in unit time is not in the preset speed range, determining the numerical value which is closest to the number of the syllables of the first music actually played in unit time in the preset speed range as the number of the syllables played in the first music unit time. By implementing the embodiment of the invention, the terminal can determine the number of syllables played in unit time according to the total number of syllables of the lyrics in the music and the total duration of the lyrics in the playing process, and the number of syllables played in unit time can be used for measuring the playing speed of the music.
In order to better implement the above solution of the embodiment of the present invention, the present invention further provides a music tempo measuring device, which is described in detail below with reference to the accompanying drawings:
as shown in fig. 6, which is a schematic structural diagram of the apparatus for measuring music speed according to the embodiment of the present invention, the apparatus 60 for measuring music speed may include a processor 601, a memory 604 and a communication module 605, and the processor 601, the memory 604 and the communication module 605 may be connected to each other through a bus 606. The Memory 604 may be a Random Access Memory (RAM) Memory or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The memory 604 may optionally be at least one memory system located remotely from the processor 601. The memory 604 is used for storing application program codes and may include an operating system, a network communication module, a user interface module and a data processing program, and the communication module 605 is used for information interaction with an external device; the processor 601 is configured to call the program code to perform the following steps:
the terminal acquires first lyrics of first music; each lyric in the first lyrics is associated with a time stamp, and the time stamp associated with each lyric is used for representing the duration of each lyric in the playing process;
the terminal determines the total syllable number Q of the first lyrics and determines the total duration T of the first lyrics in the playing process according to the time stamp associated with each lyric in the first lyrics;
and the terminal determines the number of syllables played by the first lyric in unit time according to the total number Q of the syllables and the total duration T, wherein the number of the syllables played in unit time is used for measuring the playing speed of the first music.
The duration of the first lyric is not less than a preset duration, and/or the first lyric does not contain a first preset character, wherein the first preset character comprises an Arabic number or a special character.
In one embodiment, before the processor 601 obtains the first lyric of the first music, it may further perform:
performing one or more of a first operation, a second operation, a third operation and a fourth operation on the lyrics of the first music to filter the first lyrics, wherein the first operation comprises: deleting a second preset character when the first lyric contains the second preset character, wherein the second preset character comprises other punctuation marks or spaces except the single apostrophe of English, and the second operation comprises the following steps: when an incorrectly displayed character & apos is included in the first lyric, converting the incorrectly displayed character & apos to an English single apos, the third operation comprising: when the first lyrics contain the dirty word replacement characters obtained by replacement according to a preset dirty word filtering strategy, restoring the dirty word replacement characters according to the reverse operation specified by the preset dirty word filtering strategy; the fourth operation includes: lyrics without corresponding accompaniment are deleted.
In one embodiment, after the processor 601 obtains the first lyrics of the first music, before determining the total number of syllables Q of the first lyrics and determining the total duration T of the first lyrics according to the duration of each lyric in the first lyrics, further performing:
the terminal classifies the first lyrics to obtain M classification sets; the lyrics in each classification set are the same in language type, the lyrics in different classification sets are different in language type, and M is a positive integer;
and the terminal counts the number of the syllables of each lyric in each classification set of the M classification sets.
In one embodiment, after the processor 601 classifies the first lyric, and after obtaining M classification sets, before counting the number of pitches of each lyric in each classification set of the M classification sets, the following steps may be further performed:
identifying the language type of the lyrics in the first classification set, and searching a target syllable number statistical strategy corresponding to the language type of the lyrics in the first classification set according to the corresponding relation between the preset language type and the syllable number statistical strategy; the first classification set is any one of the M classification sets;
the counting of the number of syllables of each lyric in each of the M sorted sets by the processor 601 may include:
and counting the number of the syllables of each lyric in the first classification set according to the target syllable number counting strategy.
In one embodiment, the processor 601, according to the total number of syllables Q and the total duration T, determining the number of syllables played in the unit time of the first music, may include:
determining the number of syllables actually played in unit time of the first music according to the total syllable number Q and the total duration T;
if the number of the syllables actually played in the first music unit time is within the preset speed range, determining the number of the syllables actually played in the first music unit time as the number of the syllables played in the first music unit time;
if the number of the syllables of the first music actually played in the unit time is not in the preset speed range, determining the numerical value closest to the number of the syllables of the first music actually played in the unit time in the preset speed range as the number of the syllables played in the unit time of the first music.
It should be noted that, in the embodiment of the present invention, reference may be made to specific implementation manners of the terminal operation in the embodiments of fig. 1 to fig. 3 in the foregoing method embodiments for the execution step of the processor in the music speed measuring device 60, and details are not described here again.
In a specific implementation, the Device 60 for measuring music speed may include various devices for measuring music speed that can be used by a user, such as a Mobile phone, a tablet computer, a Personal Digital Assistant (PDA), a Mobile Internet Device (MID), and an intelligent wearable Device (e.g., a smart watch and a smart bracelet), and the embodiments of the present invention are not limited in particular.
Embodiments of the present invention also provide a computer storage medium for storing computer software instructions for the apparatus for measuring music speed shown in fig. 1 to 3, which includes a program for executing the method embodiments. By executing the stored program, the number of syllables played per unit time can be determined.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (12)

1. A method for measuring tempo, comprising:
the terminal acquires first lyrics of first music; each lyric in the first lyrics is associated with a time stamp, the time stamp associated with each lyric is used for representing the duration of each lyric in the playing process, and the first lyrics comprise a plurality of language types;
the terminal determines the total syllable number Q of the first lyrics and determines the total duration T of the first lyrics in the playing process according to the time stamp associated with each lyric in the first lyrics; the number of syllables of the lyrics is related to the language type of the lyrics, and one Chinese character corresponds to one syllable under the condition that the language type of the lyrics is Chinese; under the condition that the language type of the lyrics is English, one pronunciation syllable corresponds to one syllable; in the case that the language type of the lyrics is Korean, one Korean corresponds to one syllable;
the terminal determines the number of syllables played by the first music in unit time according to the total number Q of the syllables and the total duration T, wherein the number of the syllables played in the unit time is used for measuring the playing speed of the first music;
the terminal determining the number of syllables played by the first music in unit time according to the total number of syllables Q and the total duration T comprises the terminal determining the number of syllables actually played by the first music in unit time according to the total number of syllables Q and the total duration T, if the number of syllables actually played in unit time of the first music is in a preset speed range, determining the number of syllables actually played by the first music in unit time as the number of syllables played by the first music in unit time, otherwise, determining the numerical value closest to the number of syllables actually played by the first music in unit time in the preset speed range as the number of syllables played by the first music in unit time, wherein the preset speed range is set according to all language types in the first lyrics.
2. The method of claim 1, wherein the first lyric has a duration not less than a preset duration and/or does not contain a first preset character, wherein the first preset character comprises an arabic numeral or a special character.
3. The method of claim 1, wherein before the terminal acquires the first lyrics of the first music, the method further comprises:
performing one or more of a first operation, a second operation, a third operation and a fourth operation on the lyrics of the first music to filter the first lyrics, wherein the first operation comprises: deleting a second preset character when the first lyric contains the second preset character, wherein the second preset character comprises other punctuation marks or spaces except the single apostrophe of English, and the second operation comprises the following steps: when an incorrectly displayed character & apos is included in the first lyric, converting the incorrectly displayed character & apos to an English single apos, the third operation comprising: when the first lyrics contain the dirty word replacement characters obtained by replacement according to a preset dirty word filtering strategy, restoring the dirty word replacement characters according to the reverse operation specified by the preset dirty word filtering strategy; the fourth operation includes: lyrics without corresponding accompaniment are deleted.
4. The method of claim 1, wherein after the terminal acquires the first lyrics of the first music, the terminal determines a total number of syllables Q of the first lyrics and before determining a total duration T of the first lyrics based on a timestamp associated with each lyric of the first lyrics, further comprising:
the terminal classifies the first lyrics to obtain M classification sets; the lyrics in each classification set are of the same language type, the different classification sets are of different language types, and M is a positive integer;
and the terminal counts the number of the syllables of each lyric in each classification set of the M classification sets.
5. The method of claim 4, wherein after the terminal classifies the first lyric and obtains M classification sets, before the terminal counts the number of syllables of each lyric in each classification set of the M classification sets, the method further comprises:
identifying the language type of the lyrics in the first classification set, and searching a target syllable number statistical strategy corresponding to the language type of the lyrics in the first classification set according to the corresponding relation between the preset language type and the syllable number statistical strategy; the first classification set is any one of the M classification sets;
the counting of the number of the syllables of each lyric in each classification set of the M classification sets comprises the following steps:
and counting the number of the syllables of each lyric in the first classification set according to the target syllable number counting strategy.
6. An apparatus for measuring music speed, the apparatus comprising:
an acquisition unit configured to acquire first lyrics of first music; each lyric in the first lyrics is associated with a time stamp, the time stamp associated with each lyric is used for representing the duration of each lyric in the playing process, and the first lyrics comprise a plurality of language types;
a first determining unit for determining a total syllable number Q of the first lyrics; the number of syllables of the lyrics is related to the language type of the lyrics, and one Chinese character corresponds to one syllable under the condition that the language type of the lyrics is Chinese; under the condition that the language type of the lyrics is English, one pronunciation syllable corresponds to one syllable; in the case that the language type of the lyrics is Korean, one Korean corresponds to one syllable;
the second determining unit is used for determining the total duration T of each lyric in the first lyric in the playing process according to the time stamp associated with the lyric;
a third determining unit, configured to determine, according to the total number of syllables Q and the total duration T, a number of syllables played in a unit time of the first music, where the number of syllables played in the unit time is used to measure a playing speed of the first music; the third determining unit further includes a fourth determining unit and a fifth determining unit, wherein,
a fourth determining unit, configured to determine the number of syllables actually played in the first music unit time according to the total number of syllables Q and the total duration T;
a fifth determining unit, configured to determine, when the number of syllables actually played in the first music unit time is in a preset speed range, the number of syllables actually played in the first music unit time as the number of syllables played in the first music unit time, and otherwise, determine, as the number of syllables played in the first music unit time, a value closest to the number of syllables actually played in the first music unit time in the preset speed range, where the preset speed range is set according to all language types in the first lyrics.
7. The apparatus of claim 6, wherein the first lyric has a duration not less than a preset duration and/or does not contain a first preset character, wherein the first preset character comprises an Arabic number or a special character.
8. The apparatus of claim 6, further comprising:
an execution unit, configured to perform one or more of a first operation, a second operation, a third operation, and a fourth operation on the lyrics of the first music to filter the first lyrics, where the first operation includes: deleting a second preset character when the first lyric contains the second preset character, wherein the second preset character comprises other punctuation marks or spaces except the single apostrophe of English, and the second operation comprises the following steps: when an incorrectly displayed character & apos is included in the first lyric, converting the incorrectly displayed character & apos to an English single apos, the third operation comprising: when the first lyrics contain the dirty word replacement characters obtained by replacement according to a preset dirty word filtering strategy, restoring the dirty word replacement characters according to the reverse operation specified by the preset dirty word filtering strategy; the fourth operation includes: lyrics without corresponding accompaniment are deleted.
9. The apparatus of claim 6, further comprising:
the classification unit is used for classifying the first lyrics to obtain M classification sets; the lyrics in each classification set are of the same language type, the different classification sets are of different language types, and M is a positive integer;
and the counting unit is used for counting the number of the syllables of each lyric in each classification set of the M classification sets.
10. The apparatus of claim 9, further comprising:
the recognition unit is used for recognizing the language type of the lyrics in the first classification set and searching a target syllable number statistical strategy corresponding to the language type of the lyrics in the first classification set according to the corresponding relation between the preset language type and the syllable number statistical strategy; the first classification set is any one of the M classification sets;
the statistical unit is specifically configured to:
and counting the number of the syllables of each lyric in the first classification set according to the target syllable number counting strategy.
11. A terminal, comprising a processor, an input device, an output device, and a memory, the processor, the input device, the output device, and the memory being interconnected, wherein the memory is configured to store a computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method of any of claims 1-5.
12. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to carry out the method according to any one of claims 1-5.
CN201910066648.1A 2019-01-22 2019-01-22 Method, terminal and computer readable medium for measuring music speed Active CN109584905B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910066648.1A CN109584905B (en) 2019-01-22 2019-01-22 Method, terminal and computer readable medium for measuring music speed

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910066648.1A CN109584905B (en) 2019-01-22 2019-01-22 Method, terminal and computer readable medium for measuring music speed

Publications (2)

Publication Number Publication Date
CN109584905A CN109584905A (en) 2019-04-05
CN109584905B true CN109584905B (en) 2021-09-28

Family

ID=65917135

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910066648.1A Active CN109584905B (en) 2019-01-22 2019-01-22 Method, terminal and computer readable medium for measuring music speed

Country Status (1)

Country Link
CN (1) CN109584905B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110033782B (en) * 2019-04-11 2021-08-24 腾讯音乐娱乐科技(深圳)有限公司 Method for calculating syllable number in unit time and related device
CN112750436B (en) * 2020-12-29 2022-12-30 上海掌门科技有限公司 Method and equipment for determining target playing speed of voice message

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10340093A (en) * 1997-06-06 1998-12-22 Daiichi Kosho:Kk Method and device to inform of text together with singing chance to visually handicapped person in karaoke (sing-along machine) device
CN102467939A (en) * 2010-11-04 2012-05-23 北京彩云在线技术开发有限公司 Song audio frequency cutting apparatus and method thereof
CN105989823A (en) * 2015-02-03 2016-10-05 中国移动通信集团四川有限公司 Automatic meter-following accompanying method and device
CN106294555A (en) * 2016-07-26 2017-01-04 捷开通讯(深圳)有限公司 A kind of method and system filtering music file
CN106446280A (en) * 2016-11-01 2017-02-22 青岛海信移动通信技术股份有限公司 Song data processing method and device
CN109166564A (en) * 2018-07-19 2019-01-08 平安科技(深圳)有限公司 For the method, apparatus and computer readable storage medium of lyrics text generation melody

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10340093A (en) * 1997-06-06 1998-12-22 Daiichi Kosho:Kk Method and device to inform of text together with singing chance to visually handicapped person in karaoke (sing-along machine) device
CN102467939A (en) * 2010-11-04 2012-05-23 北京彩云在线技术开发有限公司 Song audio frequency cutting apparatus and method thereof
CN105989823A (en) * 2015-02-03 2016-10-05 中国移动通信集团四川有限公司 Automatic meter-following accompanying method and device
CN106294555A (en) * 2016-07-26 2017-01-04 捷开通讯(深圳)有限公司 A kind of method and system filtering music file
CN106446280A (en) * 2016-11-01 2017-02-22 青岛海信移动通信技术股份有限公司 Song data processing method and device
CN109166564A (en) * 2018-07-19 2019-01-08 平安科技(深圳)有限公司 For the method, apparatus and computer readable storage medium of lyrics text generation melody

Also Published As

Publication number Publication date
CN109584905A (en) 2019-04-05

Similar Documents

Publication Publication Date Title
WO2019184217A1 (en) Hotspot event classification method and apparatus, and storage medium
CN110263248B (en) Information pushing method, device, storage medium and server
US20080077869A1 (en) Conference supporting apparatus, method, and computer program product
CN111079412A (en) Text error correction method and device
CN112287914B (en) PPT video segment extraction method, device, equipment and medium
CN111324771B (en) Video tag determination method and device, electronic equipment and storage medium
CN111460131A (en) Method, device and equipment for extracting official document abstract and computer readable storage medium
CN109508441B (en) Method and device for realizing data statistical analysis through natural language and electronic equipment
CN109584905B (en) Method, terminal and computer readable medium for measuring music speed
CN101963972A (en) Method and system for extracting emotional keywords
CN112562684A (en) Voice recognition method and device and electronic equipment
CN107357782B (en) Method and terminal for identifying gender of user
CN115661302A (en) Video editing method, device, equipment and storage medium
CN107797676B (en) Single character input method and device
CN112861510A (en) Summary processing method, apparatus, device and storage medium
CN111935552A (en) Information labeling method, device, equipment and medium
CN106446280A (en) Song data processing method and device
CN114880498B (en) Event information display method and device, equipment and medium
CN104007952A (en) Input method, device and electronic device
CN110795101A (en) SQL code information display method and device, computer device and storage medium
JP2010102564A (en) Emotion specifying device, emotion specification method, program, and recording medium
CN113157964A (en) Method and device for searching data set through voice and electronic equipment
CN114141235A (en) Voice corpus generation method and device, computer equipment and storage medium
CN113516984A (en) Sign language interaction method, system, equipment and storage medium
CN113760918A (en) Method, device, computer equipment and medium for determining data blood relationship

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