WO2017056982A1 - 楽曲検索方法および楽曲検索装置 - Google Patents

楽曲検索方法および楽曲検索装置 Download PDF

Info

Publication number
WO2017056982A1
WO2017056982A1 PCT/JP2016/077041 JP2016077041W WO2017056982A1 WO 2017056982 A1 WO2017056982 A1 WO 2017056982A1 JP 2016077041 W JP2016077041 W JP 2016077041W WO 2017056982 A1 WO2017056982 A1 WO 2017056982A1
Authority
WO
WIPO (PCT)
Prior art keywords
music
search
pitch
query
music search
Prior art date
Application number
PCT/JP2016/077041
Other languages
English (en)
French (fr)
Inventor
秀樹 高野
Original Assignee
ヤマハ株式会社
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 ヤマハ株式会社 filed Critical ヤマハ株式会社
Priority to JP2017543101A priority Critical patent/JP6794990B2/ja
Publication of WO2017056982A1 publication Critical patent/WO2017056982A1/ja
Priority to US15/925,088 priority patent/US20180210952A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/60Information retrieval; Database structures therefor; File system structures therefor of audio data
    • G06F16/63Querying
    • G06F16/632Query formulation
    • G06F16/634Query by example, e.g. query by humming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/60Information retrieval; Database structures therefor; File system structures therefor of audio data
    • G06F16/61Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/60Information retrieval; Database structures therefor; File system structures therefor of audio data
    • G06F16/63Querying
    • G06F16/638Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/60Information retrieval; Database structures therefor; File system structures therefor of audio data
    • G06F16/68Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/683Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content

Definitions

  • the present invention relates to a technique for searching for music.
  • Patent Document 1 discloses an incremental music search device that sequentially searches for music containing a note string corresponding to a note string designated by a user for each designation of a note.
  • Patent Document 2 and Non-Patent Document 1 are not related to music search, these documents disclose techniques for searching sequence data partially similar to a search query.
  • Patent Document 1 obtains, as a search result, a music piece having a note string that matches the input note string. For this reason, there is a problem that an appropriate search result cannot be obtained when a singing voice that does not necessarily accurately represent the desired music is input.
  • Patent Document 2 and Non-Patent Document 1 were not intended for music search.
  • the present invention provides a technique for quickly searching for a desired music piece based on voice input.
  • the present invention symbolizes a temporal change in pitch in an input voice from a user, and edit distance, which is performed using a symbol string including the coded input voice as a query for a plurality of music pieces recorded in a database.
  • a music search method for obtaining a partial sequence matching result based on is provided.
  • the present invention also provides a symbolizing unit that symbolizes a temporal change in pitch in an input voice from a user, and queries a symbol string including the symbolized input voice for a plurality of music pieces recorded in a database.
  • a music search device having an acquisition unit that acquires a result of partial sequence matching based on the editing distance.
  • the figure which illustrates the functional composition of music search system 1 The figure which illustrates the hardware constitutions of the terminal device 10
  • Sequence chart showing an outline of the operation of the music search system 1 The flowchart which shows the detail of the process of step S1
  • the figure which illustrates the matching matrix which concerns on this embodiment The figure which shows the detail of a process of step S3
  • the figure which shows the detail of a process of step S7 The figure which illustrates the processing which calculates similarity
  • FIG. 1 is a diagram illustrating an overview of a music search system 1 according to an embodiment.
  • the music search system 1 receives a user's singing voice as an input, and searches for music having a portion similar to the singing voice from a plurality of music recorded in the database (hereinafter referred to as “music searching service”). It is a system that provides The music search system 1 includes a terminal device 10 and a server device 20.
  • the terminal device 10 is a device that functions as a client in the music search service, and is an example of a music search device.
  • the server device 20 is a device that functions as a server in the music search service.
  • the terminal device 10 and the server device 20 are connected via a network 30.
  • the network 30 includes, for example, at least one of the Internet, a LAN (Local Area Network), and a mobile communication network.
  • FIG. 2 is a diagram illustrating a functional configuration of the music search system 1.
  • the music search system 1 includes a voice input unit 11, a symbolization unit 12, a query generation unit 13, a storage unit 14, a search unit 15, an output unit 16, a correction unit 17, and an acquisition unit 18.
  • the voice input unit 11, the symbolization unit 12, the query generation unit 13, the output unit 16, and the acquisition unit 18 are mounted on the terminal device 10, and the search unit 15 and the correction unit 17 are mounted on the server device 20. Yes.
  • the voice input unit 11 receives voice input from the user.
  • the symbolizing unit 12 symbolizes the time change of the pitch in the voice received by the voice input unit 11.
  • the query generation unit 13 generates a search query including the input voice symbolized by the symbolization unit 12.
  • the storage unit 14 stores a database in which information on a plurality of songs is recorded.
  • the search unit 15 searches the database stored in the storage unit 14 for music having a portion similar to the search query generated by the query generation unit 13.
  • the search unit 15 employs a search algorithm based on partial sequence matching based on the edit distance. Partial sequence matching refers to specifying a portion similar to a search query among matching objects (music in this example). This similar part is called “similar section”.
  • the correction unit 17 corrects the search result by a method different from the partial sequence matching based on the edit distance for a predetermined number of songs in order from the highest in the search result by the search unit 15.
  • the correction unit 17 corrects the search result based on the onset time difference.
  • the output unit 16 outputs the search result by the search unit 15 and the search result by the correction unit 17.
  • FIG. 3 is a diagram illustrating a hardware configuration of the terminal device 10.
  • the terminal device 10 is, for example, a tablet terminal, a smartphone, a mobile phone, or a personal computer.
  • the terminal device 10 is a computer device having a CPU (Central Processing Unit) 100, a memory 101, a storage 102, an input device 103, a display device 104, an audio output device 105, and a communication IF 106.
  • the CPU 100 is a device that performs various calculations and controls other hardware elements.
  • the memory 101 is a storage device that stores codes and data used when the CPU 100 executes processing, and includes, for example, a ROM (Read Only Memory) and a RAM (Random Access Memory).
  • the storage 102 is a non-volatile storage device that stores various data and programs, and includes, for example, an HDD (Hard Disk Drive) or a flash memory.
  • the input device 103 is a device for inputting information to the CPU 100, and includes at least a microphone in this example.
  • the input device 103 may further include at least one of, for example, a keyboard, a touch screen, and a remote controller.
  • the display device 104 is a device that outputs an image, and includes, for example, a liquid crystal display or an organic EL display.
  • the audio output device 105 is a device that outputs audio, and includes, for example, a DA converter, an amplifier, and a speaker.
  • the communication IF 106 is an interface that communicates with other devices via the network 30.
  • the memory 101 and storage 102 are considered as non-transitory recording media. However, in this specification, the term “non-transitory” recording medium includes all computer-readable recording media except for transient and propagating signals
  • the storage 102 stores an application program (hereinafter referred to as “client program”) for causing the computer device to function as a client device in the music search service.
  • client program an application program
  • the function of FIG. 2 is implemented by the CPU 100 executing the client program.
  • the input device 103 (particularly a microphone) is an example of the voice input unit 11.
  • the CPU 100 executing the client program is an example of the symbolizing unit 12, the query generating unit 13, and the acquiring unit 18.
  • the display device 104 is an example of the output unit 16.
  • FIG. 4 is a diagram illustrating a hardware configuration of the server device 20.
  • the server device 20 is a computer device having a CPU 200, a memory 201, a storage 202, and a communication IF 206.
  • the CPU 200 is a device that performs various calculations and controls other hardware elements.
  • the memory 201 is a storage device that stores codes and data used when the CPU 200 executes processing, and includes, for example, a ROM and a RAM.
  • the storage 202 is a non-volatile storage device that stores various data and programs, and includes, for example, an HDD (Hard Disk Drive) or a flash memory.
  • the communication IF 206 is an interface that communicates with other devices via the network 30. Memory 201 and storage 202 are considered as non-transitory recording media.
  • the storage 202 stores a program (hereinafter referred to as “server program”) for causing the computer device to function as a server device in the music search service.
  • server program a program for causing the computer device to function as a server device in the music search service.
  • the functions of FIG. 2 are implemented by the CPU 200 executing the server program.
  • the storage 202 is an example of the storage unit 14.
  • the CPU 200 executing the server program is an example of the search unit 15 and the correction unit 17.
  • FIG. 5 is a sequence chart showing an outline of the operation of the music search system 1.
  • the terminal device 10 accepts a voice input by the user.
  • the terminal device 10 transmits a search query generated based on the input search instruction to the server device 20.
  • a search query is an information request for a search engine and includes a search key.
  • the search key includes a symbolized input voice.
  • the server device 20 searches for music according to the given search query.
  • a search using a partial sequence matching search algorithm based on the edit distance is performed.
  • the server device 20 transmits the search result to the terminal device 10.
  • the terminal device 10 displays the search result.
  • the search is performed incrementally. That is, the processes in steps S1 to S5 are repeatedly executed with a predetermined event as a trigger. That is, search query generation, music search, and result output are repeatedly performed in parallel with voice input.
  • step S6 the terminal device 10 requests the server device 20 for more detailed matching (search).
  • step S ⁇ b> 7 the server device 20 corrects the search result based on the onset time difference with respect to a predetermined number of upper-ranked songs in order from the one with the highest similarity by the search by partial sequence matching based on the edit distance.
  • step S8 the server device 20 transmits the corrected search result.
  • step S9 the terminal device 10 displays the search result.
  • FIG. 6 is a flowchart showing details of the process in step S1.
  • the flow in FIG. 6 is started when, for example, the user instructs the start of voice input.
  • the voice input start instruction is input via a touch screen that is the input device 103, for example.
  • software such as a client program may be described as a subject of processing. This is because a processor such as the CPU 100 executing the software executes processing in cooperation with other hardware elements. It means to do.
  • step S11 the client program determines whether the pitch of the input voice is stable.
  • the input voice refers to a user's singing voice input via a microphone that is the input device 103. Since the input voice is a user (human) singing voice, its pitch fluctuates and becomes unstable due to various factors.
  • the pitch of the input voice satisfies a predetermined stability condition
  • the client program determines that the pitch of the input voice is stable.
  • the stability condition for example, a condition that a pitch fluctuation index is smaller than a threshold value is used.
  • an index of pitch fluctuation for example, the variance of pitches in the most recent predetermined period or the difference between the maximum value and the minimum value is used.
  • step S11 If it is determined that the pitch of the input voice is stable (S11: YES), the client program proceeds to step S12. If it is determined that the pitch of the input voice is not stable (S11: NO), the client program waits until the pitch is stabilized. The process of step S11 is performed using the voice input unit 11.
  • step S12 the client program digitizes the pitch. What is digitized here is a sound in a range determined to be stable in step S11, that is, a single sound in a range in which the pitches are considered to be the same.
  • the client program stores the digitized pitches in the memory 101.
  • step S ⁇ b> 13 the client program calculates a relative pitch difference between the newly digitized sound and the previous digitized sound.
  • the pitch difference ⁇ P is represented by P [i], which represents the pitch of a newly digitized sound (i-th sound in the input speech).
  • ⁇ P P [i] ⁇ P [i ⁇ 1] (1) It is.
  • step S14 the client program symbolizes the pitch difference ⁇ P.
  • the pitch difference is represented by adding a sign (+ or ⁇ ) indicating the direction of change to a numerical value based on the pitch (relative pitch) in the twelve equal temperament.
  • the processes in steps S12 to S14 are performed by the symbolizing unit 12.
  • step S15 the client program generates a search query.
  • the search query includes, in time series, a difference in pitch detected from the start of voice input to this point. For example, when the i-th sound is detected in the input voice, the search query includes (i ⁇ 1) pitch difference symbols from S [2] to S [i].
  • the process of step S15 is performed by the query generation unit 13.
  • FIG. 7 is a diagram illustrating a pitch difference in input speech.
  • the vertical axis represents pitch and the horizontal axis represents time.
  • Periods D1 to D7 indicate periods in which the pitch is determined to be stable.
  • Times t1 to t7 indicate times at which the pitches are determined to be stable in each of the periods D1 to D7 (that is, times when new sounds are detected). For example, a new sound is detected at time t2.
  • the client program generates a search query when a new sound is detected. Therefore, in this example, the client program generates a search query at times t2 to t7.
  • the search query generated at each time is the information that symbolizes the difference in pitch from the previous sound for all sounds detected from the start of voice input until that time (that is, the pitch of the pitch). Difference permutation).
  • the permutation of symbolized pitch differences does not include information on the sound length, ie, the time length of each sound (time length information is ignored). Whether the length of the newly detected sound corresponds to a sixteenth note or a half note, it does not affect the permutation of pitch differences. Only the difference in pitch from the previous sound is recorded as information. Rests also do not affect the permutation of pitch differences. Whether one sound and the next sound are continuous or with a rest, it is the same if symbolized.
  • step S16 the client program determines whether the pitch has become unstable. For example, the same criterion as that used in step S11 is used as a criterion for determining whether the pitch is unstable.
  • the client program waits until the pitch becomes unstable. If it is determined that the pitch has become unstable (S16: YES), the client program proceeds to step S11.
  • the client program ends acceptance of voice input when a user inputs an instruction to end voice input via the touch screen.
  • the client program may end the reception of the voice input when the silent period continues for the threshold time or longer.
  • the client program transmits the generated search query to the server device 20 (step S2). If the time required from when the search query is generated to when it is transmitted is ignored, in the example of FIG. 7, the search query is transmitted at times t1 to t7.
  • the Levenshtein distance is a distance that indicates how different two symbol strings are, according to the minimum procedure required to edit one symbol string into another by inserting, deleting, and replacing characters. expressed. Fuzzy search based on Levenshtein distance is suitable for music search by voice input, which is more likely to cause partial mistakes (singing mistakes) than other methods such as regular expression and N-gram similarity. .
  • FIG. 8 is a diagram illustrating a matrix for calculating the Levenstein distance.
  • the symbol string of the matching target is “GAHCDBC” and the symbol string of the search query is “ABC” is used.
  • the formulas (2) and (3) an example using a symbol with a plus / minus sign added to a numerical value is used.
  • a pitch difference is symbolized into one alphabetic character.
  • the edit distance is equivalent to all of insertion, deletion, and replacement, and is “1”.
  • the i-th and subsequent symbol strings of the search query are placed after the j-th symbol string to be matched.
  • this symbol string is referred to as “target symbol string” in each cell.
  • the symbol string “GABC” obtained by adding the first and subsequent symbol strings “ABC” of the search query after the first symbol string “G” to be matched is the target symbol string. It is.
  • the symbol string “GAHCDBBC” obtained by adding the second and subsequent symbol strings “BC” of the search query to the sixth symbol string “GAHCDB” to be matched is the target symbol string. It is.
  • the target symbol string is described in the upper part of each cell.
  • the Levenshtein distance from the search query is calculated for the target symbol string of each cell.
  • the target symbol string is obtained by inserting “G” at the beginning of the search query, so the edit distance is “1”.
  • cell (6, 2) insert “G” at the beginning of the search query, and insert “HCDB” between the first character “A” and the second character “B” of the search query. Since the target symbol string is obtained by this, the editing distance is “5”.
  • the edit distance calculated in this way is shown in the lower part of each cell.
  • the Levenshtein distance increases as the music piece is longer.
  • FIG. 9 is a diagram illustrating a matching matrix according to this embodiment.
  • the matching matrix corresponds to the matrix for calculating the edit distance shown in FIG. 8, and is for specifying a similar section.
  • the concept of the target symbol string is the same as that described with reference to FIG.
  • the symbol string up to the j-th column to be matched represented by an asterisk in the search query
  • the search query is equal to the target symbol string, and the edit distance is zero.
  • the edit distance D (j, i) is calculated as follows.
  • D (j, i) d (j, i) + min [D (j-1, i-1), D (j-1, i), D (j, i-1)] ...
  • d (j, i) is the (j-1) th matching target at the head of the target symbol string in the cell (j, i) and the (i-1) th and subsequent symbol strings of the search query. This is the Levenshtein distance from the symbol string to which the symbol string up to is added.
  • the function min represents the minimum argument.
  • the second term on the right side of the above expression indicates the minimum value among the edit distances D of the upper left cell, the upper left cell, and the upper left cell of the target cell.
  • the lowermost row (the fifth row in the example of FIG. 9) of the matching matrix indicates the minimum value among the edit distances of the upper left cell, the upper left cell, and the upper left cell. From this, the edit distance recorded in the lower right cell of the matching matrix indicates the edit distance of the part most similar to the search query among the matching objects, that is, the minimum distance from the search query.
  • the minimum distance from the search query is zero. According to this method, the matching matrix is guaranteed to output the minimum distance from the search query regardless of the length of the symbol string to be matched.
  • the minimum distance from the search query in the music is referred to as “score”.
  • the score is an index value indicating the level of similarity (similarity) of the music to the search query. In this example, it is shown that the closer the score is to zero, the portion similar to the search query is included (the degree of similarity is high). If only a music piece including a portion similar to the search query is searched, it is not necessary to store all the editing distances of the calculated matching matrix, and only the score may be stored for each music piece.
  • the optimum route here, the route that follows the cell with the smallest distance among the right neighbor, lower right, and lower neighbor cells. If there are multiple cells with the same distance, “more right” and “more than The cell “bottom” is prioritized.
  • One similar section similar section r2 in the example of FIG.
  • FIG. 10 is a diagram showing details of the processing in step S3.
  • the process of step S3 is performed by the search unit 15.
  • the server program determines whether a search query has been received from the terminal device 10. If it is determined that a new search query has been received (S31: YES), the server program proceeds to step S32. When it is determined that a new search query has not been received (S31: NO), the server program waits until a search query is received.
  • the server program identifies one piece of music to be matched from a piece of music stored in the database stored in the storage unit 14 according to a predetermined order.
  • the database includes information on each piece of music, specifically, attribute information such as an identifier of the piece of music, music data for reproducing the piece of music (eg, MIDI (Musical Instrument Digital Interface) data, linear PCM (Pulse Code Modulation) ) Uncompressed audio data such as data, or compressed audio data such as so-called MP3 data). Furthermore, this database includes data that symbolizes the main melody (for example, the melody of the main vocal in the case of a song) among the music.
  • step S33 the server program calculates a matching matrix (specifically, an edit distance in each cell and a minimum distance (that is, a score) from the search query for the music) for the music to be matched.
  • the method for calculating the matching matrix is as described above.
  • the server program reads and uses data in which the music to be matched is symbolized from the database.
  • step S34 the server program determines whether the score of the music to be matched is smaller than a threshold value.
  • This threshold value is set in advance, for example.
  • the server program deletes the calculated matching matrix from the memory 201 (step S35). If it is determined that the score is smaller than the threshold value (S34: YES), the server program proceeds to step S36.
  • step S36 the server program records the identifier and score of the music to be matched in the result table.
  • the result table is a table in which information related to music having a high similarity (score is smaller than a threshold value) is recorded.
  • the result table further includes information specifying a similar section in each music piece.
  • step S37 the server program determines whether the calculation of the matching matrix has been completed for all songs recorded in the database. If it is determined that there is a song for which the matching matrix has not yet been calculated (S37: NO), the server program proceeds to step S32. In step S32, the next music piece becomes a new matching target, and the processing in steps S33 to S36 is performed for the new matching target music piece. If it is determined that the calculation of the matching matrix has been completed for all the music pieces (S37: YES), the server program proceeds to step S4. In step S4, the server program transmits a result table as a search result to the terminal device 10 that has transmitted the search query.
  • FIG. 11 is a diagram illustrating the search result displayed in step S5.
  • the client program of the terminal device 10 displays the search result using the result table received from the server device 20.
  • the displayed search result includes an identifier (song name in this example) and a score for a plurality of songs.
  • the plurality of music pieces are arranged in the order of high similarity (in order of increasing score value).
  • the display method of the search results is not limited to the example of FIG.
  • information specifying a similar section for example, a score or lyrics of a similar section
  • only information related to a single music having the highest score may be displayed instead of information related to a plurality of music.
  • the search result is continuously updated as long as the voice input is continued. Soon after the voice input starts, the search query is short, so it is highly likely that the search results will contain noise, but as the search query gets longer as the voice input continues, the music is narrowed down and the noise is reduced. It is expected to go.
  • the terminal device 10 requests the server device 20 for more detailed matching, that is, higher accuracy of the search result (step S6).
  • the condition for starting the detailed matching is, for example, a condition that the voice input is finished or an explicit instruction for detailed matching is input from the user.
  • the terminal device 10 transmits a detailed matching request (hereinafter referred to as “high accuracy request”).
  • This request for high accuracy includes information indicating a request for detailed matching, a search query, information for specifying a target song, and information for specifying a similar section in each song.
  • the information specifying the target music includes the identifiers of at least some of the music included in the result table received in step S4. At least some of the songs are, for example, songs from the highest degree of similarity to a predetermined rank (1 to 10 as a specific example) in the result table.
  • the search query included in the high accuracy request is information different from the search query generated in steps S14 and S15, and includes information on the sound length of each sound.
  • the information regarding the sound length includes, for example, information indicating an onset time difference.
  • the onset time difference is the length of time from the start of sound generation to the start of sound generation of the next sound.
  • first search query when the search query transmitted in step S6 is distinguished from the search query generated in steps S14 and S15, the former is referred to as a “first search query” and the latter is referred to as a “second search query”.
  • the second search query may be uncompressed audio data or compressed audio data indicating the waveform of the input audio, or may be data obtained by encoding the input audio including the onset time difference.
  • the client program converts the input voice into data and stores it, and generates a second search query using the stored data.
  • the time length of pronunciation is ignored, whereas in the search by the second search query, the music is narrowed down in consideration of the time length of pronunciation.
  • FIG. 12 is a diagram showing details of the process in step S7.
  • the process of step S7 is performed by the correction unit 17.
  • the server program specifies one piece of music to be matched from a target piece of music included in the high accuracy request according to a predetermined order.
  • step S72 the server program compares the similar section with the first search query and the second search query in the music to be matched, and quantifies the similarity between the two.
  • the onset time difference is taken into account when quantifying the similarity. Instead of the onset time difference, the time length of the voiced sound section of the input speech (that is, the time length of the section in which the pitch is detected) can be symbolized in the second search query.
  • FIG. 13 is a diagram illustrating a process for calculating the similarity.
  • two music pieces music piece 1 and music piece 2 are considered as matching targets.
  • FIG. 13 shows only the musical score of the similar section to the first search query among the music 1 and the music 2.
  • the two are different tunes, but if they are symbolized in steps S14 and S15 and the sound length information is deleted, they become the same symbol.
  • the symbol “ABCABC” is considered as an example. Since the symbols are the same, the score of the music 1 and the score of the music 2 are the same in the search in the first stage.
  • FIG. 13 also shows the second search query.
  • the first search query is “ABCABC”.
  • the second search query can be expressed as, for example, “A (1) B (1) C (1) A (2) B (1) C (1)”.
  • the number in parentheses represents the onset time difference between the sound of the preceding symbol and the previous sound (in this example, the time length corresponding to an eighth note is “1”).
  • the musical piece 1 is symbolized including the onset time difference, it can be expressed as “A (1) B (2) C (2/3) A (2/3) B (2/3) C (2)”.
  • music 2 is symbolized including the onset time difference, it can be expressed as “A (1) B (1) C (1) A (2) B (1) C (1)”.
  • the onset time difference of the first sound is set to 1.
  • the server program first calculates the onset time difference between the music 1 and the search query.
  • the square of the onset time difference is obtained for each sound, and this is integrated for all sounds in the similar section.
  • the smaller the value of the onset time difference ⁇ L the more similar to the search query. That is, in this example, it can be seen that the music 2 is more similar to the search query than the music 1 (that is, the similarity to the music 2 is higher than the similarity to the music 1).
  • the onset time difference ⁇ L is the second index value indicating the level of similarity between the music to be matched and the second search query (in contrast, the score is the same as that of the music to be matched and the second search query). It can be said that this is the first index value indicating the level of similarity with one search query).
  • step S73 the server program corrects the score of the music to be matched using the onset time difference calculated in step S72. For example, the server program adds or multiplies the calculated onset time difference to the score of the music to be matched.
  • step S74 the server program determines whether score correction has been completed for all of the matching target songs specified in the high accuracy request. If it is determined that there is a music piece whose score has not been corrected yet (S74: NO), the server program proceeds to step S71.
  • step S71 the server program specifies a new music to be matched, and thereafter performs the processes of steps S72 to S73.
  • the server program transmits a list of corrected scores to the terminal device 10 that is the transmission source of the request for high accuracy (step) S8).
  • the terminal device 10 displays the search result (step S9).
  • the result display here is performed in the same manner as the result display in step S5, for example. Alternatively, this result may be displayed together with information indicating that this result is the final result (no further incremental search is performed).
  • FIG. 14 is a diagram illustrating a configuration of the karaoke system 5 according to an embodiment.
  • the karaoke system 5 includes a karaoke device 50 and a server device 60.
  • the karaoke device 50 is a device that plays (reproduces) the music selected by the user.
  • the server device 60 stores karaoke music data and provides a music search service.
  • Karaoke device 50 and server device 60 communicate via the Internet or a dedicated line.
  • the karaoke apparatus 50 includes a voice input unit 11, a symbolization unit 12, a query generation unit 13, an output unit 16, a specification unit 51, a communication unit 52, and a playback unit 53.
  • the karaoke device 50 corresponds to the terminal device 10 in the music search system 1 (that is, corresponds to a music search device).
  • the voice input unit 11, the symbolization unit 12, the query generation unit 13, and the output unit 16 are as described above.
  • the specifying unit 51 acquires the tempo and key in the song from the input voice of the user's song.
  • the communication unit 52 communicates with the server device 60.
  • the communication unit 52 transmits a search query generated by the query generation unit 13 and a request for one piece of music to the server device 60 and receives music data from the server device 60.
  • the reproduction unit 53 reproduces music according to the music data received from the server device 60.
  • the reproduction unit 53 includes, for example, a speaker and an amplifier.
  • the server device 60 includes a storage unit 14, a search unit 15, a correction unit 17, and a communication unit 61.
  • the server device 60 corresponds to the server device 20 in the music search system 1.
  • the storage unit 14, the search unit 15, and the correction unit 17 are as described above.
  • the database stored in the storage unit 14 is a database of karaoke songs.
  • the communication unit 61 communicates with the karaoke apparatus 50. In this example, the communication unit 61 transmits the search result and the music data to the karaoke apparatus 50.
  • FIG. 15 is a sequence chart showing an outline of the operation of the karaoke system 5.
  • the karaoke apparatus 50 accepts voice input.
  • the karaoke apparatus 50 transmits a search query to the server apparatus 60.
  • the server device 60 searches for music having a portion similar to the search query.
  • the karaoke apparatus 50 displays the search result.
  • the details of the processes in steps S100 to S500 are the same as the processes in steps S1 to S9 in the music search system 1.
  • step S600 the karaoke apparatus 50 selects one piece of music from a plurality of pieces of music obtained as a search result.
  • the music may be selected by the user's instruction input, or automatically selected by the karaoke apparatus 50 regardless of the user's explicit instruction (for example, the music having the highest similarity (the score is lowest) is automatically selected). May be.
  • step S700 the karaoke apparatus 50 transmits a request for the selected music piece to the server apparatus 60.
  • This request includes an identifier that identifies the selected song.
  • the server device 60 transmits the music data of the requested music to the karaoke device 50.
  • step S ⁇ b> 800 the karaoke apparatus 50 receives music data from the server apparatus 60.
  • step S900 the karaoke apparatus 50 reproduces karaoke music according to the received music data.
  • the karaoke apparatus 50 reproduces the karaoke music with the tempo and the key extracted from the user input voice.
  • the karaoke apparatus 50 extracts the tempo and key of the song from the input voice of the song at any timing from steps S100 to S800.
  • the karaoke apparatus 50 reproduces karaoke music according to the tempo and key extracted from the input voice.
  • the karaoke apparatus 50 reproduces karaoke music from a reproduction position (reproduction time) following the user's singing.
  • the reproduction position that follows the user's song refers to a reproduction position that is specified in accordance with a similar section to the search query in the selected karaoke piece.
  • a similar section to the search query in the selected karaoke piece.
  • an ideal system in which the time difference from when the karaoke apparatus 50 transmits a search query to the server apparatus 60 to request transmission of music data and when reception of the music data is completed is almost zero.
  • the karaoke apparatus 50 reproduces the karaoke music from the end of the similar section.
  • the karaoke device 50 reproduces the karaoke music from the time when the predicted value of the time difference is added at the end of the similar section.
  • the user can save the trouble of searching for a desired music from a huge list. Furthermore, according to the karaoke system 5, karaoke music (accompaniment) is reproduced in a form following the user's a cappella singing, and a new way of enjoying can be provided.
  • the search can be terminated when the user selects one of a plurality of pieces of music obtained as a search result.
  • the output unit 16 displays a list of searched music pieces. Specifically, a list in which the names of a plurality of songs are arranged in descending order of the scores is displayed. It is possible to change the display mode (for example, display color or size) of each music piece according to the score.
  • the user can select the music that he intended from the list.
  • the output unit 16 highlights the music selected by the user. For example, the music selected by the user is moved to the top of the list and displayed in a display mode different from other music (for example, in a different color).
  • the search for the music piece ends, and the search result at that time is determined as the final result. Specifically, the generation and transmission of the search query is terminated when the user selects a song, and thereafter, the search for the song is not executed.
  • the calculation method of the edit distance is not limited to the one exemplified in the embodiment.
  • the editing costs of insertion, deletion, and replacement are not equivalent and may be weighted.
  • the editing cost for replacement may be different depending on the difference in pitch before and after replacement.
  • the editing cost may be set to be smaller as the difference in pitch before and after replacement is smaller. Only the simple Levenshtein distance does not take into account the difference in pitch, and the editing cost, that is, the score is the same whether the search query is shifted by a semitone or by 5 tones. However, in this example, the smaller the pitch difference, the lower the editing cost.
  • the editing cost may be different for each type of editing such that the editing cost is higher than the deleting cost than the inserting.
  • the editing cost may be determined according to the past search query history. For example, with respect to a specific part of a certain piece of music, a past search query may statistically show a tendency that the pitch of the specific part is lower than the actual music. In this case, the editing cost is set to be lower when the pitch of the specific part in the search query is lower than the pitch of the specific part in the music than when the pitch is high. .
  • the pitch difference satisfies a specific condition in a search query (for example, when the pitch increases by one octave or more between the previous and next sounds)
  • the tendency of a specific pitch deviation to occur is statistically observed. If it is determined, the editing cost is set according to this tendency.
  • the event that triggers the generation of the search query is not limited to the detection of a new sound in the input voice.
  • the search query may be generated when a predetermined time has passed since the most recent generation of the search query during voice input. In particular, immediately after the start of voice input, a search query may be generated when the data amount of the input voice that has been symbolized exceeds a threshold value. Alternatively, the search query may be generated when a predetermined number of new pitch differences are detected in the input voice. In yet another example, a search query may be generated when voice input is completed. In this case, an incremental search is not performed.
  • the search query for performing partial sequence matching based on the edit distance may include onset time difference information. That is, the symbolizing unit 12 may symbolize the voice including the information on the onset time difference. Further, the symbolizing unit 12 may symbolize the pitch itself, not the pitch difference. In this case, the search unit 15 converts the transition of the pitch included in the search query into the transition of the pitch change.
  • the method of symbolizing the pitch difference is not limited to the one exemplified in the embodiment. It may be symbolized by a standard that does not depend on the pitch in the scale such as twelve equal temperament.
  • the method for increasing the accuracy of the search result is not limited to the one exemplified in the embodiment. Any method may be employed as long as it uses information that is not used in partial sequence matching based on the edit distance.
  • the function of the correction unit 17, that is, the correction of the search result based on the onset time difference may be omitted.
  • the timing at which the correction unit 17 corrects the search result is not limited to that exemplified in the embodiment.
  • the result display in step S5 and the detailed search request in step S6 may be omitted.
  • the server device 20 searches for music (step S3), it automatically corrects the search result (step S7). That is, the server device 20 sequentially searches for music and corrects search results.
  • the terminal device 10 transmits information on the onset time difference to the server device 20 in step S2.
  • the server device 20 transmits the corrected search result to the terminal device 10.
  • the hardware configuration of the music search system 1 is not limited to that illustrated in FIGS.
  • the music search system 1 may have any hardware configuration as long as the required function can be realized.
  • the correspondence between functions and hardware elements is not limited to those exemplified in the embodiment.
  • the terminal device 10 may have functions corresponding to the search unit 15 and the correction unit 17. That is, instead of the server device 20 performing a search, the terminal device 10 itself may perform the search. In this case, the acquisition unit 18 acquires the result of the partial sequence matching performed by its search unit 15. Further, the terminal device 10 may have a function corresponding to the storage unit 14. That is, the terminal device 10 itself may store the database.
  • the server device 20 instead of the terminal device 10 may include the symbolizing unit 12, the query generating unit 13, and the acquiring unit 18. That is, the server device 20 is also an example of the music search device of the present invention, and the acquisition unit 18 of the server device 20 acquires the result of the partial sequence matching performed by its own search unit 15.
  • the method of calculating the similarity in step S72 is not limited to the one exemplified in the embodiment.
  • the terminal device 10 expands the input sound so that the length of the input sound is equal to the length of the portion corresponding to the input sound in the matching target music (that is, the input sound The symbol may be symbolized after the time length is normalized).
  • the degree of similarity can be discriminated by the difference in notation.
  • the absolute value of the onset time difference is averaged by the number of sounds.
  • Values may be used. By averaging by the number of sounds, an onset time difference that does not depend on the volume of sounds can be evaluated. Note that, instead of or in addition to the onset time difference between the sound in the search query and the corresponding sound in the music to be matched, a difference in sound length between the sounds corresponding to each other may be used. If a sound length is used, rests need to be considered.
  • the software configuration for providing the music search service is not limited to that exemplified in the embodiment. Instead of a single program, a collection of a plurality of software components may provide the functions described in the embodiments.
  • Programs for providing a music search service may be provided by a storage medium such as an optical disk, a magnetic disk, or a semiconductor memory, or may be downloaded via a communication line such as the Internet. Good.
  • the application example of the music search system 1 is not limited to the karaoke system.
  • the music search system may be applied to music search in a music distribution service via a network or music search in a music player.
  • the music search method in the music search method according to one aspect of the present invention, the time change of the pitch in the input voice from the user is symbolized, and the symbol including the symbolized input voice for a plurality of music recorded in the database
  • the result of partial sequence matching based on the edit distance performed using the column as a query is acquired. According to this aspect, it is possible to quickly search for a desired music piece based on voice input.
  • the symbolization may symbolize a temporal change in pitch in the input speech as a difference in relative pitch.
  • the input voice is symbolized as a difference in relative pitch (for example, pitch in twelve equal temperament)
  • a difference in relative pitch for example, pitch in twelve equal temperament
  • the symbolization may be performed by ignoring information on a sound time length in the input voice. According to this aspect, even when the time length of the sound in the input voice from the user is different from the time length of the corresponding sound in the music, it is possible to search for music having the same pitch.
  • the partial sequence matching is performed in parallel with the reception of the input voice by repeatedly performing the symbolization of the time change of the pitch in the input voice in parallel with the reception of the input voice.
  • the acquisition of the result may be repeated, and the output of the result may be repeated in parallel with the reception of the input speech.
  • the search result is updated following the reception of the input voice. obtain. Therefore, the user can know the search result of the suitable music even while the singing voice is being input.
  • the editing cost for calculating the editing distance is weighted according to the difference between the pitch of the query and the pitch of the music recorded in the database. May be. According to this aspect, the smaller the pitch difference, the lower the editing cost. Therefore, the smaller the pitch difference from the query, the lower the score value (higher similarity), and the more detailed determination of similarity is. it can.
  • the partial sequence matching result includes an index value indicating a level of similarity to the query for each of the plurality of music pieces
  • the music search method includes, among the partial sequence matching results, Based on the difference between the time length of the sound included in the query and the time length of the sound corresponding to the search query in the music for a predetermined number of music in order from the highest similarity indicated by the index value Then, the result may be corrected. According to this aspect, since the time length of the sound is considered in addition to the time change of the pitch, the accuracy of the search result can be improved.
  • the present invention can also be understood as a music search device that executes the music search method according to each of the above aspects, a program that causes a computer to execute the music search method, or a recording medium that records the program. According to these music search devices, programs, or recording media, the same effects as described above can be obtained.
  • the music search device may be realized by the terminal device 10 or the server device 20 and may be realized by cooperation of these devices.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

楽曲検索方法においては、ユーザからの入力音声における音高の時間変化を記号化し、データベースに記録された複数の楽曲に対して前記記号化された入力音声を含む記号列をクエリとして行われた、編集距離に基づく部分シーケンスマッチングの結果を取得する。

Description

楽曲検索方法および楽曲検索装置
 本発明は、楽曲を検索する技術に関する。
 データベースに記録された多くの楽曲の中からユーザが所望する楽曲を検索する技術が知られている。例えば特許文献1には、ユーザが指定した音符列に対応する音符列を含む楽曲を、音符の指定毎に順次に検索するインクリメンタルな楽曲検索装置が開示されている。特許文献2および非特許文献1は楽曲の検索に関するものではないが、これらの文献には、検索クエリと部分的に類似するシーケンスデータを検索する技術が開示されている。
特開2012-48619号公報 特開2008-134706号公報
櫻井保志、外2名、「ダイナミックタイムワーピング距離に基づくストリーム処理」、一般社団法人電子情報通信学会、電子情報通信学会論文誌D、J92-D(3)、338-350、2009年3月1日
 特許文献1に記載の技術は、入力された音符列と合致する音符列を有する楽曲を検索結果として得るものであった。そのため、必ずしも所望の楽曲を正確に表していない歌唱音声を入力とした場合に適切な検索結果が得られないという問題があった。また、特許文献2および非特許文献1は楽曲検索を対象としたものではなかった。
 これに対し本発明は、音声入力に基づいて所望の楽曲を迅速に検索する技術を提供する。
 本発明は、ユーザからの入力音声における音高の時間変化を記号化し、データベースに記録された複数の楽曲に対して前記記号化された入力音声を含む記号列をクエリとして行われた、編集距離に基づく部分シーケンスマッチングの結果を取得する楽曲検索方法を提供する。また、本発明は、ユーザからの入力音声における音高の時間変化を記号化する記号化部と、データベースに記録された複数の楽曲に対して前記記号化された入力音声を含む記号列をクエリとして行われた、編集距離に基づく部分シーケンスマッチングの結果を取得する取得部とを有する楽曲検索装置としても把握される。
一実施形態に係る楽曲検索システム1の概要を例示する図 楽曲検索システム1の機能構成を例示する図 端末装置10のハードウェア構成を例示する図 サーバ装置20のハードウェア構成を例示する図 楽曲検索システム1の動作の概要を示すシーケンスチャート ステップS1の処理の詳細を示すフローチャート 入力音声における音高の差を例示する図 レーベンシュタイン距離を算出するための行列を例示する図 本実施形態に係るマッチング行列を例示する図 ステップS3の処理の詳細を示す図 ステップS5において表示される検索結果を例示する図 ステップS7の処理の詳細を示す図 類似度を算出する処理を例示する図 一実施形態に係るカラオケシステム5の構成を例示する図 カラオケシステム5の動作の概要を示すシーケンスチャート
1.構成 
 図1は、一実施形態に係る楽曲検索システム1の概要を例示する図である。楽曲検索システム1は、ユーザの歌唱音声を入力として、データベースに記録されている複数の楽曲の中から、その歌唱音声と類似した部分を持つ楽曲を検索するサービス(以下「楽曲検索サービス」という)を提供するシステムである。楽曲検索システム1は、端末装置10およびサーバ装置20を有する。端末装置10は、楽曲検索サービスにおけるクライアントとして機能する装置であり、楽曲検索装置の一例である。サーバ装置20は、楽曲検索サービスにおけるサーバとして機能する装置である。端末装置10およびサーバ装置20は、ネットワーク30を介して接続される。ネットワーク30は、例えば、インターネット、LAN(Local Area Network)、および移動通信網の少なくとも1つを含む。
 図2は、楽曲検索システム1の機能構成を例示する図である。楽曲検索システム1は、音声入力部11、記号化部12、クエリ生成部13、記憶部14、検索部15、出力部16、修正部17、および取得部18を有する。この例では、音声入力部11、記号化部12、クエリ生成部13、出力部16、および取得部18が端末装置10に、検索部15および修正部17がサーバ装置20に、それぞれ実装されている。
 音声入力部11は、ユーザが発した音声の入力を受け付ける。記号化部12は、音声入力部11が受け付けた音声における音高の時間変化を記号化する。クエリ生成部13は、記号化部12により記号化された入力音声を含む検索クエリを生成する。
 記憶部14は、複数の楽曲に関する情報が記録されたデータベースを記憶している。検索部15は、記憶部14に記憶されているデータベースの中から、クエリ生成部13により生成された検索クエリと類似する部分を有する楽曲を検索する。検索部15は、編集距離に基づく部分シーケンスマッチングによる検索アルゴリズムを採用している。部分シーケンスマッチングとは、マッチング対象(この例では楽曲)のうち検索クエリと類似した部分を特定することをいう。この類似した部分を「類似区間」という。修正部17は、検索部15による検索結果において、類似度の高いものから順に上位の所定数の楽曲に対して、編集距離に基づく部分シーケンスマッチングとは異なる手法により、検索結果を修正する。修正部17は、オンセット時間差に基づいて検索結果を修正する。
 出力部16は、検索部15による検索の結果および修正部17による検索の結果を出力する。
 図3は、端末装置10のハードウェア構成を例示する図である。端末装置10は、例えば、タブレット端末、スマートフォン、携帯電話機、またはパーソナルコンピュータである。端末装置10は、CPU(Central Processing Unit)100、メモリ101、ストレージ102、入力装置103、表示装置104、音声出力装置105、および通信IF106を有するコンピュータ装置である。CPU100は、各種演算を行い、また他のハードウェア要素を制御する装置である。メモリ101は、CPU100が処理を実行する際に用いられるコードおよびデータを記憶する記憶装置であり、例えばROM(Read Only Memory)およびRAM(Random Access Memory)を含む。ストレージ102は、各種のデータおよびプログラムを記憶する不揮発性の記憶装置であり、例えばHDD(Hard Disk Drive)またはフラッシュメモリを含む。入力装置103は、CPU100に情報を入力するための装置であり、この例では少なくともマイクロフォンを含む。入力装置103は、さらに、例えばキーボード、タッチスクリーン、およびリモートコントローラの少なくとも1つを含んでもよい。表示装置104は、映像を出力する装置であり、例えば液晶ディスプレイまたは有機ELディスプレイを含む。音声出力装置105は、音声を出力する装置であり、例えばDAコンバーター、増幅器、およびスピーカを含む。通信IF106は、ネットワーク30を介して他の装置と通信を行うインターフェースである。
 メモリ101およびストレージ102は、非一過性(non-transitory)の記録媒体であるとして観念される。ただし本明細書中において、「非一過性」の記録媒体とは、一過性の伝搬信号(transitory, propagating signal)を除く全てのコンピュータ読み取り可能な記録媒体を含み、揮発性の記録媒体を除外するものではない。
 ストレージ102は、コンピュータ装置を楽曲検索サービスにおけるクライアント装置として機能させるためのアプリケーションプログラム(以下「クライアントプログラム」という)を記憶している。CPU100がクライアントプログラムを実行することにより、図2の機能が実装される。入力装置103(特にマイクロフォン)は、音声入力部11の一例である。クライアントプログラムを実行しているCPU100は、記号化部12、クエリ生成部13、および取得部18の一例である。表示装置104は、出力部16の一例である。
 図4は、サーバ装置20のハードウェア構成を例示する図である。サーバ装置20は、CPU200、メモリ201、ストレージ202、および通信IF206を有するコンピュータ装置である。CPU200は、各種演算を行い、また他のハードウェア要素を制御する装置である。メモリ201は、CPU200が処理を実行する際に用いられるコードおよびデータを記憶する記憶装置であり、例えばROMおよびRAMを含む。ストレージ202は、各種のデータおよびプログラムを記憶する不揮発性の記憶装置であり、例えばHDD(Hard Disk Drive)またはフラッシュメモリを含む。通信IF206は、ネットワーク30を介して他の装置と通信を行うインターフェースである。
 メモリ201およびストレージ202は、非一過性の記録媒体であるとして観念される。
 ストレージ202は、コンピュータ装置を楽曲検索サービスにおけるサーバ装置として機能させるためのプログラム(以下「サーバプログラム」という)を記憶している。CPU200がサーバプログラムを実行することにより、図2の機能が実装される。ストレージ202は、記憶部14の一例である。サーバプログラムを実行しているCPU200は、検索部15および修正部17の一例である。
2.動作
2-1.概要 
 図5は、楽曲検索システム1の動作の概要を示すシーケンスチャートである。ステップS1において、端末装置10は、ユーザによる音声入力を受け付ける。ステップS2において、端末装置10は、入力された検索指示に基づいて生成された検索クエリを、サーバ装置20に送信する。検索クエリとは、検索エンジンに対する情報要求であり、検索キーを含む。ここで、検索キーは、記号化された入力音声を含む。ステップS3において、サーバ装置20は、与えられた検索クエリに従って楽曲を検索する。ここでは、編集距離に基づく部分シーケンスマッチング用検索アルゴリズムを用いた検索が行われる。ステップS4において、サーバ装置20は、検索結果を端末装置10に送信する。ステップS5において、端末装置10は、検索結果を表示する。この例で、検索はインクリメンタルに行われる。すなわち、所定のイベントを契機としてステップS1~S5の処理は繰り返し実行される。すなわち、検索クエリの生成、楽曲の検索、および結果の出力は、音声入力と並行して繰り返し行われる。
 ステップS6において、端末装置10は、サーバ装置20に対し、より詳細なマッチング(検索)を要求する。ステップS7において、サーバ装置20は、編集距離に基づく部分シーケンスマッチングによる検索により、類似度の高いものから順に上位の所定数の楽曲に対し、オンセット時間差に基づいて検索結果を修正する。ステップS8において、サーバ装置20は、修正された検索結果を送信する。ステップS9において、端末装置10は、検索結果を表示する。
2-2.音声入力の受け付け
 図6は、ステップS1の処理の詳細を示すフローチャートである。図6のフローは、例えば、ユーザにより音声入力の開始が指示されたことを契機として開始される。音声入力の開始の指示は、例えば、入力装置103であるタッチスクリーンを介して入力される。なお以下の説明においてクライアントプログラム等のソフトウェアを処理の主体として記載することがあるが、これは、そのソフトウェアを実行しているCPU100等のプロセッサが他のハードウェア要素と協働して処理を実行することを意味する。
 ステップS11において、クライアントプログラムは、入力音声の音高が安定したか判断する。入力音声とは、入力装置103であるマイクロフォンを介して入力されたユーザの歌唱音声をいう。入力音声がユーザ(人間)の歌唱音声であるため、その音高は種々の要因によって揺らぎ不安定となる。入力音声の音高が所定の安定条件を満たした場合、クライアントプログラムは、入力音声の音高が安定したと判断する。安定条件としては、例えば、音高の揺らぎの指標がしきい値より小さくなったという条件が用いられる。音高の揺らぎの指標としては、例えば、直近の所定期間における音高の分散または最大値と最小値との差が用いられる。入力音声の音高が安定したと判断された場合(S11:YES)、クライアントプログラムは、処理をステップS12に移行する。入力音声の音高が安定していないと判断された場合(S11:NO)、クライアントプログラムは、音高が安定するまで待機する。ステップS11の処理は、音声入力部11を用いて行われる。
 ステップS12において、クライアントプログラムは、音高を数値化する。ここで数値化されるのは、ステップS11において安定したと判断された範囲の音、すなわち音高が同一と考えられる範囲において単一の音である。クライアントプログラムは、数値化された音高をメモリ101に記憶する。
 ステップS13において、クライアントプログラムは、新たに数値化された音と、その1つ前に数値化された音との相対的な音高の差を計算する。音高の差ΔPは、新たに数値化された音(入力音声におけるi個目の音)の音高をP[i]と表すと、
  ΔP=P[i]-P[i-1]   …(1)
 である。
 ステップS14において、クライアントプログラムは、音高の差ΔPを記号化する。例えば、音高の差は、十二平均律における音程(相対音高)を基準とした数値に、変化の方向を表す符号(+または-)を付加して表される。記号化された音高の差ΔP[i]をS[i]と表す。例えば、P[i]とP[i-1]とが同じ音高(一度)である場合、S[i]=±0である。P[i]がP[i-1]よりも短三度高い場合、S[i]=+3である。P[i]がP[i-1]よりも完全五度低い場合、S[i]=-7である。ステップS12~S14の処理は、記号化部12により行われる。
 ステップS15において、クライアントプログラムは、検索クエリを生成する。検索クエリは、音声入力が開始されてからこの時点までに検知された音高の差を、時系列に含んでいる。例えば、入力音声においてi個目の音が検知されたときは、検索クエリは、S[2]~S[i]までの(i-1)個の音高差を示す記号を含む。ステップS15の処理は、クエリ生成部13により行われる。
 図7は、入力音声における音高の差を例示する図である。この図において、縦軸は音高を、横軸は時間を表している。期間D1~D7は、音高が安定していると判断された期間を示している。時刻t1~t7は、期間D1~D7のそれぞれにおいて、音高が安定したと判断された時刻(すなわち、新たな音が検知された時刻)を示している。例えば時刻t2において新たな音が検知されているが、このとき1つ前の音(期間D1の音)との、記号化された音高の差は、S[t2]=+2である。
 図6のフローでは、クライアントプログラムは、新たな音が検知されたことを契機として検索クエリを生成する。したがってこの例では、クライアントプログラムは、時刻t2~t7においてそれぞれ検索クエリを生成する。各時刻において生成される検索クエリは、音声入力が開始されてからその時点までに検知された全ての音について、1つ前の音との音高の差を記号化した情報(すなわち音高の差の順列)を含んでいる。例えば時刻t3において生成される検索クエリQ(t3)は、記号化された音高の順列として、
  Q(t3)=(+2,+1)   …(2)
 を含んでいる。また、時刻t7において生成される検索クエリQ(t7)は、記号化された音高の差の順列として、
  Q(t7)=(+2,+1,±0,-1,+1,-2)   …(3)
 を含んでいる。
 ここで、記号化された音高の差の順列は、音長すなわち各音の時間長に関する情報を含んでいない(時間長の情報が無視されている)。新たに検知された音の音長が十六分音符に相当しようが二分音符に相当しようが、それは音高の差の順列には影響しない。ただ1つ前の音との音高の差だけが情報として記録される。また、休符も音高の差の順列には影響しない。ある音とその次の音とが連続していようが休符を挟んでいようが、記号化されれば同じである。
 再び図6を参照する。ステップS16において、クライアントプログラムは、音高が不安定になったか判断する。音高が不安定かどうかの判断基準は、例えばステップS11で用いられた基準と同じものが用いられる。音高が安定していると判断された場合(S16:NO)、クライアントプログラムは、音高が不安定化するまで待機する。音高が不安定になったと判断された場合(S16:YES)、クライアントプログラムは、処理をステップS11に移行する。こうして、音声入力が継続されている限り、検索クエリの生成は継続的に繰り返し行われる。クライアントプログラムは、例えば、ユーザがタッチスクリーンを介して音声入力終了の指示を入力したことを契機として音声入力の受け付けを終了する。あるいは、クライアントプログラムは、無音の期間がしきい値時間以上継続したことを契機として音声入力の受け付けを終了してもよい。
 クライアントプログラムは、新たな検索クエリを生成する度に、生成された検索クエリをサーバ装置20に送信する(ステップS2)。検索クエリが生成されてから送信されるまでに要する時間を無視すると、図7の例では、時刻t1~t7にそれぞれ検索クエリが送信される。
2-3.楽曲の検索 
 具体的な動作説明に先立ち、ここではまず検索アルゴリズムの概要を説明する。検索には、編集距離に基づく部分シーケンスマッチングが用いられる。本実施形態の検索アルゴリズムの説明に先立ち、編集距離に基づく部分シーケンスマッチングについて説明する。編集距離としては、一般に知られているレーベンシュタイン(Levenshtein)距離が用いられる。レーベンシュタイン距離とは、2つの記号列がどの程度異なっているかを示す距離であり、文字の挿入、削除、および置換によって、ある記号列を別の記号列に編集するのに必要な最小手順によって表される。レーベンシュタイン距離に基づく曖昧検索は、正規表現やN-gram類似度に基づく手法等の他の手法と比較して、部分的な間違い(歌い間違い)が起こりやすい音声入力による楽曲検索に適している。
 図8は、レーベンシュタイン距離を算出するための行列を例示する図である。ここでは、マッチング対象(楽曲)の記号列が「GAHCDBC」であり、検索クエリの記号列が「ABC」である例を用いる。なお式(2)および(3)では数値に正負符号を付加した記号を用いる例を用いたが、図面等を簡単にするため、以下では、音高差がアルファベット1文字に記号化される例を用いる。また、この例では、編集距離(編集コスト)は、挿入、削除、および置換についていずれも等価であり「1」である。
 まず、この行列のうち第i行第j列のセル(以下、セル(j,i)という)において、マッチング対象の第j番目までの記号列の後に検索クエリの第i番目以降の記号列を付加した記号列を考える。以下、この記号列を、各セルにおける「対象記号列」という。例えばセル(1,1)においては、マッチング対象の第1番目までの記号列「G」の後に検索クエリの第1番目以降の記号列「ABC」を付加した記号列「GABC」が対象記号列である。あるいは、セル(6,2)においては、マッチング対象の第6番目までの記号列「GAHCDB」に検索クエリの第2番目以降の記号列「BC」を付加した記号列「GAHCDBBC」が対象記号列である。図8においては、各セルにおける上段に対象記号列が記載されている。
 次に、各セルの対象記号列につき、検索クエリとのレーベンシュタイン距離を算出する。例えば、セル(1,1)においては、検索クエリの先頭に「G」を挿入することにより対象記号列が得られるので、編集距離は「1」である。また、セル(6,2)においては、検索クエリの先頭に「G」を挿入し、検索クエリの1文字目「A」と2文字目「B」との間に「HCDB」を挿入することにより対象記号列が得られるので、編集距離は「5」である。図8においては、このようにして算出された編集距離が各セルにおける下段に記載されている。
 一般にレーベンシュタイン距離を考える場合には、記号列が一致しているときは行列において右斜め下のセルに、記号列を追加するときは右のセルに、記号列を削除するときは下のセルに、それぞれ進んでいく。行列上をこのように進んでいくことにより、編集のための最適経路が得られる(図8に矢印で示した経路)。最適経路の終着点(図8の例ではセル(7,4))に記載されている編集距離が、検索クエリの記号列とマッチング対象の記号列とのレーベンシュタイン距離である(図8の例では「4」)。しかし、この手法には主に2つの問題点がある。第1には、2つの記号列の文字数の差に依存して編集距離が大きくなる点である。例えば検索クエリと完全に一致する部分を含む2つの楽曲があったとしても、これらの楽曲の長さが異なっていれば、楽曲が長い方がレーベンシュタイン距離は大きくなる。第2には、マッチング対象の楽曲うち検索クエリと類似した部分(類似区間)の検出には不向きである点である。すなわち、行列において最適経路すなわち最小の距離を与える経路をたどっていっても、当該経路が必ずしも類似区間とは対応していない。
 そこで、本実施形態においては、特許文献2および非特許文献1に関連するSPRINGという手法が用いられる。この手法においては、検索クエリの先頭および末尾の行においてレーベンシュタイン距離dがゼロに設定される。
 図9は本実施形態に係るマッチング行列を例示する図である。マッチング行列は、図8で示した編集距離を算出するための行列に対応するものであり、類似区間を特定するためのものである。まず対象記号列の考え方は、図8で説明したものと同様である。ここで、図9に示すように検索クエリの先頭にマッチング対象の第j列までの記号列(検索クエリにおいて星印で表している)が付加されているので、第1行の全てのセルにおいて、検索クエリは対象記号列と等しくなり、編集距離はゼロとなる。
 第2行目以降のセル(j,i)において、編集距離D(j,i)は以下のとおり算出される。
  D(j,i) = d(j,i) + min[D(j-1,i-1), D(j-1,i), D(j,i-1)]      
                         …(4)
 ここで、d(j,i)は、セル(j,i)における対象記号列と、検索クエリの第(i-1)番目以降の記号列の先頭にマッチング対象の第(j-1)番目までの記号列を付加した記号列とのレーベンシュタイン距離である。例えば、セル(5,3)においては、対象記号列が「GAHCDC」であり、検索クエリの第2番目以降の記号列「BC」の先頭にマッチング対象の第4番目までの記号列「GAHC」を付加した記号列が「GAHCBC」であるので、両者を対比してd(5,3)=1である。関数minは、引数のうち最小のものを表す。すなわち、上式の右辺第2項は、対象となっているセルの左斜め上、左隣、および上隣のセルの編集距離Dのうち最小値を示している。例えば、
  D(5,3) = d(5,3) + min[D(4,2), D(4,3), D(5,2)]
      = 1 + min[ 1, 2, 1 ]
      = 1 + 1     = 2                  
                         …(5)
である。
 マッチング行列のうち最下行(図9の例では第5行)は、そのセルの左斜め上、左隣、および上隣のセルの編集距離のうち最小値を示している。このことから、マッチング行列の右下端のセルに記録されている編集距離は、そのマッチング対象のうち検索クエリと最も類似している部分の編集距離、すなわち検索クエリとの最小距離を示している。マッチング対象が検索クエリと完全に一致する部分を含んでいる場合、検索クエリとの最小距離はゼロである。この手法によれば、マッチング行列は、マッチング対象の記号列の長さに依らず検索クエリとの最小距離を出力することが保証されている。以下、楽曲において検索クエリとの最小距離を「スコア」という。スコアは、楽曲が検索クエリと類似している程度(類似度)の高低を示す指標値である。この例ではスコアがゼロに近いほど、検索クエリと類似した部分を含んでいることが示される(類似度が高い)。単に検索クエリと類似した部分を含む楽曲を検索するだけであれば、計算したマッチング行列の編集距離を全て記憶している必要はなく、楽曲毎にスコアだけを記憶しておけばよい。またこの手法によれば、最適経路(ここでは、右隣、右下、および下隣のセルのうち最小距離のセルをたどる経路。同一距離のセルが複数ある場合は「より右」かつ「より下」のセルが優先。図9に矢印で示した経路)により1つの類似区間(図9の例では類似区間r2)を特定することができる。なお、ここでは最適経路を特定するため、「より右」かつ「より下」のセルが優先である例を説明したが、これらが等価なものとして扱われてもよい。この場合、編集距離が相互に等しい複数の類似区間(図9の例では類似区間r1およびr2)が特定される可能性がある。
 図10は、ステップS3の処理の詳細を示す図である。ステップS3の処理は、検索部15により行われる。ステップS31において、サーバプログラムは、端末装置10から検索クエリを受信したか判断する。新たな検索クエリを受信したと判断された場合(S31:YES)、サーバプログラムは、処理をステップS32に移行する。新たな検索クエリを受信していないと判断された場合(S31:NO)、サーバプログラムは、検索クエリを受信するまで待機する。
 ステップS32において、サーバプログラムは、記憶部14に記憶されているデータベースに記憶されている楽曲の中から、マッチング対象となる一の楽曲を所定の順序に従って特定する。データベースには、各楽曲に関する情報、具体的には、その楽曲の識別子等の属性情報、およびその楽曲を再生するための楽曲データ(例えばMIDI(Musical Instrument Digital Interface)データ、リニアPCM(Pulse Code Modulation)データ等の非圧縮音声データ、またはいわゆるMP3データ等の圧縮音声データ)が含まれる。さらに、このデータベースは、楽曲のうち主旋律(例えば歌唱楽曲であればメインボーカルの旋律)を記号化したデータを含んでいる。
 ステップS33において、サーバプログラムは、マッチング対象の楽曲について、マッチング行列(具体的には、各セルにおける編集距離、および当該楽曲に対する検索クエリとの最小距離(すなわちスコア))を計算する。マッチング行列の計算方法は既に説明したとおりである。マッチング行列の計算に際し、サーバプログラムは、データベースからマッチング対象の楽曲が記号化されたデータを読み出して使用する。
 ステップS34において、サーバプログラムは、マッチング対象の楽曲のスコアがしきい値よりも小さいか判断する。このしきい値は例えばあらかじめ設定されている。スコアがしきい値以上であると判断された場合(S34:NO)、サーバプログラムは、計算したマッチング行列をメモリ201から消去する(ステップS35)。スコアがしきい値よりも小さいと判断された場合(S34:YES)、サーバプログラムは、処理をステップS36に移行する。
 ステップS36において、サーバプログラムは、マッチング対象の楽曲の識別子およびスコアを結果テーブルに記録する。結果テーブルは、類似度が高い(スコアがしきい値より小さい)楽曲に関する情報が記録されたテーブルである。結果テーブルはさらに、各楽曲において類似区間を特定する情報を含んでいる。
 ステップS37において、サーバプログラムは、データベースに記録されている全ての楽曲についてマッチング行列の計算が完了したか判断する。まだマッチング行列を計算していない楽曲があると判断された場合(S37:NO)、サーバプログラムは、処理をステップS32に移行する。ステップS32では次の楽曲が新たなマッチング対象となり、新たなマッチング対象の楽曲についてステップS33~S36の処理が行われる。全ての楽曲についてマッチング行列の計算が完了したと判断された場合(S37:YES)、サーバプログラムは、処理をステップS4に移行する。ステップS4において、サーバプログラムは、検索クエリの送信元の端末装置10に検索結果として結果テーブルを送信する。
2-4.検索結果の表示
 図11は、ステップS5において表示される検索結果を例示する図である。端末装置10のクライアントプログラムは、サーバ装置20から受信した結果テーブルを用いて検索結果を表示する。表示される検索結果は、複数の楽曲について、楽曲の識別子(この例では曲名)およびスコアを含んでいる。複数の楽曲は、類似度が高い順(スコアの値が小さい順)に並べられている。
 なお検索結果の表示方法は図11の例に限定されない。例えば、楽曲の識別子およびスコアに加えて、または代えて、類似区間を特定する情報(例えば類似区間の楽譜や歌詞)が表示されてもよい。また、複数の楽曲に関する情報ではなく、スコアが最高の単一の楽曲に関する情報のみが表示されてもよい。
 なお既に説明したようにステップS1~S5の処理は繰り返し行われるので、音声入力が継続している限り、検索結果は継続的に更新されていく。音声入力が開始して間もないうちは検索クエリが短いので検索結果にノイズが含まれる可能性が高いが、音声入力を継続して検索クエリが長くなるにつれ楽曲は絞り込まれノイズが落とされていくことが期待される。
2-5.検索結果の修正
 詳細なマッチングを開始するための条件が満たされると、端末装置10は、サーバ装置20に対し、より詳細なマッチング、すなわち検索結果の高精度化を要求する(ステップS6)。詳細なマッチングを開始するための条件は、例えば、音声入力が終了した、または、ユーザから詳細なマッチングの明示的な指示が入力された、という条件である。この条件が満たされると、端末装置10は、詳細なマッチングの要求(以下「高精度化要求」という)を送信する。この高精度化要求は、詳細なマッチングの要求である旨の情報、検索クエリ、対象楽曲を特定する情報、および各楽曲において類似区間を特定する情報を含んでいる。対象楽曲を特定する情報は、ステップS4で受信した結果テーブルに含まれる楽曲の少なくとも一部の楽曲の識別子を含む。少なくとも一部の楽曲とは、例えば、結果テーブルにおいて類似度の最上位から所定順位まで(具体例としては1~10位)の楽曲である。
 この高精度化要求に含まれる検索クエリは、ステップS14およびS15で生成された検索クエリとは別の情報であり、各音の音長に関する情報を含んでいる。音長に関する情報には、例えばオンセット時間差を示す情報が含まれる。オンセット時間差とは、ある音の発音が開始されてからその次の音の発音が開始されるまでの時間長をいう。以下、ステップS6において送信される検索クエリをステップS14およびS15で生成された検索クエリと区別するときは、前者を「第1検索クエリ」といい、後者を「第2検索クエリ」という。第2検索クエリは、入力音声の波形を示す非圧縮音声データまたは圧縮音声データであってもよいし、入力音声をオンセット時間差も含めて記号化したデータであってもよい。クライアントプログラムは、入力音声をデータ化して記憶しておき、記憶しているデータを用いて第2検索クエリを生成する。第1検索クエリによる検索では発音の時間長が無視されるのに対し、第2検索クエリによる検索では、発音の時間長も加味して楽曲が絞り込まれる。
 図12は、ステップS7の処理の詳細を示す図である。ステップS7の処理は、修正部17により行われる。ステップS71において、サーバプログラムは、高精度化要求に含まれる対象楽曲の中から、マッチング対象となる一の楽曲を所定の順序に従って特定する。
 ステップS72において、サーバプログラムは、マッチング対象の楽曲のうち第1検索クエリとの類似区間と第2検索クエリとを比較し、両者の類似度を数値化する。類似度を数値化する際には、オンセット時間差が考慮される。なお、オンセット時間差に代えて、入力音声のうち有声音の区間の時間長(すなわち音高が検出された区間の時間長)を、第2検索クエリにおいて記号化することも可能である。
 図13は、類似度を算出する処理を例示する図である。ここでは、マッチング対象として2つの楽曲(楽曲1および楽曲2)を考える。図13には、楽曲1および楽曲2のうち、第1検索クエリとの類似区間の譜面のみを示している。譜面から明らかなように両者は異なる楽曲であるが、ステップS14およびS15において記号化され音長の情報が削除されると、両者は同じ記号となる。ここでは例として「ABCABC」という記号を考える。記号が同じであるので、第1段階における検索では楽曲1のスコアと楽曲2のスコアとは同点である。
 図13には第2検索クエリも併せて記載している。第1検索クエリは「ABCABC」である。オンセット時間差も含めて記号化すると、第2検索クエリは例えば「A(1)B(1)C(1)A(2)B(1)C(1)」と表せる。括弧内の数字は、その前の記号の音とその1つ前の音とのオンセット時間差を表している(この例では八分音符相当の時間長が「1」)。同様に楽曲1をオンセット時間差も含めて記号化すると「A(1)B(2)C(2/3)A(2/3)B(2/3)C(2)」と表せる。楽曲2をオンセット時間差も含めて記号化すると「A(1)B(1)C(1)A(2)B(1)C(1)」と表せる。なおここでは便宜的に第1音のオンセット時間差を1とした。
 サーバプログラムは、まず楽曲1と検索クエリとのオンセット時間差を計算する。ここでは、音毎にオンセット時間差の二乗を求め、これを類似区間の全ての音について積算する。例えば、楽曲1と検索クエリとのオンセット時間差ΔL(1)は、
Figure JPOXMLDOC01-appb-M000001
同様に、例えば楽曲2と検索クエリとのオンセット時間差ΔL(2)は、 
 ΔL(2) = 0.0   ・・・(7)
である。オンセット時間差ΔLは、その値が小さいほど検索クエリと類似していることを示している。すなわちこの例では、楽曲2の方が楽曲1より検索クエリと類似していることが分かる(すなわち楽曲2との類似度が楽曲1との類似度よりも高い)。このように、オンセット時間差ΔLは、マッチング対象の楽曲と第2検索クエリとの類似度の高低を示す第2の指標値であるといえる(これに対し、スコアは、マッチング対象の楽曲と第1検索クエリとの類似度の高低を示す第1の指標値であるといえる)。
 再び図12を参照する。ステップS73において、サーバプログラムは、マッチング対象の楽曲のスコアを、ステップS72において計算されたオンセット時間差を用いて修正する。例えば、サーバプログラムは、マッチング対象の楽曲のスコアに、計算されたオンセット時間差を加算または乗算する。
 ステップS74において、サーバプログラムは、高精度化要求において指定された全てのマッチング対象楽曲についてスコアの修正が完了したか判断する。まだスコアの修正が終了していない楽曲があると判断された場合(S74:NO)、サーバプログラムは、処理をステップS71に移行する。ステップS71においてサーバプログラムは新たなマッチング対象の楽曲を特定し、以下ステップS72~S73の処理を行う。全てのマッチング対象楽曲についてスコアの修正が完了したと判断された場合(S74:YES)、サーバプログラムは、修正されたスコアの一覧を高精度化要求の送信元の端末装置10に送信する(ステップS8)。端末装置10は、検索結果を表示する(ステップS9)。ここでの結果表示は、例えばステップS5における結果表示と同様に行われる。あるいは、この結果は、この結果が最終結果である(これ以上インクリメント検索が実行されない)ことを示す情報と共に表示されてもよい。
3.適用例 
 次に、楽曲検索システム1をカラオケ装置に適用した例を説明する。この例では、データベースに記録されているカラオケ楽曲の中から、ユーザの歌唱音声の入力を検索クエリとして楽曲が検索される。さらに、検索により特定された楽曲は、ユーザの歌唱音声に追従するように再生される。すなわちこのカラオケ装置によれば、ユーザがある楽曲をアカペラで歌い出すと、そのメロディに適合する楽曲が検索され、ユーザの歌に追従する形でカラオケ(伴奏)が演奏される。
 図14は、一実施形態に係るカラオケシステム5の構成を例示する図である。カラオケシステム5は、カラオケ装置50およびサーバ装置60を有する。カラオケ装置50は、ユーザにより選択された楽曲を演奏(再生)する装置である。サーバ装置60は、カラオケ楽曲のデータを記憶しており、また、楽曲検索サービスを提供する。カラオケ装置50およびサーバ装置60は、インターネットまたは専用線を介して通信する。
 カラオケ装置50は、音声入力部11、記号化部12、クエリ生成部13、出力部16、特定部51、通信部52、および再生部53を有する。カラオケ装置50は、楽曲検索システム1における端末装置10に相当(すなわち楽曲検索装置に相当)する。音声入力部11、記号化部12、クエリ生成部13、および出力部16については既に説明したとおりである。特定部51は、ユーザの歌唱による入力音声から、その歌唱におけるテンポおよびキーを取得する。通信部52は、サーバ装置60と通信する。この例で、通信部52は、クエリ生成部13により生成された検索クエリ、および一の楽曲の要求をサーバ装置60に送信し、楽曲データをサーバ装置60から受信する。再生部53は、サーバ装置60から受信した楽曲データに従って楽曲を再生する。再生部53は、例えばスピーカおよび増幅器を含む。
 サーバ装置60は、記憶部14、検索部15、修正部17、および通信部61を有する。サーバ装置60は、楽曲検索システム1におけるサーバ装置20に相当する。記憶部14、検索部15、および修正部17については既に説明したとおりである。記憶部14に記憶されているデータベースは、カラオケ楽曲のデータベースである。通信部61は、カラオケ装置50と通信する。この例で、通信部61は、検索結果および楽曲データをカラオケ装置50に送信する。
 図15は、カラオケシステム5の動作の概要を示すシーケンスチャートである。ステップS100において、カラオケ装置50は、音声入力を受け付ける。ステップS200において、カラオケ装置50は、検索クエリをサーバ装置60に送信する。ステップS300において、サーバ装置60は、検索クエリと類似する部分を有する楽曲を検索する。ステップS500において、カラオケ装置50は、検索結果を表示する。なお、ステップS100~S500の処理の詳細は、楽曲検索システム1におけるステップS1~S9の処理と同様である。
 ステップS600において、カラオケ装置50は、検索結果として得られた複数の楽曲の中から一の楽曲を選択する。楽曲はユーザの指示入力により選択されてもよいし、ユーザの明示的な指示によらずカラオケ装置50により自動的に選択(例えば類似度が最高(スコアが最小)の楽曲を自動的に選択)されてもよい。
 ステップS700において、カラオケ装置50は、選択された楽曲の要求をサーバ装置60に送信する。この要求は、選択された楽曲を特定する識別子を含んでいる。サーバ装置60は、要求された楽曲の楽曲データをカラオケ装置50に送信する。ステップS800において、カラオケ装置50は、サーバ装置60から楽曲データを受信する。
 ステップS900において、カラオケ装置50は、受信した楽曲データに従って、カラオケ楽曲を再生する。このとき、カラオケ装置50は、ユーザの入力音声から抽出されたテンポおよびキーでカラオケ楽曲を再生する。カラオケ装置50は、ステップS100~S800までのいずれかのタイミングで、歌唱の入力音声から、その歌唱のテンポおよびキーを抽出する。カラオケ装置50は、カラオケ楽曲を、入力音声から抽出されたテンポおよびキーに合わせて再生する。また、カラオケ装置50は、ユーザの歌唱に追従する再生位置(再生時刻)からカラオケ楽曲を再生する。ユーザの歌唱に追従する再生位置とは、選択されたカラオケ楽曲において検索クエリとの類似区間に応じて特定される再生位置をいう。例えば、カラオケ装置50がサーバ装置60に対して検索クエリを送信してから楽曲データの送信を要求し、さらにその楽曲データの受信が完了するまでの時間差がほぼゼロであるような理想的なシステムにおいては、カラオケ装置50は、類似区間の終了時点からそのカラオケ楽曲を再生する。この時間差が無視できない程度ある場合、カラオケ装置50は、類似区間の終了時点に、この時間差の予測値を付加した時刻からそのカラオケ楽曲を再生する。
 カラオケシステム5によれば、ユーザは膨大な一覧の中から所望の楽曲を検索する手間を省くことができる。さらに、カラオケシステム5によれば、ユーザのアカペラ歌唱に追従する形でカラオケ楽曲(伴奏)が再生され、新たな楽しみ方を提供することができる。
 なお、例えば検索結果として得られた複数の楽曲の何れかをユーザが選択した時点で検索を終了することも可能である。例えば、検索された複数の楽曲のリストが出力部16により表示される。具体的には、複数の楽曲の楽曲名をスコアの降順で配列したリストが表示される。スコアに応じて各楽曲の表示態様(例えば表示の色またはサイズ)を相違させることも可能である。
 ユーザは、自身が意図した楽曲をリストから選択可能である。出力部16は、ユーザが選択した楽曲を強調表示する。例えば、ユーザが選択した楽曲がリストの最上位に移行され、他の楽曲とは異なる表示態様で(例えば異なる色で)で表示される。以上のように楽曲が選択されると、楽曲の検索が終了し、その時点の検索結果が最終的な結果として確定する。具体的には、ユーザによる楽曲の選択を契機として検索クエリの生成および送信が終了し、以降は楽曲の検索は実行されない。
4.変形例 
 本発明は上述の実施形態に限定されるものではなく、種々の変形実施が可能である。以下、変形例をいくつか説明する。以下の変形例のうち2つ以上のものが組み合わせて用いられてもよい。
4-1.変形例1 
 編集距離の算出方法は実施形態で例示したものに限定されない。例えば、挿入、削除、および置換の編集コストは等価ではなく、重みが付けられていてもよい。具体的には、置換の編集コストは、置換前後の音高の差に応じて編集コストが異なっていてもよい。例えば、置換前後の音高の差が小さいほど編集コストが小さくなるように設定されていてもよい。単純なレーベンシュタイン距離のみによれば音高の差は考慮されず、検索クエリと半音ずれているときでも5音ずれているときでも編集コストすなわちスコアは同じである。しかし、この例では音高差が小さいほど編集コストが小さいので、検索クエリとの音高差が小さいほどスコアの値が小さく(類似度が高く)なり、より詳細に類似度を判定できる。あるいは、挿入よりも削除の方が編集コストの方が大きいといったように、編集の種類毎に編集コストが異なっていてもよい。
4-2.変形例2 
 音高差または編集の種類に応じて編集コストを異ならせる場合、過去の検索クエリの履歴に応じて編集コストが決定されてもよい。例えば、ある楽曲の特定の部分について、過去の検索クエリにおいては特定の部分の音高が実際の楽曲よりも低くなる傾向が統計的に見られる場合がある。この場合、楽曲内の特定の部分の音高と比べて検索クエリ内の当該特定の部分の音高が低い場合の方が、音高が高い場合よりも編集コストが小さくなるように設定される。あるいは検索クエリにおいて音高差が特定の条件を満たすとき(例えば、前の音と次の音で1オクターブ以上音程が上がるとき)に特定の音高のずれが発生しやすい傾向が統計的に見られる場合、この傾向に応じて編集コストが設定される。
4-3.他の変形例 
 検索クエリを生成する契機となるイベントは、入力音声において新たな音が検出されたことに限定されない。音声入力中に検索クエリを直近に生成してから所定の時間が経過したことを契機として、検索クエリが生成されてもよい。また、特に音声入力が開始した直後においては、記号化された入力音声のデータ量がしきい値を超えたことを契機として、検索クエリが生成されてもよい。あるいは、入力音声において新たな音高差が所定数、検出されたことを契機として検索クエリが生成されてもよい。さらに別の例で、音声入力が終了したことを契機として検索クエリが生成されてもよい。この場合、インクリメンタルな検索は行われない。
 編集距離に基づく部分シーケンスマッチングを行うための検索クエリは、オンセット時間差の情報を含んでいてもよい。すなわち、記号化部12は、オンセット時間差の情報を含めて音声を記号化してもよい。また、記号化部12は、音高の差ではなく、音高そのものを記号化してもよい。この場合、検索部15が、検索クエリに含まれる音高の推移を、音高の変化の推移に変換する。
 音高差を記号化する手法は実施形態で例示したものに限定されない。十二平均律などの音階における音程によらない基準により記号化されてもよい。
 検索結果を高精度化する手法は実施形態で例示したものに限定されない。編集距離に基づく部分シーケンスマッチングで用いられていない情報を用いるものであれば、どのような手法が採用されてもよい。
 図2に例示した楽曲検索システム1の機能の一部は省略されてもよい。例えば、修正部17の機能、すなわちオンセット時間差に基づく検索結果の修正は省略されてもよい。
 修正部17が検索結果の修正を行うタイミングは実施形態で例示したものに限定されない。例えば、図5のフローにおいて、ステップS5の結果表示およびステップS6の詳細な検索要求は省略されてもよい。サーバ装置20は、楽曲の検索(ステップS3)を行うと自動的に検索結果の修正(ステップS7)を行う。すなわち、サーバ装置20は、楽曲の検索および検索結果の修正を逐次的に行う。この場合、端末装置10は、ステップS2においてオンセット時間差に関する情報をサーバ装置20に送信する。サーバ装置20は、修正された検索結果を端末装置10に送信する。
 楽曲検索システム1のハードウェア構成は図3および図4に例示したものに限定されない。要求される機能を実現できるものであれば、楽曲検索システム1はどのようなハードウェア構成を有していてもよい。また、機能とハードウェア要素との対応関係は実施形態で例示したものに限定されない。例えば、端末装置10が、検索部15および修正部17に相当する機能を有していてもよい。すなわち、サーバ装置20が検索を行うのではなく、端末装置10自身が検索を行ってもよい。この場合には、取得部18は自身の検索部15が行った部分シーケンスマッチングの結果を取得する。さらに端末装置10が、記憶部14に相当する機能を有していてもよい。すなわち、端末装置10自身がデータベースを記憶していてもよい。別の例で、端末装置10ではなくサーバ装置20が、記号化部12、クエリ生成部13、および取得部18を有していてもよい。すなわち、サーバ装置20も本発明の楽曲検索装置の一例であり、サーバ装置20の取得部18は自身の検索部15が行った部分シーケンスマッチングの結果を取得する。
 ステップS72における類似度の算出方法は実施形態で例示したものに限定されない。入力音声におけるオンセット時間差を記号化する際、端末装置10は、入力音声を、その長さがマッチング対象の楽曲のうち入力音声に対応する部分の長さと等しくなるように伸張(すなわち入力音声の時間長を規格化)してから記号化してもよい。この方法によれば、テンポが違う曲でも、譜割りの違いによって類似度を見分けることができる。また、類似度の指標として、検索クエリにおける音とマッチング対象の楽曲における対応する音とのオンセット時間差の二乗和(式(6))に代わり、オンセット時間差の絶対値を音の数で平均した値が用いられてもよい。音数で平均することで、音の多さに依存しないオンセット時間差を評価することができる。なお検索クエリにおける音とマッチング対象の楽曲における対応する音とのオンセット時間差に代えて、または加えて、両者における相互に対応する音の音長の差が用いられてもよい。なお音長を用いるのであれば、休符も考慮する必要がある。
 入力音声のうち音高が検出されない区間を検索クエリQに反映させることも可能である。音高が検出されない区間としては、音量の不足等の理由により音高を正確に検出できない区間(無音区間)と、調波構造を持たない子音が発音されている区間(子音区間)とが想定される。
 例えば、無音区間または子音区間の直前の区間aと直後の区間bとで音高が同一である場合には、区間aとその直前の区間との音高差を表す記号と、区間bとその直前に音高が検出された区間aとの音高差(すなわちゼロ)を表す記号とが、検索クエリQに個別に含められる。無音区間または子音区間を、音高がない区間として記号化することも可能である。また、高精度化要求に含まれる検索クエリでは、子音区間を、当該子音に対応する直後の母音の区間に含めて、時間長(オンセット時間差)を決定することも可能である。
 楽曲検索サービスを提供するためのソフトウェア構成は実施形態で例示したものに限定されない。単一のプログラムではなく、複数のソフトウェアコンポーネントの集合体が実施形態で説明した機能を提供してもよい。
 楽曲検索サービスを提供するためのプログラム(例えばクライアントプログラムおよびサーバプログラム)は、光ディスク、磁気ディスク、半導体メモリなどの記憶媒体により提供されてもよいし、インターネット等の通信回線を介してダウンロードされてもよい。
 楽曲検索システム1の適用例は、カラオケシステムに限定されない。例えば、ネットワークを介した楽曲配信サービスにおける楽曲検索、または音楽プレイヤーにおける楽曲検索に楽曲検索システムが適用されてもよい。
 以上の説明から、以下に述べる各態様の発明が把握される。
 すなわち、本発明の一態様にかかる楽曲検索方法は、ユーザからの入力音声における音高の時間変化を記号化し、データベースに記録された複数の楽曲に対して前記記号化された入力音声を含む記号列をクエリとして行われた、編集距離に基づく部分シーケンスマッチングの結果を取得する。この態様によれば、音声入力に基づいて所望の楽曲を迅速に検索することができる。
 好適な態様において、前記記号化は、前記入力音声における音高の時間変化を、相対音高の差として記号化してもよい。この態様においては、相対音高(例えば十二平均律における音程)の差として入力音声が記号化されるから、入力音声における音の音高が楽曲における音の音高と相違していても、入力音声における時系列の音の音高の推移(すなわちメロディ)に適合する楽曲を検索可能となる。
 好ましくは、前記記号化は、前記入力音声における音の時間長の情報は無視して記号化してもよい。この態様によれば、ユーザから入力音声における音の時間長が楽曲における対応する音の時間長と相違している場合であっても、音高が一致する楽曲を検索可能となる。
 好適な態様において、上記楽曲検索方法においては、前記入力音声の受け付けと並行して当該入力音声における音高の時間変化の前記記号化を繰り返し行い、入力音声の受け付けと並行して前記部分シーケンスマッチングの結果の前記取得を繰り返し行い、さらに、前記入力音声の受け付けと並行して前記結果の出力を繰り返し行ってもよい。この態様においては、入力音声の受付と並行して入力音声の記号化および部分シーケンスマッチングの結果の取得が実行されて結果が出力されるので、入力音声の受付に追従して検索結果が更新され得る。よって、ユーザは、歌唱音声の入力途中であっても、適合する楽曲の検索結果を知ることが可能となる。
 好適な態様において、前記部分シーケンスマッチングにおいて、前記クエリの音高と前記データベースに記録されている楽曲における音高との差の大小に応じて、前記編集距離を算出する際の編集コストに重み付けがされていてもよい。この態様によれば、音高の差が小さいほど編集コストが小さいので、クエリとの音高の差が小さい楽曲ほどスコアの値が小さく(類似度が高く)なり、より詳細に類似度を判定できる。
 好適な態様において、前記部分シーケンスマッチングの結果は、前記複数の楽曲の各々について前記クエリとの類似度の高低を示す指標値を含み、当該楽曲検索方法は、前記部分シーケンスマッチングの結果のうち、前記指標値が示す類似度の高いものから順に上位の所定数の楽曲に対して、前記クエリに含まれる音の時間長と当該楽曲において当該検索クエリに対応する音の時間長との差に基づいて、当該結果を修正するようにしてもよい。この態様によれば、音高の時間変化に加えて音の時間長を加味するから、検索結果の精度を高めることが可能となる。
 また、本発明は、以上の各態様にかかる楽曲検索方法を実行する楽曲検索装置、当該各楽曲検索方法をコンピュータに実行させるプログラム、または、当該プログラムを記録した記録媒体としても把握される。これら楽曲検索装置、プログラム、または記録媒体によれば、前述と同様の効果が奏される。楽曲検索装置は端末装置10またはサーバ装置20によって実現されてもよく、これらの装置が協働することにより実現されてもよいことは前述のとおりである。
1…楽曲検索システム、10…端末装置、11…音声入力部、12…記号化部、13…クエリ生成部、14…記憶部、15…検索部、16…出力部、17…修正部、20…サーバ装置、30…ネットワーク、100…CPU、101…メモリ、102…ストレージ、103…入力装置、104…表示装置、105…音声出力装置、106…通信IF、200…CPU、201…メモリ、202…ストレージ、206…通信IF
 

Claims (7)

  1.  ユーザからの入力音声における音高の時間変化を記号化し、
     データベースに記録された複数の楽曲に対して前記記号化された入力音声を含む記号列をクエリとして行われた、編集距離に基づく部分シーケンスマッチングの結果を取得する
     楽曲検索方法。
  2.  前記記号化は、前記入力音声における音高の時間変化を、相対音高の差として記号化する
     ことを特徴とする請求項1に記載の楽曲検索方法。
  3.  前記記号化は、前記入力音声における音の時間長の情報は無視して記号化する
     ことを特徴とする請求項1または2に記載の楽曲検索方法。
  4.  前記入力音声の受け付けと並行して当該入力音声における音高の時間変化の記号化を繰り返し行い、
     前記入力音声の受け付けと並行して前記部分シーケンスマッチングの結果の前記取得を繰り返し行い、
     当該楽曲検索方法は、さらに、
     前記入力音声の受け付けと並行して前記結果の出力を繰り返し行う
     ことを特徴とする請求項1ないし3のいずれか一項に記載の楽曲検索方法。
  5.  前記部分シーケンスマッチングにおいて、前記クエリの音高と前記データベースに記録されている楽曲における音高との差の大小に応じて、前記編集距離を算出する際の編集コストに重み付けがされている
     ことを特徴とする請求項1ないし4のいずれか一項に記載の楽曲検索方法。
  6.  前記部分シーケンスマッチングの結果は、前記複数の楽曲の各々について前記クエリとの類似度の高低を示す指標値を含み、
     当該楽曲検索方法は、
     前記部分シーケンスマッチングの結果のうち、前記指標値が示す類似度が高いものから順に上位の所定数の楽曲に対して、前記クエリに含まれる音の時間長と当該楽曲において当該クエリに対応する音の時間長との差に基づいて、当該結果を修正する
     ことを特徴とする請求項1ないし5のいずれか一項に記載の楽曲検索方法。
  7.  ユーザからの入力音声における音高の時間変化を示す記号化する記号化部と、
     データベースに記録された複数の楽曲に対して前記記号化された入力音声を含む記号列をクエリとして行われた、編集距離に基づく部分シーケンスマッチングの結果を取得する取得部と、
     を有する楽曲検索装置。
     
PCT/JP2016/077041 2015-09-30 2016-09-14 楽曲検索方法および楽曲検索装置 WO2017056982A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2017543101A JP6794990B2 (ja) 2015-09-30 2016-09-14 楽曲検索方法および楽曲検索装置
US15/925,088 US20180210952A1 (en) 2015-09-30 2018-03-19 Music track search method, music track search device, and computer readable recording medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2015192967 2015-09-30
JP2015-192967 2015-09-30

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/925,088 Continuation US20180210952A1 (en) 2015-09-30 2018-03-19 Music track search method, music track search device, and computer readable recording medium

Publications (1)

Publication Number Publication Date
WO2017056982A1 true WO2017056982A1 (ja) 2017-04-06

Family

ID=58423604

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2016/077041 WO2017056982A1 (ja) 2015-09-30 2016-09-14 楽曲検索方法および楽曲検索装置

Country Status (3)

Country Link
US (1) US20180210952A1 (ja)
JP (1) JP6794990B2 (ja)
WO (1) WO2017056982A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3629198A4 (en) * 2017-12-29 2020-05-27 Guangzhou Kugou Computer Technology Co., Ltd. SOUND SEARCHING METHOD AND DEVICE
CN111881179A (zh) * 2020-07-20 2020-11-03 易通星云(北京)科技发展有限公司 数据匹配方法、装置及其设备、计算机存储介质

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180189828A1 (en) * 2017-01-04 2018-07-05 Criteo Sa Computerized generation of music tracks to accompany display of digital video advertisements
CN106971749A (zh) * 2017-03-30 2017-07-21 联想(北京)有限公司 音频处理方法及电子设备
CN110858224A (zh) * 2018-08-15 2020-03-03 深圳富泰宏精密工业有限公司 数字内容管理系统及方法、电子装置
US11315585B2 (en) 2019-05-22 2022-04-26 Spotify Ab Determining musical style using a variational autoencoder
US11355137B2 (en) 2019-10-08 2022-06-07 Spotify Ab Systems and methods for jointly estimating sound sources and frequencies from audio
US11366851B2 (en) * 2019-12-18 2022-06-21 Spotify Ab Karaoke query processing system
CN111339352B (zh) * 2020-01-22 2024-04-26 花瓣云科技有限公司 一种音频生成方法、装置和存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08129393A (ja) * 1994-10-31 1996-05-21 Yamaha Corp カラオケ装置
JP2012155463A (ja) * 2011-01-25 2012-08-16 Yamaha Corp 楽曲検索装置
JP2015082138A (ja) * 2013-10-21 2015-04-27 富士通株式会社 音声検索装置及び音声検索方法

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5874686A (en) * 1995-10-31 1999-02-23 Ghias; Asif U. Apparatus and method for searching a melody
WO2005024562A2 (en) * 2003-08-11 2005-03-17 Eloret Corporation System and method for pattern recognition in sequential data
JP4872079B2 (ja) * 2006-05-19 2012-02-08 国立大学法人長岡技術科学大学 文章更新量評価プログラム
EP2122443A4 (en) * 2007-01-03 2013-01-23 Kannuu Pty Ltd METHOD AND DEVICE FOR SELECTION OF AN OBJECT FROM A DATABASE
US7667125B2 (en) * 2007-02-01 2010-02-23 Museami, Inc. Music transcription
US7754955B2 (en) * 2007-11-02 2010-07-13 Mark Patrick Egan Virtual reality composer platform system
US9418152B2 (en) * 2011-02-09 2016-08-16 Nice-Systems Ltd. System and method for flexible speech to text search mechanism
JP5982980B2 (ja) * 2011-04-21 2016-08-31 ヤマハ株式会社 楽音発生パターンを示すクエリーを用いて演奏データの検索を行う装置、方法および記憶媒体
US9916538B2 (en) * 2012-09-15 2018-03-13 Z Advanced Computing, Inc. Method and system for feature detection
US9563701B2 (en) * 2011-12-09 2017-02-07 Yamaha Corporation Sound data processing device and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08129393A (ja) * 1994-10-31 1996-05-21 Yamaha Corp カラオケ装置
JP2012155463A (ja) * 2011-01-25 2012-08-16 Yamaha Corp 楽曲検索装置
JP2015082138A (ja) * 2013-10-21 2015-04-27 富士通株式会社 音声検索装置及び音声検索方法

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3629198A4 (en) * 2017-12-29 2020-05-27 Guangzhou Kugou Computer Technology Co., Ltd. SOUND SEARCHING METHOD AND DEVICE
US11574009B2 (en) 2017-12-29 2023-02-07 Guangzhou Kugou Computer Technology Co., Ltd. Method, apparatus and computer device for searching audio, and storage medium
CN111881179A (zh) * 2020-07-20 2020-11-03 易通星云(北京)科技发展有限公司 数据匹配方法、装置及其设备、计算机存储介质
CN111881179B (zh) * 2020-07-20 2024-03-01 易通星云(北京)科技发展有限公司 数据匹配方法、装置及其设备、计算机存储介质

Also Published As

Publication number Publication date
JP6794990B2 (ja) 2020-12-02
US20180210952A1 (en) 2018-07-26
JPWO2017056982A1 (ja) 2018-07-19

Similar Documents

Publication Publication Date Title
WO2017056982A1 (ja) 楽曲検索方法および楽曲検索装置
US9117432B2 (en) Apparatus and method for detecting chord
US7518052B2 (en) Musical theme searching
JP2011059313A (ja) 情報検索装置,情報検索方法及びナビゲーションシステム
CN108257588B (zh) 一种谱曲方法及装置
US11651773B2 (en) Content playback system
JP7424359B2 (ja) 情報処理装置、歌唱音声の出力方法、及びプログラム
JPH1115468A (ja) 楽曲検索方法、楽曲検索装置、楽曲検索システム、及び記録媒体
JPH09138691A (ja) 楽曲検索装置
JP7059524B2 (ja) 歌唱合成方法、歌唱合成システム、及びプログラム
JP3597735B2 (ja) 音楽検索装置,音楽検索方法および音楽検索プログラムを記録した記録媒体
KR100702059B1 (ko) 고객 특성이 피드백 반영되는 질의 풀 기반의 유비쿼터스음악 정보 검색 시스템 및 방법
JPH11184467A (ja) 楽曲検索システム、楽曲検索方法及び記録媒体
JP2003131674A (ja) 楽曲検索システム
KR101546331B1 (ko) 음계를 이용한 음악 재생 방법 및 이를 이용한 음악 재생 장치
KR102605589B1 (ko) 음계를 이용한 음악 재생 방법 및 이를 이용한 음악 재생 장치
JP4447540B2 (ja) カラオケ唱歌録音作品の鑑賞システム
Arentz et al. Retrieving musical information based on rhythm and pitch correlations
JP6439239B2 (ja) 演奏データファイル検索方法、システム、プログラム、端末装置、およびサーバ装置
US20220391438A1 (en) Information processing apparatus, information processing method, and program
KR20040101592A (ko) 멜로디 질의 기반 음악 검색 방법
JP2017062313A (ja) カラオケ装置,カラオケシステム,及びプログラム
JP4760348B2 (ja) 楽曲選択装置および楽曲選択用コンピュータプログラム
WO2017056885A1 (ja) 楽曲処理方法および楽曲処理装置
CN114582306A (zh) 音频调整方法和计算机设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16851156

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2017543101

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16851156

Country of ref document: EP

Kind code of ref document: A1