def METHOD_NAME(self, obj: Any) -> Dict[str, Any]:
    fmt = self._default_mime
    if obj is None:
        data = b''
    elif isinstance(obj, (np.ndarray, TensorLike)):
        fmt = 'wav'
        buffer = self._to_buffer(obj)
        data = b64encode(buffer.getvalue())
    elif os.path.isfile(obj):
        fmt = obj.split('.')[-1]
        with open(obj, 'rb') as f:
            data = f.read()
        data = b64encode(data)
    elif obj.lower().startswith('http'):
        return dict(object=obj)
    elif not obj or obj == f'data:{self._media_type}/{fmt};base64,':
        data = b''
    else:
        raise ValueError(f'Object should be either path to a {self._media_type} file or numpy array.')
    b64 = f"data:{self._media_type}/{fmt};base64,{data.decode('utf-8')}"
    return dict(object=b64)