audio_visual/utils/preprocessing.py
def preprocess_sample(file, params):

    """
    Function to preprocess each data sample.
    """

    videoFile = file + ".mp4"
    audioFile = file + ".wav"
    device = torch.device("cuda" if torch.cuda.is_available() else "cpu")


    #Extract the audio from the video file using the FFmpeg utility and save it to a wav file.
    v2aCommand = "ffmpeg -y -v quiet -i " + videoFile + " -ac 1 -ar 16000 -vn " + audioFile
    os.system(v2aCommand)

    return

    Function to preprocess each data sample.
    
Function to preprocess each data sample.
Function to preprocess each data sample .
def preprocess_sample(file, params):
    videoFile = file + ".mp4"
    audioFile = file + ".wav"
    device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
    v2aCommand = "ffmpeg -y -v quiet -i " + videoFile + " -ac 1 -ar 16000 -vn " + audioFile
    os.system(v2aCommand)
    return
def preprocess_sample ( file , params ) : videoFile = file + ".mp4" audioFile = file + ".wav" device = torch . device ( "cuda" if torch . cuda . is_available ( ) else "cpu" ) v2aCommand = "ffmpeg -y -v quiet -i " + videoFile + " -ac 1 -ar 16000 -vn " + audioFile os . system ( v2aCommand ) return
Function to preprocess each data sample.
Function to preprocess each data sample .
"""
    Function to preprocess each data sample.
    """ #Extract the audio from the video file using the FFmpeg utility and save it to a wav file.
file
params