WebashalarForML commited on
Commit
0fb6a95
Β·
verified Β·
1 Parent(s): 20f9a15

Update audio.py

Browse files
Files changed (1) hide show
  1. audio.py +12 -0
audio.py CHANGED
@@ -1,3 +1,12 @@
 
 
 
 
 
 
 
 
 
1
  import librosa
2
  import librosa.filters
3
  import numpy as np
@@ -6,6 +15,9 @@ from scipy import signal
6
  from scipy.io import wavfile
7
  from hparams import hparams as hp
8
 
 
 
 
9
  def load_wav(path, sr):
10
  return librosa.core.load(path, sr=sr)[0]
11
 
 
1
+ # Monkey‑patch Numba’s JIT dispatcher so it never tries to cache
2
+ # (silences that β€œno locator available” RuntimeError).
3
+ try:
4
+ import numba.core.decorators as _nd
5
+ _nd.JitDispatcher.enable_caching = lambda self: None
6
+ except Exception:
7
+ pass
8
+ # ────────────────────────────────────────────────────────────
9
+
10
  import librosa
11
  import librosa.filters
12
  import numpy as np
 
15
  from scipy.io import wavfile
16
  from hparams import hparams as hp
17
 
18
+ def load_wav(path, sr):
19
+ return librosa.core.load(path, sr=sr)[0]
20
+
21
  def load_wav(path, sr):
22
  return librosa.core.load(path, sr=sr)[0]
23