DavidCombei commited on
Commit
fe7089f
1 Parent(s): 50e3d1c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -43,7 +43,14 @@ final_model = joblib.load('final_model.joblib')
43
 
44
 
45
  def process_audio(file_audio):
46
- audio, sr = sf.read(file_audio)
 
 
 
 
 
 
 
47
 
48
  extractor_1 = FEATURE_EXTRACTORS['wavlm-base']()
49
  extractor_2 = FEATURE_EXTRACTORS['wavLM-V1']()
 
43
 
44
 
45
  def process_audio(file_audio):
46
+ #audio, sr = sf.read(file_audio)
47
+ audio, sr = librosa.load(file_audio,sr=16000)
48
+
49
+
50
+ if len(audio.shape)>1:
51
+ audio = audio[0]
52
+
53
+
54
 
55
  extractor_1 = FEATURE_EXTRACTORS['wavlm-base']()
56
  extractor_2 = FEATURE_EXTRACTORS['wavLM-V1']()