  Single photons with tailored temporal profiles are a vital resource for
future quantum networks. Here we distill them out of custom-shaped laser pulses
that reflect from a single atom strongly coupled to an optical resonator. A
subsequent measurement on the atom is employed to herald a successful
distillation. Out of vacuum-dominated light pulses, we create single photons
with fidelity $66(1)\%$, two-and-more-photon suppression $95.5(6)\%$, and a
Wigner function with negative value $-0.125(6)$. Our scheme applied to
state-of-the-art fiber resonators could boost the single-photon fidelity to up
to $96\%$.
