Skip to content

Commit

Permalink
fixing stereo handling in sisdr
Browse files Browse the repository at this point in the history
  • Loading branch information
aliutkus committed Nov 22, 2019
1 parent b1fc5eb commit dde303e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#### joe made this: http://goel.io/joe

brouillon.py
*.png
*.wav
*.jpg
Expand Down
2 changes: 1 addition & 1 deletion speechmetrics/absolute/mosnet/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def __init__(self, window, hop=None):

def test_window(self, audios, rate):
# stft. D: (1+n_fft//2, T)
linear = librosa.stft(y=audios[0],
linear = librosa.stft(y=np.asfortranarray(audios[0]),
n_fft=self.FFT_SIZE,
hop_length=self.HOP_LENGTH,
win_length=self.WIN_LENGTH,
Expand Down
4 changes: 2 additions & 2 deletions speechmetrics/relative/sisdr.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ def test_window(self, audios, rate):
# and one estimate.
# see original code here: https://github.com/sigsep/bsseval/issues/3#issuecomment-494995846
eps = np.finfo(audios[0].dtype).eps
reference = audios[1].reshape(audios[1].shape[0], -1)
estimate = audios[0].reshape(audios[0].shape[0], -1)
reference = audios[1].reshape(audios[1].size, 1)
estimate = audios[0].reshape(audios[0].size, 1)
Rss = np.dot(reference.T, reference)

# get the scaling factor for clean sources
Expand Down

0 comments on commit dde303e

Please sign in to comment.