We use Bayesian inference, accelerated by adjoint methods, to construct a quantitatively accurate model of the thermoacoustic behaviour of a conical flame in a duct. We first perform a series of automated experiments on a ducted flame rig. Next, we propose several candidate models of the rig's components and assimilate data into each model to find the most probable parameters for that model. We rank the candidate models based on their marginal likelihood (evidence) and select the most likely model for each component. We begin this process by rigorously characterizing the acoustics of the cold rig. When the flame is introduced, we propose several candidate models for the fluctuating heat release rate. We find that the most likely flame model considers velocity perturbations in both the burner feed tube and the outer duct, even though studies in the literature typically neglect either one of these. Using the most likely model, we infer the flame transfer functions for 24 flames and quantify their uncertainties. We do this with the flames in situ, using only pressure measurements. We find that the inferred flame transfer functions render the model quantitatively accurate, and, where comparable, broadly consistent with direct measurements from several studies in the literature.