Skip to content

blackman67

Generates a Blackman window of the given size with a 2/3 overlap.

Parameters:

Name Type Description Default
segment_size int

Size of the window to be created.

required
dtype dtype

The desired datatype of the window

float32

Returns:

Type Description
Tuple[NDArray[Any], int]

A blackman window with a 2/3 overlap

Source code in src/libsegmenter/windows/blackman.py
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
def blackman67(
    segment_size: int, dtype: DTypeLike = np.float32
) -> Tuple[NDArray[Any], int]:
    """
    Generates a Blackman window of the given size with a 2/3 overlap.

    Args:
        segment_size (int): Size of the window to be created.
        dtype (np.dtype): The desired datatype of the window

    Returns:
        A blackman window with a 2/3 overlap

    """
    assert segment_size % 3 == 0, f"segment_size must be modulus 3, got {segment_size}"

    return _blackman(segment_size, dtype=dtype), segment_size // 3