  I describe a new Bayesian based algorithm to infer the full three dimensional
velocity field from observed distances and spectroscopic galaxy catalogues. In
addition to the velocity field itself, the algorithm reconstructs true
distances, some cosmological parameters and specific non-linearities in the
velocity field. The algorithm takes care of selection effects, miscalibration
issues and can be easily extended to handle direct fitting of, e.g., the
inverse Tully-Fisher relation. I first describe the algorithm in details
alongside its performances. This algorithm is implemented in the VIRBIuS
(VelocIty Reconstruction using Bayesian Inference Software) software package. I
then test it on different mock distance catalogues with a varying complexity of
observational issues. The model proved to give robust measurement of velocities
for mock catalogues of 3,000 galaxies. I expect the core of the algorithm to
scale to tens of thousands galaxies. It holds the promises of giving a better
handle on future large and deep distance surveys for which individual errors on
distance would impede velocity field inference.
