curate-me-a-playlist / recommender.py
berkaygkv54's picture
first push
19759e2
raw
history blame contribute delete
432 Bytes
from src.laion_clap.inference import AudioEncoder
from src.config.configs import ProjectPaths
from glob import glob
recommender = AudioEncoder()
# audio = recommender.extract_bulk_audio_representaions(save=False)
result = recommender.get_text_embedding("This audio is a romantic song")
music_files = glob(str(ProjectPaths.DATA_DIR.joinpath("audio", "*.wav")))
song_names = [k.split("/")[-1] for k in music_files]
print(result)
pass