Method for detecting melody of audio signal and electronic device
AssigneeBigo Technology Pte. Ltd.
InventorXiaojie Wu
Life of this patent
Estimating the term…
Abstract
A method for detecting a melody of an audio signal, including: dividing the audio signal into a plurality of audio segments based on a beat, detecting a pitch frequency of each frame of audio sub-signal in each of the audio segments, and estimating a pitch value of each of the audio segments based on the pitch frequency; determining a pitch name corresponding to each of the audio segments based on a frequency range of the pitch value; acquiring a musical scale of the audio signal by estimating a tonality of the audio signal based on the pitch name of each of the audio segments; and determining a melody of the audio signal based on a frequency interval of the pitch value of each of the audio segments in the musical scale.
Claims17
A method for detecting a melody of an audio signal, comprising:
- performing, with a processor, Short-Time Fourier Transform (STFT) on the audio signal, wherein the audio signal is a humming or cappella audio signal acquired by a voice recording device;
- acquiring, with the processor, a pitch frequency by pitch frequency detection on a result of the STFT, wherein the pitch frequency is configured to detect a pitch value;
- inputting, with the processor, an interpolation frequency at a signal position corresponding to a frame of audio sub-signal in response to detecting no pitch frequency;
- and
- determining, with the processor, the interpolation frequency corresponding to a frame as the pitch frequency of the audio signal;
- dividing, with the processor, the audio signal into a plurality of audio segments based on a beat, wherein each of the plurality of audio segments comprises a plurality of audio sub-signal frames;
- detecting, with the processor, a pitch frequency of each of the plurality of audio sub-signal frames in each of the plurality of audio segments, and estimating a pitch value of each of the plurality of audio segments based on the pitch frequency;
- determining, with the processor, a pitch name corresponding to each of the audio segments based on a frequency range of the pitch value of each of the plurality of audio segments;
- acquiring, with the processor, a musical scale of the audio signal by estimating a tonality of the audio signal based on the pitch name of each of the audio segments;
- determining, with the processor, a melody of the audio signal based on a frequency interval of the pitch value of each of the plurality of audio segments in the musical scale;
- and
- retrieving, with the processor, song information of the melody of the audio signal, and chording, accompanying and harmonizing the melody of the audio signal.
An electronic device for detecting a melody of an audio signal, comprising:
- a processor;
- and
- a memory configured to store one or more instructions executable by the processor,
- wherein the processor, when loading and executing the one or more instructions, is caused to perform a method for detecting the melody of the audio signal, comprising:
- performing Short-Time Fourier Transform (STFT) on the audio signal, wherein the audio signal is a humming or cappella audio signal;
- acquiring a pitch frequency by pitch frequency detection on a result of the STFT, wherein the pitch frequency is configured to detect a pitch value;
- inputting an interpolation frequency at a signal position corresponding to each frame of audio sub-signal in response to detecting no pitch frequency in the frame;
- and
- determining the interpolation frequency corresponding to a frame as the pitch frequency of the audio signal;
- dividing the audio signal into a plurality of audio segments based on a beat, wherein each of the plurality of audio segments comprises a plurality of audio sub-signal frames;
- detecting a pitch frequency of each of audio sub-signal frames in each of the plurality of audio segments, and estimating a pitch value of each of the plurality of audio segments based on the pitch frequency;
- determining a pitch name corresponding to each of the audio segments based on a frequency range of the pitch value of each of the plurality of audio segments;
- acquiring a musical scale of the audio signal by estimating a tonality of the audio signal based on the pitch name of each of the audio segments;
- determining a melody of the audio signal based on a frequency interval of the pitch value of each of the plurality of audio segments in the musical scale;
- retrieving song information of the melody of the audio signal, and chording, accompanying and harmonizing the melody of the audio signal.
A non-transitory computer-readable storage medium storing one or more instructions wherein the one or more instructions, when executed by a processor of an electronic device, cause the electronic device to perform a method for detecting a melody of an audio signal, comprising:
- performing Short-Time Fourier Transform (STFT) on the audio signal, wherein the audio signal is a humming or cappella audio signal acquired by a voice recording device;
- acquiring a pitch frequency by pitch frequency detection on a result of the STFT, wherein the pitch frequency is configured to detect a pitch value;
- inputting an interpolation frequency at a signal position corresponding to each audio sub-signal frames in response to detecting no pitch frequency;
- and
- determining the interpolation frequency corresponding to a frame as the pitch frequency of the audio signal;
- dividing the audio signal into a plurality of audio segments based on a beat, wherein each of the plurality of audio segments comprises a plurality of audio sub-signal frames;
- detecting a pitch frequency of each of audio sub-signal frames in each of the plurality of audio segments, and estimating a pitch value of each of the plurality of audio segments based on the pitch frequency;
- determining a pitch name corresponding to each of the audio segments based on a frequency range of the pitch value of each of the plurality of audio segments;
- acquiring a musical scale of the audio signal by estimating a tonality of the audio signal based on the pitch name of each of the audio segments;
- determining a melody of the audio signal based on a frequency interval of the pitch value of each of the plurality of audio segments in the musical scale;
- and
- retrieving song information of the melody of the audio signal, and chording, accompanying and harmonizing the melody of the audio signal.
Dependencies are inferred from the claim text.