def transcribe(model, audio):
    mel = melspectrogram(audio.reshape((- 1), audio.shape[(- 1)])[:, :(- 1)]).transpose((- 1), (- 2))
    (onset_pred, offset_pred, _, frame_pred, velocity_pred) = model(mel)
    predictions = {'onset': onset_pred.reshape((onset_pred.shape[1], onset_pred.shape[2])), 'offset': offset_pred.reshape((offset_pred.shape[1], offset_pred.shape[2])), 'frame': frame_pred.reshape((frame_pred.shape[1], frame_pred.shape[2])), 'velocity': velocity_pred.reshape((velocity_pred.shape[1], velocity_pred.shape[2]))}
    return predictions
def transcribe(model, audio):
    mel = melspectrogram(audio.reshape((- 1), audio.shape[(- 1)])[:, :(- 1)]).transpose((- 1), (- 2))
    (onset_pred, offset_pred, _, frame_pred, velocity_pred) = model(mel)
    predictions = {'onset': onset_pred.reshape((onset_pred.shape[1], onset_pred.shape[2])), 'offset': offset_pred.reshape((offset_pred.shape[1], offset_pred.shape[2])), 'frame': frame_pred.reshape((frame_pred.shape[1], frame_pred.shape[2])), 'velocity': velocity_pred.reshape((velocity_pred.shape[1], velocity_pred.shape[2]))}
    return predictions