o
    ۷i                     @   s:   d dl Z d dlZd dlmZ d	dededejfddZdS )
    N)
VideoAsset>  pathsampling_ratereturnc                 C   s&   | st ddj} tj| |d\}}|S )zThis function extracts the audio from a video file path and returns the audio as a numpy array.
    Args:
        path: The path to the video file.
    Returns:
        The audio as a numpy array.
    baby_reading)name)sr)r   
video_pathlibrosaload)r   r   audio_signalr	    r   L/home/ubuntu/vllm_env/lib/python3.10/site-packages/vllm_omni/assets/video.pyextract_video_audio   s   r   )Nr   )	r   numpynpvllm.assets.videor   strintndarrayr   r   r   r   r   <module>   s    