  We introduce an emulator-based method to model the cross-correlation between
cosmological voids and galaxies. This allows us to model the effect of
cosmology on void finding and on the shape of the void-galaxy cross-correlation
function, improving on previous template-based methods. We train a neural
network using the AbacusSummit simulation suite and fit to data from the Sloan
Digital Sky Survey Baryon Oscillation Spectroscopic Survey sample. We recover
information on the growth of structure through redshift-space distortions
(RSD), and the geometry of the Universe through the Alcock-Paczy\'nski (AP)
effect, measuring $\Omega_{\rm m} = 0.330\pm 0.020$ and $\sigma_8 =
0.777^{+0.047}_{-0.062}$ for a $\Lambda \rm{CDM}$ cosmology. Comparing to
results from a template-based method, we find that fitting the shape of the
void-galaxy cross-correlation function provides more information and leads to
an improvement in constraining power. In contrast, we find that errors on the
AP measurements were previously underestimated if void centres were assumed to
have the same response to the AP effect as galaxies - a common simplification.
Overall, we recover a $28\%$ reduction in errors for $\Omega_{\rm{m}}$ and
similar errors on $\sigma_8$ with our new, more comprehensive, method. Given
the statistical power of future surveys including DESI and Euclid, we expect
the method presented to become the new baseline for the analysis of voids in
these data.
