Generating a music snippet
View Patent ↗Systems and methods for extracting a music snippet from a music stream are described. In one aspect, one or more music sentences are extracted from the music stream. The one or more sentences are extracted as a function of peaks and valleys of acoustic energy across sequential music stream portions. The music snippet is selected based on the one or more music sentences.
1. A method for extracting a music snippet from a music stream, the method comprising:
extracting one or more music sentences from the music stream as a function of peaks and valleys of acoustic energy across sequential music stream portions; and
selecting the music snippet as a function of the one or more music sentences.
2. A method as recited in claim 1 , wherein extracting the one or more sentences is a function of a target sentence length.
3. A method as recited in claim 1 , wherein the music snippet comprises more than a single sentence.
4. A method as recited in claim 1 , wherein the music snippet is a sentence of the one or more sentences that comprises a most-salient frame.
5. A method as recited in claim 1 , wherein extracting the one or more sentences further comprises:
calculating a respective sentence boundary possibility for each frame of multiple frames derived from the music stream; and
for each of the one or more sentences, determining a last frame for the sentence as a function of a corresponding sentence boundary possibility.
6. A method as recited in claim 1 , wherein extracting the one or more sentences is a function of a target sentence length selected from eight (8) to sixteen (16) bars in length.
7. A method as recited in claim 1 , and wherein the method further comprises adjusting music snippet length as a function of boundary confidence of previous and subsequent music sentences.
8. A method as recited in claim 1 , wherein the method further comprises:
dividing the music stream into multiple frames of fixed length;
identifying a most-salient frame of the multiple frames; and
wherein the music snippet is a sentence of the one or more sentences that comprises the most-salient frame.
9. A method as recited in claim 8 , wherein the fixed length is a configurable amount of time.
10. A method as recited in claim 8 , wherein each frame overlaps another frame with respect to time by a set amount.
11. A method as recited in claim 8 , wherein identifying the most-salient frame further comprises calculating a respective saliency value for each frame, and wherein the most-salient frame is a frame of the multiple frames having a largest value of the respective saliency values.
12. A method as recited in claim 11 , wherein calculating the respective saliency value for a frame of the multiple frames is based on acoustic energy of the frame, a frequency of occurrence of the frame across the music stream, and a positional weight of the frame.
13. A computer-readable medium for extracting a music snippet from a music stream, the computer-readable medium comprising computer-program instructions executable by a processor for:
extracting one or more music sentences from the music stream as a function of peaks and valleys of acoustic energy across sequential music stream portions; and
selecting the music snippet as a function of the one or more music sentences.
14. A computer-readable medium as recited in claim 13 , wherein the music snippet comprises more than a single sentence.
15. A computer-readable medium as recited in claim 13 , wherein the computer-program instructions for extracting further comprise instructions for identifying at least a subset of the one or more sentences as a function of a target sentence length.
16. A computer-readable medium as recited in claim 13 , wherein the computer-program instructions for extracting the one or more sentences further comprise instructions for:
calculating a respective sentence boundary possibility for each frame of multiple frames derived from the music stream; and
for each of the one or more sentences, determining a last frame for the sentence as a function of a corresponding sentence boundary possibility.
17. A computer-readable medium as recited in claim 13 , wherein the computer-program instructions for extracting the one or more sentences further comprise instructions for identifying the one or more sentences as a function of a target sentence length selected from eight (8) to sixteen (16) bars in length.
18. A computer-readable medium as recited in claim 13 , wherein the computer-program instructions further comprise instructions for adjusting music snippet length as a function of boundary confidence of previous and subsequent music sentences.
19. A computer-readable medium as recited in claim 13 , wherein the computer-program instructions further comprise instructions for:
dividing the music stream into multiple frames of fixed length;
identifying a most-salient frame of the multiple frames; and
wherein the music snippet is a sentence of the one or more sentences that comprises the most-salient frame.
20. A computer-readable medium as recited in claim 19 , wherein the fixed length is a configurable amount of time.
21. A computer-readable medium as recited in claim 19 , wherein each frame overlaps another frame with respect to time by a set amount.
22. A computer-readable medium as recited in claim 19 , wherein the instructions for identifying the most-salient frame further comprise instructions for calculating a respective saliency value for each frame, and wherein the most-salient frame is a frame of the multiple frames having a largest value of the respective saliency values.
23. A computer-readable medium as recited in claim 22 , wherein the instructions for calculating the respective saliency value for a frame of the multiple frames further comprise instructions for determining the respective saliency value as a function of acoustic energy of the frame, a frequency of occurrence of the frame across the music stream, and a positional weight of the frame.
24. A computing device for extracting a music snippet from a music stream, the computing device comprising;
a processor; and
a memory coupled to the processor, the memory comprising computer-program instructions executable by the processor for:
extracting one or more music sentences from the music stream as a function of peaks and valleys of acoustic energy across sequential music stream portions; and
selecting the music snippet as a function of the one or more music sentences.
25. A computing device as recited in claim 24 , wherein the music snippet comprises more than a single sentence.
26. A computing device as recited in claim 24 , wherein the computer-program instructions for extracting further comprise instructions for identifying at least a subset of the one or more sentences as a function of a target sentence length.
27. A computing device as recited in claim 24 , wherein the computer-program instructions for extracting the one or more sentences further comprise instructions for:
calculating a respective sentence boundary possibility for each frame of multiple frames derived from the music stream; and
for each of the one or more sentences, determining a last frame for the sentence as a function of a corresponding sentence boundary possibility.
28. A computing device as recited in claim 24 , wherein the computer-program instructions for extracting the one or more sentences further comprise instructions for identifying the one or more sentences as a function of a target sentence length selected from eight (8) to sixteen (16) bars in length.
29. A computing device as recited in claim 24 , wherein the computer-program instructions further comprise instructions for adjusting music snippet length as a function of boundary confidence of previous and subsequent music sentences.
30. A computing device as recited in claim 24 , wherein the computer-program instructions further comprise instructions for:
dividing the music stream into multiple frames of fixed length;
identifying a most-salient frame of the multiple frames; and
wherein the music snippet is a sentence of the one or more sentences that comprises the most-salient frame.
31. A computing device as recited in claim 30 , wherein the fixed length is a configurable amount of time.
32. A computing device as recited in claim 30 , wherein each frame overlaps another frame with respect to time by a set amount.
33. A computing device as recited in claim 30 , wherein the instructions for identifying the most-salient frame further comprise instructions for calculating a respective saliency value for each frame, and wherein the most-salient frame is a frame of the multiple frames having a largest value of the respective saliency values.
34. A computing device as recited in claim 33 , wherein the instructions for calculating the respective saliency value for a frame of the multiple frames further comprise instructions for determining the respective saliency value as a function of acoustic energy of the frame, a frequency of occurrence of the frame across the music stream, and a positional weight of the frame.
35. A computing device for extracting a music snippet from a music stream, the computing device comprising:
extracting means to extract one or more music sentences from the music stream as a function of peaks and valleys of acoustic energy across sequential music stream portions; and
selecting means to select the music snippet as a function of the one or more music sentences.
36. A computing device as recited in claim 24 , wherein the extracting means further comprises identifying means to identify at least a subset of the one or more sentences as a function of a target sentence length.
37. A computing device as recited in claim 24 , wherein the extracting means further comprises:
calculating means to calculate a respective sentence boundary possibility for each frame of the multiple frames; and
for each of the one or more sentences, determining means to determine a last frame for the sentence as a function of a corresponding sentence boundary possibility.
38. A computing device as recited in claim 24 , wherein the extracting means further comprises identifying means to identify the one or more sentences as a function of a target sentence length selected from eight (8) to sixteen (16) bars in length.
39. A computing device as recited in claim 24 , wherein the computing device further comprises adjusting means to adjust music snippet length as a function of boundary confidence of previous and subsequent music sentences.
40. A computing device as recited in claim 24 , and further comprising:
dividing means to divide the music stream into multiple frames of fixed length;
identifying means to identify a most-salient frame of the multiple frames; and
wherein the music snippet is a sentence of the one or more sentences that comprises the most-salient frame.