You will need to use the HTML5 audio capture API, which is only implemented on limited browsers at this point.
And then you will need to decide on audio filters to use to change the sound, and then implement digital filters.
Take a look here for a start:
https://wiki.mozilla.org/Audio_Data_APIhttp://audiolibjs.org/I think you will find browser support very limited at this point, and mobile is likely impractical due to processor speed, unless there is native support for audio filtering in the browser.