(f0_gt, f0_cwt=None, f0_pred=None)
| 43 | |
| 44 | |
| 45 | def 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 |
no outgoing calls
no test coverage detected