o
    iC                     @   s   d dl Z d dlmZ d dlZd dlmZmZ d dl	m
Z
 e  e jde jdddde jde jdd	de jd
ddddd ZedkrLe  dS dS )    N)info
load_audio)RNNoisein_wavT)exists	file_okay)typeout_wav)r   z--plot/--no-plotFzPlot the vad probabilities)defaulthelpc                 C   s   t t| j}g }|| |D ]}|| qtj|dd}|rot| tjd\}}|j	d }t
d|j	d | }	dd td|j	d D }
tt||D ]\}\}}t|d|d  t|	| t|
| qMt  d S d S )N   )axis)dtyper   c                 S   s   g | ]}|d  qS )d    ).0ir   r   A/home/ubuntu/.local/lib/python3.10/site-packages/pyrnnoise/cli.py
<listcomp>   s    zmain.<locals>.<listcomp>)r   r   ratedenoise_wavappendnpconcatenater   int16shapearangerange	enumeratezippltsubplotplotshow)r   r	   r"   denoiserspeech_probsspeech_probaudior   channelsx1x2r   r   r   r   main	   s    
r+   __main__)clickmatplotlib.pyplotpyplotr    numpyr   audiolabr   r   	pyrnnoiser   commandargumentPathoptionr+   __name__r   r   r   r   <module>   s    
