def split_into_frames(audiofile, samplesLocation):
    os.system('rm {}/*'.format(samplesLocation))
    time.sleep(2.0)
    (data, sr) = librosa.load(audiofile)
    duration = librosa.get_duration(data, sr)
    print('video duration, hours: {}'.format((duration / 3600)))
    for i in range(0, int((duration - 1)), 20):
        tmp_batch = data[(i * sr):(sr * (i + 20))]
        librosa.output.write_wav('{}/{}.wav'.format(samplesLocation, chr((int((i / 20)) + 65))), tmp_batch, sr)
def split_into_frames(audiofile, samplesLocation):
    os.system('rm {}/*'.format(samplesLocation))
    time.sleep(2.0)
    (data, sr) = librosa.load(audiofile)
    duration = librosa.get_duration(data, sr)
    print('video duration, hours: {}'.format((duration / 3600)))
    for i in range(0, int((duration - 1)), 20):
        tmp_batch = data[(i * sr):(sr * (i + 20))]
        librosa.output.write_wav('{}/{}.wav'.format(samplesLocation, chr((int((i / 20)) + 65))), tmp_batch, sr)