<jupyter_start><jupyter_text>Source Separation of the Rhythm Dataset using Spleeterby:<NAME>Project ACMUS: https://acmus-mir.github.io/  Install Dependecies<jupyter_code>!apt install ffmpeg
pip install spleeter
from IPython.display import Audio
import os<jupyter_output><empty_output><jupyter_text>Separate from command line<jupyter_code>from google.colab import drive
drive.mount('/content/gdrive')
audioDirectory = '/content/gdrive/My Drive/ACMus/Music/DataSet/Rhythmset/Audio'              # Directory in your GDrive where the audio files are saved
outDirectory = '/content/gdrive/My Drive/ACMus/Music/Confidencestudy/separations/rhythm_set/'
fileList = os.listdir(audioDirectory)
numFiles = len(fileList)
for file in range(len(fileList)):
  filename = fileList[file]
  filepath = str(os.path.join(audioDirectory,filename))
  print(filepath)
  !spleeter separate -i '{filepath}' -p spleeter:4stems -o '{outDirectory}'<jupyter_output>/content/gdrive/My Drive/ACMus/Music/DataSet/Rhythmset/Audio/rh_0001.wav
INFO:spleeter:Downloading model archive https://github.com/deezer/spleeter/releases/download/v1.4.0/4stems.tar.gz
INFO:spleeter:Validating archive checksum
INFO:spleeter:Extracting downloaded 4stems archive
INFO:spleeter:4stems model file(s) extracted
INFO:spleeter:File /content/gdrive/My Drive/ACMus/Music/Confidencestudy/separations/rhythm_set/rh_0001/drums.wav written succesfully
INFO:spleeter:File /content/gdrive/My Drive/ACMus/Music/Confidencestudy/separations/rhythm_set/rh_0001/vocals.wav written succesfully
INFO:spleeter:File /content/gdrive/My Drive/ACMus/Music/Confidencestudy/separations/rhythm_set/rh_0001/bass.wav written succesfully
INFO:spleeter:File /content/gdrive/My Drive/ACMus/Music/Confidencestudy/separations/rhythm_set/rh_0001/other.wav written succesfully
/content/gdrive/My Drive/ACMus/Music/DataSet/Rhythmset/Audio/rh_0002.wav
INFO:spleeter:File /content/gdrive/My Drive/ACMus/Music/Confidencestud[...]
{'fraction_non_alphanumeric': 0.10716125708397733, 'fraction_numerical': 0.015971148892323546, 'mean_word_length': 6.556420233463035, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '630105', 'license': 'MIT', 'n_tokens_mistral': 707, 'n_tokens_neox': 684, 'n_words': 108, 'path': 'TISMIR2021/Separation_with_Spleeter.ipynb', 'repo_name': 'ACMUS-MIR/publications-resources', 'size': '1949'}