import math


def get_audio_pool_size(
    audio_frequency,
    audio_time,
):
    """
    Compute the pooling size used in AudioClassifyHead.
    args:
        audio_frequency (int): frequency dimension of the audio clip.
        audio_time (int): time dimension of the audio clip.
    returns:
        pool_size (list): list of the kernel sizes of an avg pooling,
            frequency pool kernel size, time pool kernel size in order.
    """
    pool_size = [
        math.ceil(audio_frequency / 16),
        math.ceil(audio_time / 16),
    ]

    return pool_size