import math


def window_size_in_samples(sampling_rate, window_size_ms=25):
    """ Work out the window size in samples, given the signal sampling
    rate and the frame length in milliseconds.   Analogous to Kaldi10's
    FrameExtractionOptions::WindowSize() in feat/feature-window.h

    Args:
        sampling_rate:  The sampling rate/frequency in Hz.  E.g. 16000.  May
                        be int or float.
        window_size_ms:  The frame length in milliseconds.  May be int or
                        float.
    Returns:
        The number of samples in the window.
    """
    return math.floor(sampling_rate * 0.001 * window_size_ms)