kxmWebwe commited on
Commit
f2e9be2
·
1 Parent(s): 57320ec
Files changed (1) hide show
  1. main.py +5 -1
main.py CHANGED
@@ -109,7 +109,11 @@ def extract_audio_features(file_path: str) -> np.ndarray:
109
  embeddings = []
110
  for chunk in chunks:
111
  try:
112
- inputs = clap_processor(audio=chunk, sampling_rate=48000, return_tensors="pt")
 
 
 
 
113
  with torch.no_grad():
114
  emb = clap_model(**inputs).audio_embeds.squeeze().numpy()
115
  embeddings.append(emb)
 
109
  embeddings = []
110
  for chunk in chunks:
111
  try:
112
+ inputs = clap_processor(
113
+ audios=chunk,
114
+ sampling_rate=48000,
115
+ return_tensors="pt"
116
+ )
117
  with torch.no_grad():
118
  emb = clap_model(**inputs).audio_embeds.squeeze().numpy()
119
  embeddings.append(emb)