james0430 commited on
Commit
978b553
1 Parent(s): 705299c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -20,9 +20,15 @@ def plot_kaldi_pitch(mic_used,audio_path,mic_file):
20
  time_axis = torch.linspace(0, end_time, wavform.shape[1])
21
  axis.plot(time_axis, wavform[0], linewidth=1, color='gray', alpha=0.3)
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
- lns = ln1
 
 
 
 
 
 
26
 
27
  labels = [l.get_label() for l in lns]
28
  axis.legend(lns, labels, loc=0)
 
20
  time_axis = torch.linspace(0, end_time, wavform.shape[1])
21
  axis.plot(time_axis, wavform[0], linewidth=1, color='gray', alpha=0.3)
22
 
23
+
24
+
25
+ axis2 = axis.twinx()
26
+ time_axis = torch.linspace(0, end_time, nfcc.shape[1])
27
+ ln2 = axis2.plot(
28
+ time_axis, nfcc[0], linewidth=2, label='NFCC', color='blue', linestyle='--')
29
+
30
+ lns = ln2
31
+
32
 
33
  labels = [l.get_label() for l in lns]
34
  axis.legend(lns, labels, loc=0)