def _apply_origin(image, origin):
    """
    When origin is 'lower' flip the top and bottom from the image

    Args:
        signal: Shape(..., features/y-axis, frames/x-axis)
        origin: 'upper' or 'lower' (For speech usually lower)

    Returns:
        Shape(..., features, frames)

    """
    assert origin in ['upper', 'lower'], origin
    if origin == 'lower':
        image = image[..., ::-1, :]
    return image