Main content

Controlling audio volume in a web browser

Andrew Mason

Senior Technologist

You might have experienced the need to adjust the volume on your MP3 player, phone, or tablet as you move between quiet and noisy places.

At , we've recently published a after the successful presentation and demonstration at a conference of a new approach to solving a problem affecting a great many people who listen whilst moving or travelling.

You might have experienced yourself the need to adjust the volume control on your MP3 player (or phone, or tablet) as you move between quiet places and noisy places. It's irritating to have to do that, but it's irritating to miss bits of a programme, or have the volume higher than necessary.

Broadcasters can address this to a limited extent by applying dynamic range control. This reduces the range of loudness in the programme, so that the quiet parts do not disappear into the noise quite so readily. It takes no account of your environment when and where you are actually listening, and assumes that one size - medium - fits all. How much better it would be if the dynamic range and volume could be adjusted to suit you, personally?

This is what we've tried to do, employing the "Web audio API" now featuring in most web browsers.

Put simply, there are lots of things that can be done to an audio stream by a web browser, and the application programming interface (API) lets us get at manner of built-in functions, and create our own. So, the browser can measure the noise level around you using the microphone in your phone or tablet, and it can apply dynamic range limitation and automatic volume control depending on the noise level and the nature of the programme to which you are listening. It can do this continuously, adjusting the output for you, personally.

Expertise from staff and students at Queen Mary University of London in the use of compressors provided the know-how to automate the control of the processing to adapt to changing conditions and programme material.

Those who were at the Web Audio Conference in Paris in January had the opportunity to try it out. Those who are coming to the will have a chance too.

There are still some wrinkles to be ironed out before this will be publicly available, but the comments we have had so far are very good. If you want to find out more, take a look at the .

More Posts

Previous

Digital Services Framework II