def sinc_filters(cutoff_freq_low: tf.Tensor,
                 cutoff_freq_high: tf.Tensor,
                 size: int = 401,
                 sample_rate: int = 16000) -> tf.Tensor:
    """Computes the sinc filters from its parameters for a given size.

    Sinc is not defined in zero so we need to separately compute negative
    (left_range) and positive part (right_range).

    Args:
      cutoff_freq_low: tf.Tensor<float>[1, filters] the lower cutoff frequencies
        of the bandpass.
      cutoff_freq_high: tf.Tensor<float>[1, filters] the upper cutoff frequencies
        of the bandpass.
      size: the size of the output tensor.
      sample_rate: audio sampling rate

    Returns:
      A tf.Tensor<float>[size, filters].
    """
    left_range = tf.range(
        -(size // 2), 0, dtype=tf.float32)[:, tf.newaxis] / tf.cast(
        sample_rate, dtype=tf.float32)
    right_range = tf.range(
        1, size // 2 + 1, dtype=tf.float32)[:, tf.newaxis] / tf.cast(
        sample_rate, dtype=tf.float32)
    high_pass_left_range = 2 * cutoff_freq_high * sinc_impulse_response(
        left_range, cutoff_freq_high)
    high_pass_right_range = 2 * cutoff_freq_high * sinc_impulse_response(
        right_range, cutoff_freq_high)
    low_pass_left_range = 2 * cutoff_freq_low * sinc_impulse_response(
        left_range, cutoff_freq_low)
    low_pass_right_range = 2 * cutoff_freq_low * sinc_impulse_response(
        right_range, cutoff_freq_low)
    high_pass = tf.concat(
        [high_pass_left_range, 2 * cutoff_freq_high, high_pass_right_range],
        axis=0)
    low_pass = tf.concat(
        [low_pass_left_range, 2 * cutoff_freq_low, low_pass_right_range], axis=0)
    band_pass = high_pass - low_pass
    return band_pass / tf.reduce_max(band_pass, axis=0, keepdims=True)
Computes the sinc filters from its parameters for a given size.

    Sinc is not defined in zero so we need to separately compute negative
    (left_range) and positive part (right_range).

    Args:
      cutoff_freq_low: tf.Tensor<float>[1, filters] the lower cutoff frequencies
        of the bandpass.
      cutoff_freq_high: tf.Tensor<float>[1, filters] the upper cutoff frequencies
        of the bandpass.
      size: the size of the output tensor.
      sample_rate: audio sampling rate

    Returns:
      A tf.Tensor<float>[size, filters].
    
leaf_audio/impulse_responses.py