MCPcopy Create free account
hub / github.com/MoonInTheRiver/DiffSinger / save_wav

Function save_wav

utils/audio.py:12–17  ·  view source on GitHub ↗
(wav, path, sr, norm=False)

Source from the content-addressed store, hash-verified

10
11
12def save_wav(wav, path, sr, norm=False):
13 if norm:
14 wav = wav / np.abs(wav).max()
15 wav *= 32767
16 # proposed by @dsmiller
17 wavfile.write(path, sr, wav.astype(np.int16))
18
19
20def get_hop_size(hparams):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected