o �J�h�@sjddlmZmZddlZddlZddlZddlm Z ddl m Z ddl m Z e �Zd deefdd�ZdS) �)�Optional�UnionN)� decode_audio)�is_video)� get_logger�audioc Cs~t|tj�rdStj�|�st�d|�d��dSzt|�}WdSt y>}zt�d|�d|���WYd}~dSd}~ww)z/Validate audio file and check if it's corruptedTz The file z' does not exist. Please check the path.Fz: is not able to open or corrupted. Please check the file. N) � isinstance�np�ndarray�os�path�exists�logger�infor� Exception)r�e�r�CC:\pinokio\api\whisper-webui.git\app\modules\utils\audio_manager.py�validate_audio s  ��r)N)�typingrr� soundfile�sfr �numpyr �faster_whisper.audior�modules.utils.files_managerr�modules.utils.loggerrr�strrrrrr�<module>s   
Memory