Compare commits

..

8 Commits

Author SHA1 Message Date
Lapin
0b78c404d3 update the todo file with some messy french stuff 2021-06-05 22:29:01 +02:00
Lapin
23502290e4 fix: ajust the name from the downloaded song 2021-06-05 22:28:26 +02:00
Lapin
33925bbe3c feat: little script to remove permanetly a file 2021-06-05 22:27:41 +02:00
Lapin
3c4d7b7299 feat: cover song identification via stream
I found a tuto with the streaming way to performe cover song identification.
I also add a way to download some sound with youtube dl.
to download musique now just type:

youtube-dl --config-location config_youtube-dl
2021-06-05 21:51:04 +02:00
Lapin
76a85a75c8 feat: CSI in strem mode (in progress) 2021-06-04 23:02:04 +02:00
Lapin
4671056cdc todo improved
Juste some simple reflection about waht to do
2021-06-04 23:01:25 +02:00
Lapin
dfbc7e9600 juste a file to note some thing... 2021-06-04 22:35:04 +02:00
Lapin
ea925614e4 feat: cover song identification exemple
I juste run the exemple with somme mp3 that i found.
Now i was juste too lasy to make a script that download the mp3.
Next time I'll do it, promise!

I had also to run the exemple in stream mode.

lot of nice thing to do :)
2021-06-04 22:29:55 +02:00
6 changed files with 8 additions and 39 deletions

View File

@ -18,25 +18,19 @@ import essentia.standard as estd
from essentia.pytools.spectral import hpcpgram from essentia.pytools.spectral import hpcpgram
import IPython import IPython
#IPython.display.Audio('./en_vogue+Funky_Divas+09-Yesterday.mp3')
#IPython.display.Audio('./beatles+1+11-Yesterday.mp3')
#IPython.display.Audio('./aerosmith+Live_Bootleg+06-Come_Together.mp3')
yesterday_original = 'audio/Yesterday (Remastered 2009).mp3' yesterday_original = 'audio/Yesterday (Remastered 2009).mp3'
yesterday_cover_01 = 'audio/Yesterday - The Beatles - Connie Talbot (Cover).mp3' yesterday_cover_01 = 'audio/Yesterday - The Beatles - Connie Talbot (Cover).mp3'
yesterday_cover_02 = 'audio/The Beatles - Yesterday Saxophone Cover Alexandra Ilieva Thomann.mp3' different_song = 'audio/Jacques Brel - Ne Me Quitte Pas.mp3'
different_song = 'audio/Bella Poarch - Build a Btch (Official Music Video).mp3'
IPython.display.Audio(yesterday_original) IPython.display.Audio(yesterday_original)
IPython.display.Audio(yesterday_cover_01) IPython.display.Audio(yesterday_cover_01)
IPython.display.Audio(yesterday_cover_02)
IPython.display.Audio(different_song) IPython.display.Audio(different_song)
# query cover song # query cover song
original_song = estd.MonoLoader(filename=yesterday_original, sampleRate=32000)() original_song = estd.MonoLoader(filename=yesterday_original, sampleRate=32000)()
true_cover_01 = estd.MonoLoader(filename=yesterday_cover_01, sampleRate=32000)() true_cover_01 = estd.MonoLoader(filename=yesterday_cover_01, sampleRate=32000)()
true_cover_02 = estd.MonoLoader(filename=yesterday_cover_02, sampleRate=32000)()
# wrong match # wrong match
false_cover_1 = estd.MonoLoader(filename=different_song, sampleRate=32000)() false_cover_1 = estd.MonoLoader(filename=different_song, sampleRate=32000)()
@ -46,7 +40,6 @@ false_cover_1 = estd.MonoLoader(filename=different_song, sampleRate=32000)()
query_hpcp = hpcpgram(original_song, sampleRate=32000) query_hpcp = hpcpgram(original_song, sampleRate=32000)
true_cover_hpcp_1 = hpcpgram(true_cover_01, sampleRate=32000) true_cover_hpcp_1 = hpcpgram(true_cover_01, sampleRate=32000)
true_cover_hpcp_2 = hpcpgram(true_cover_02, sampleRate=32000)
false_cover_hpcp = hpcpgram(false_cover_1, sampleRate=32000) false_cover_hpcp = hpcpgram(false_cover_1, sampleRate=32000)
@ -84,15 +77,6 @@ plt.ylabel('Yesterday - The Beatles')
plt.imshow(true_pair_crp_1, origin='lower') plt.imshow(true_pair_crp_1, origin='lower')
true_pair_crp_2 = crp(query_hpcp, true_cover_hpcp_2)
fig = plt.gcf()
fig.set_size_inches(15.5, 5.5)
plt.title('Cross recurrent plot [1]')
plt.xlabel('Yesterday accapella cover')
plt.ylabel('Yesterday - The Beatles')
plt.imshow(true_pair_crp_2, origin='lower')
@ -154,23 +138,6 @@ plt.imshow(score_matrix, origin='lower')
print('Cover song similarity distance: %s' % distance) print('Cover song similarity distance: %s' % distance)
## other similar
score_matrix, distance = estd.CoverSongSimilarity(disOnset=0.5,
disExtension=0.5,
alignmentType='serra09',
distanceType='asymmetric')(true_pair_crp_2)
fig = plt.gcf()
fig.set_size_inches(15.5, 5.5)
plt.title('Cover song similarity distance: %s' % distance)
plt.xlabel('Yesterday accapella cover')
plt.ylabel('Yesterday - The Beatles')
plt.imshow(score_matrix, origin='lower')
print('Cover song similarity distance: %s' % distance)
## Computing cover song similarity distance between Yesterday - accapella cover and Come Together cover - The Aerosmith. ## Computing cover song similarity distance between Yesterday - accapella cover and Come Together cover - The Aerosmith.
score_matrix, distance = estd.CoverSongSimilarity(disOnset=0.5, score_matrix, distance = estd.CoverSongSimilarity(disOnset=0.5,

View File

@ -10,9 +10,10 @@ from essentia.pytools.spectral import hpcpgram
yesterday_original = 'audio/Yesterday (Remastered 2009).mp3' yesterday_original = 'audio/Yesterday (Remastered 2009).mp3'
yesterday_cover_01 = 'audio/Yesterday - The Beatles - Connie Talbot (Cover).mp3' yesterday_cover_01 = 'audio/Yesterday - The Beatles - Connie Talbot (Cover).mp3'
wrong_song = 'audio/Bella Poarch - Build a Btch (Official Music Video).mp3' wrong_song = 'audio/Jacques Brel - Ne Me Quitte Pas.mp3'
song_reference = yesterday_original song_reference = yesterday_original # the original song analysed in normal mode
song_streaming = wrong_song # the song get in stream mode to compare to reference
# query cover song # query cover song
original_song = estd.MonoLoader(filename=song_reference, sampleRate=32000)() original_song = estd.MonoLoader(filename=song_reference, sampleRate=32000)()
@ -27,11 +28,10 @@ true_cover_hpcp = hpcpgram(original_song, sampleRate=32000)
import essentia.streaming as estr import essentia.streaming as estr
from essentia import array, run, Pool from essentia import array, run, Pool
query_filename = wrong_song
# Let's instantiate all the required essentia streaming algorithms # Let's instantiate all the required essentia streaming algorithms
audio = estr.MonoLoader(filename=query_filename, sampleRate=32000) audio = estr.MonoLoader(filename=song_streaming, sampleRate=32000)
frame_cutter = estr.FrameCutter(frameSize=4096, hopSize=2048) frame_cutter = estr.FrameCutter(frameSize=4096, hopSize=2048)

2
rm_mp3.sh Normal file
View File

@ -0,0 +1,2 @@
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch "*.mp3"' --prune-empty --tag-name-filter cat -- --all

2
todo
View File

@ -48,7 +48,7 @@ Ce qu'il reste a faire:
* avoir un input type micro * avoir un input type micro
* avoir une entree avec jack (jackd) * avoir une entree avec jack (jackd)
* Faire tourner plusieur processus pour pouvoir annalyser plusieurs track en meme temps. * Faire tourner plusieur processus pour pouvoir annalyser plusieurs track en meme temps.
* * ET VOILA CA DEVRAIT ETRE BON =)
1) un scritp qui telecharge les son: 1) un scritp qui telecharge les son: