Rezuwan commited on
Commit
2f4fa8d
·
verified ·
1 Parent(s): d11245f

Delete librosa

Browse files
Files changed (2) hide show
  1. librosa/__init__.py +0 -2
  2. librosa/core.py +0 -27
librosa/__init__.py DELETED
@@ -1,2 +0,0 @@
1
- # Expose core.stft and core.istft to mimic real librosa structure
2
- from .core import stft, istft
 
 
 
librosa/core.py DELETED
@@ -1,27 +0,0 @@
1
- import numpy as np
2
- import tensorflow as tf
3
-
4
- def stft(y, n_fft=2048, hop_length=512, win_length=2048, **kwargs):
5
- y = tf.convert_to_tensor(y, dtype=tf.float32)
6
- Z = tf.signal.stft(
7
- y,
8
- frame_length=win_length,
9
- frame_step=hop_length,
10
- fft_length=n_fft,
11
- window_fn=tf.signal.hann_window
12
- )
13
- return Z.numpy()
14
-
15
- def istft(Z, hop_length=512, win_length=2048, **kwargs):
16
- if not tf.executing_eagerly():
17
- tf.config.run_functions_eagerly(True)
18
-
19
- Z = tf.convert_to_tensor(Z, dtype=tf.complex64)
20
-
21
- audio = tf.signal.inverse_stft(
22
- Z,
23
- frame_length=win_length,
24
- frame_step=hop_length,
25
- window_fn=tf.signal.hann_window
26
- )
27
- return audio.numpy()