By "rise of volume" do you mean when the input volume is increased, or when the volume of what's being received by the microphone goes past a certain level (e.g. to distinguish the user's voice from just background noise and only do processing then)?
You're getting ahead of us helios. Either one requires a process to watch the microphone, or use one that is already in place. What OS are we talking about?