jytole commited on
Commit
14b93db
·
1 Parent(s): 729852f

Include Sampling Rate

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -43,7 +43,7 @@ def texttoaudio(prompt, neg_prompt, seed, inf_steps, guidance_scale, n_candidate
43
  return (16000, waveform)
44
 
45
  def score_waveforms(text, waveforms):
46
- inputs = processor(text=text, audios=list(waveforms), return_tensors="pt", padding=True)
47
  inputs = {key: inputs[key].to(device) for key in inputs}
48
  with torch.no_grad():
49
  logits_per_text = clap_model(**inputs).logits_per_text # this is the audio-text similarity score
 
43
  return (16000, waveform)
44
 
45
  def score_waveforms(text, waveforms):
46
+ inputs = processor(text=text, audios=list(waveforms), return_tensors="pt", padding=True, sampling_rate=16000)
47
  inputs = {key: inputs[key].to(device) for key in inputs}
48
  with torch.no_grad():
49
  logits_per_text = clap_model(**inputs).logits_per_text # this is the audio-text similarity score