Skip to content

Commit

Permalink
Fix plot function in vad_utils.py (NVIDIA#7113)
Browse files Browse the repository at this point in the history
Fix plot function in vad_utils.py

Signed-off-by: He Huang (Steve) <[email protected]>
  • Loading branch information
stevehuang52 committed Jul 27, 2023
1 parent 9f6e787 commit f1ed44b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nemo/collections/asr/parts/utils/vad_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1051,11 +1051,11 @@ def plot(
else:
label = None

if label:
if label is not None:
ax2.plot(np.arange(len_pred) * unit_frame_len, label, 'r', label='label')
if pred_snippet:
if pred_snippet is not None:
ax2.plot(np.arange(len_pred) * unit_frame_len, pred_snippet, 'b', label='pred')
if frame_snippet:
if frame_snippet is not None:
ax2.plot(np.arange(len_pred) * unit_frame_len, frame_snippet, 'g--', label='speech prob')

ax2.tick_params(axis='y', labelcolor='r')
Expand Down

0 comments on commit f1ed44b

Please sign in to comment.