def METHOD_NAME(use_torch):
    """test negstoi loss detect silent frame"""
    torch.manual_seed(0)
    signal = torch.rand(1, 16000)
    dyn_range = 1.0
    framelen = 64
    hop = 32
    mask = NegSTOILoss.detect_silent_frames(
        x=signal,
        dyn_range=dyn_range,
        framelen=framelen,
        hop=hop,
    )
    assert mask.shape == torch.Size([1, 1, 498])
    assert mask.cpu().detach().numpy().sum() == 155