MCPcopy Index your code
hub / github.com/MoonInTheRiver/DiffSinger / spec_to_figure

Function spec_to_figure

utils/plot.py:8–13  ·  view source on GitHub ↗
(spec, vmin=None, vmax=None)

Source from the content-addressed store, hash-verified

6
7
8def spec_to_figure(spec, vmin=None, vmax=None):
9 if isinstance(spec, torch.Tensor):
10 spec = spec.cpu().numpy()
11 fig = plt.figure(figsize=(12, 6))
12 plt.pcolor(spec.T, vmin=vmin, vmax=vmax)
13 return fig
14
15
16def spec_f0_to_figure(spec, f0s, figsize=None):

Callers 2

plot_melMethod · 0.90
plot_pitchMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected