@classmethod
def _from_dict(cls, _dict):
    """Initialize a AudioDetails object from a json dictionary."""
    args = {}
    if 'type' in _dict:
        args['type'] = _dict.get('type')
    if 'codec' in _dict:
        args['codec'] = _dict.get('codec')
    if 'frequency' in _dict:
        args['frequency'] = _dict.get('frequency')
    if 'compression' in _dict:
        args['compression'] = _dict.get('compression')
    return cls(**args)
