We introduce a technique for gravitational-wave analysis, where Gaussian process regression is used to emulate the strain spectrum of a stochastic background using population-synthesis simulations. This leads to direct Bayesian inference on astrophysical parameters. For PTAs specifically, we interpolate over the parameter space of supermassive black-hole binary environments, including 3-body stellar scattering, and evolving orbital eccentricity. We illustrate our approach on mock data, and assess the prospects for inference with data similar to the NANOGrav 9-yr data release.