def dynamic_range_compression(x, C=1, clip_val=1e-5):
    """
    PARAMS
    ------
    C: compression factor
    """
    return torch.log(torch.clamp(x, min=clip_val) * C)
PARAMS
------
C: compression factor
examples/textless_nlp/gslm/unit2speech/tacotron2/audio_processing.py