Conversion of a pulse

Simplest way would to fill a capacitor just long enough so each pulse stays high just long enough before hysterisis kicks in, a 0.1uf or lower and a resistor to bleed it or it will just stay high.