How to detect the pulse width from microphone as Input?
You will need some sort of interface circuit between your mic and your
Arduino. Best would probably be to have some kind of external peak
detection. This way the Arduino reads instantaneous wave amplitude. The
other option is to only shift and scale the signal so that it fits the
Arduino ADC, acquire the signal at a high enough sampling rate, and
compute the instantaneous amplitude in software.

I suggest you take a look at this sound-meter program. You could use
it as a basis for your own processing.

Then you just have to define a threshold and time how long the amplitude
remains above that threshold.