Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -22,11 +22,14 @@ def plot_kaldi_pitch(mic_used,audio_path,mic_file):
|
|
22 |
|
23 |
time_axis = torch.linspace(0, end_time, pitch.shape[1])
|
24 |
ln1 = axis.plot(time_axis, pitch[0], linewidth=2, label='Pitch', color='green')
|
25 |
-
|
26 |
-
|
27 |
|
28 |
-
|
|
|
|
|
|
|
29 |
|
|
|
30 |
|
31 |
labels = [l.get_label() for l in lns]
|
32 |
axis.legend(lns, labels, loc=0)
|
|
|
22 |
|
23 |
time_axis = torch.linspace(0, end_time, pitch.shape[1])
|
24 |
ln1 = axis.plot(time_axis, pitch[0], linewidth=2, label='Pitch', color='green')
|
25 |
+
axis.set_ylim((-1.3, 1.3))
|
|
|
26 |
|
27 |
+
axis2 = axis.twinx()
|
28 |
+
time_axis = torch.linspace(0, end_time, nfcc.shape[1])
|
29 |
+
ln2 = axis2.plot(
|
30 |
+
time_axis, nfcc[0], linewidth=2, label='NFCC', color='blue', linestyle='--')
|
31 |
|
32 |
+
lns = ln1 + ln2
|
33 |
|
34 |
labels = [l.get_label() for l in lns]
|
35 |
axis.legend(lns, labels, loc=0)
|