Skip to content

Commit

Permalink
write_wav only normalizes on floating point data
Browse files Browse the repository at this point in the history
  • Loading branch information
bmcfee committed Oct 4, 2016
1 parent b0e7669 commit 2445bb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions librosa/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def times_csv(path, times, annotations=None, delimiter=',', fmt='%0.3f'):
writer.writerow([(fmt % t), lab])


def write_wav(path, y, sr, norm=True):
def write_wav(path, y, sr, norm=False):
"""Output a time series as a .wav file
Parameters
Expand Down Expand Up @@ -214,7 +214,7 @@ def write_wav(path, y, sr, norm=True):
util.valid_audio(y, mono=False)

# normalize
if norm:
if norm and np.issubdtype(y.dtype, np.float):
wav = util.normalize(y, norm=np.inf, axis=None)
else:
wav = y
Expand Down

0 comments on commit 2445bb2

Please sign in to comment.