Sound analyizing

I want to make a application when set in a noisy enviroment say leq(dBA)for 5 minut and show how much NRR for earplug or or ear muff need and how long time is allowable for work in that enviroment
I want to make a small application icant use computer or labtab cuz may cray of it is not possible