You need a retriggerable one shot followed by an inverter.