The distance to pulsating stars is classically estimated using the parallax-of-pulsation (PoP) method, which combines spectroscopic radial velocity measurements and angular diameter estimates to derive the distance of the star. An important application of this method is the determination of Cepheid distances, in view of the calibration of their distance scale. However, the conversion of radial to pulsational velocities in the PoP method relies on a poorly calibrated parameter, the projection factor (p-factor). We aim to measure empirically the value of the p-factors of a homogeneous sample of nine Galactic Cepheids for which trigonometric parallaxes were measured with the Hubble Space Telescope Fine Guidance Sensor. We use the SPIPS algorithm, a robust implementation of the PoP method that combines photometry, interferometry, and radial velocity measurements in a global modeling of the pulsation. We obtained new interferometric angular diameters using the PIONIER instrument at the Very Large Telescope Interferometer, completed by data from the literature. Using the known distance as an input, we derive the value of the p-factor and study its dependence with the pulsation period. We find the following p-factors: 1.20 $pm$ 0.12 for RT Aur, 1.48 $pm$ 0.18 for T Vul, 1.14 $pm$ 0.10 for FF Aql, 1.31 $pm$ 0.19 for Y Sgr, 1.39 $pm$ 0.09 for X Sgr, 1.35 $pm$ 0.13 for W Sgr, 1.36 $pm$ 0.08 for $beta$ Dor, 1.41 $pm$ 0.10 for $zeta$ Gem, and 1.23 $pm$ 0.12 for $ell$ Car. These values are consistently close to p = 1.324 $pm$ 0.024. We observe some dispersion around this average value, but the observed distribution is statistically consistent with a constant value of the p-factor as a function of the pulsation period. The error budget of our determination of the p-factor values is presently dominated by the uncertainty on the parallax, a limitation that will soon be waived by Gaia.