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

Function f0_to_figure

utils/plot.py:45–56  ·  view source on GitHub ↗
(f0_gt, f0_cwt=None, f0_pred=None)

Source from the content-addressed store, hash-verified

43
44
45def f0_to_figure(f0_gt, f0_cwt=None, f0_pred=None):
46 fig = plt.figure()
47 f0_gt = f0_gt.cpu().numpy()
48 plt.plot(f0_gt, color='r', label='gt')
49 if f0_cwt is not None:
50 f0_cwt = f0_cwt.cpu().numpy()
51 plt.plot(f0_cwt, color='b', label='cwt')
52 if f0_pred is not None:
53 f0_pred = f0_pred.cpu().numpy()
54 plt.plot(f0_pred, color='green', label='pred')
55 plt.legend()
56 return fig

Callers 2

plot_pitchMethod · 0.90
plot_pitchMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected