Bayesian inference provides the statistical framework for characterizing gravitational-wave sources. This is usually combined with a stochastic method such as MCMC to build up samples from the posterior. Although highly successful, these approaches are costly (due to repeated waveform evaluations) and they impose restrictive assumptions on detector noise (stationarity and Gaussianity). In this talk, I describe a powerful alternative using simulation-based inference combined with neural density estimators. The approach is to use expressive neural networks such as normalizing flows to build surrogates to the posterior. These networks are trained using simulated data, and enable fast-and-accurate inference for any observed data consistent with the training distribution. For binary black holes we demonstrate inference in seconds on real data, accounting for detector nonstationarity from event to event, and with results nearly indistinguishable from MCMC. I will discuss future prospects, including extensions to binary neutron stars and realistic noise.