File size: 432 Bytes
19759e2
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
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