# 6 Steps to Enhance Your Audio with a Dolby API and Postman Monitors

While recently planning my mother’s birthday celebration, I was listening to a recording of birthday messages I wanted to give her as a gift. I realized the audio clip had a lot of background noise, and I would need to enhance the sound quality if I wanted to present it at the party. So, while simultaneously planning the big event, I turned to automation for an efficient solution: I delegated the audio enhancement to an API and used the [Postman monitor](https://www.postman.com/api-monitor/) to notify me upon completion. Instead of wishing or waiting for better sound quality, follow these steps to make your own recordings clearer.

## Step 1: Explore APIs

 First, we need to look for APIs that can enhance audio. There is no better way to find the APIs we need than to look for them at the Postman [Public API Network](https://www.postman.com/explore), which has a lot of Postman Collections and public workspaces that can help. Searching the network will reveal that the [Dolby team](https://www.postman.com/dolbyio) has collections to analyze audio content and enhance the audio quality of our track: ![Dolby.io Team Profile on the Postman Public API Network](https://blog.postman.com/wp-content/uploads/2021/02/Postman-Dolby-API-1-e1614025198877.png)Dolby.io Team Profile on the Postman Public API Network## Step 2: Fork collection

 Click on Fork to fork the [Media Enhance v1.1 collection](https://www.postman.com/dolbyio/workspace/dolby-io-public-workspace/documentation/7548072-46e1b810-6578-484f-99a2-ff25a04160dd) from the Dolby.io public workspace. ![Media Enhance v1.1 collection overview](https://blog.postman.com/wp-content/uploads/2021/02/Postman-Dolby-API-2png.png)Media Enhance v1.1 collection overview The collection uses variables that are defined in the [Dolby.io Public Env](https://www.postman.com/dolbyio/workspace/dolby-io-public-workspace/environment/7548072-61b6693b-d878-4f0a-bd6c-21091f078ee8) environment. We can export the environment and import it into the workspace where we choose to fork the collection: ![](https://blog.postman.com/wp-content/uploads/2021/02/Postman-Dolby-API-3.png)## Step 3: Obtain API key

 Before we can use the Dolby collection we must obtain an API key by [signing up](https://dolby.io/signup) via the Dolby developer portal. Log in to your account and create an app. Under API keys, copy over the Media Processing APIs key: ![API key to access the Media Processing APIs](https://blog.postman.com/wp-content/uploads/2021/02/Postman-Dolby-API-4.png)API key to access the Media Processing APIs Click on the eye icon to view environment variables, then paste the API key you copied into the CURRENT VALUE for dolby-api-key. **Note**: CURRENT VALUE will not sync the key to the Postman servers. This is important so that the key is secret when the collection is shared. ![Dolby.io Public Env environment variables](https://blog.postman.com/wp-content/uploads/2021/02/Postman-Dolby-API-5.png)Dolby.io Public Env environment variables Click on **Edit Collection,** and under **Authorization** select type as an API key. Let's use the environment variable we just set. Make sure you save changes. ![Authorize requests in the collection by adding API Key](https://blog.postman.com/wp-content/uploads/2021/02/Postman-Dolby-6-redo.png)Authorize requests in the collection by adding API key## Step 4: Start enhancing

 First, configure where the Dolby API will pick up the audio file. To do that, let's send a POST request. We can follow the Example request and response for a 200 OK. We can configure input to point to an AWS bucket. You can learn more about input configuration [here](https://dolby.io/developers/media-processing/tutorials/media-input-and-output). This request accepts audio noise reduction, dynamics, and more. Sending this request returns a job ID, which we will use to track how much the audio has been enhanced. ![Enhancing POST request in Postman](https://blog.postman.com/wp-content/uploads/2021/02/Postman-Dolby-API-7.png)Enhancing POST request in Postman## Step 5: Check progress

 The GET request returns the progress made while processing. We can see the types of responses it might return under the **Examples** for that request. It will return the following for successful cases: ![](https://blog.postman.com/wp-content/uploads/2021/02/Postman-Dolby-API-8.png) Enhancing the audio may take a while. Do you want to keep hitting the API manually all day? Probably not. Okay, let’s learn how to automate this process. ## Step 6: Enter Postman monitor

 To save you time, you want something that will hit the API for you and notify you of the result. Do a quick search on the [Postman Learning Center](https://learning.postman.com/) to find information about the Postman monitor. Postman monitors allow us to [monitor a collection](https://learning.postman.com/docs/designing-and-developing-your-api/monitoring-your-api/intro-monitors/#running-collections-in-a-monitor). In case a test fails for any request in the collection, we can choose to be notified by email or use other options for [integrations](https://learning.postman.com/docs/integrations/intro-integrations/). **Related: [What is API Monitoring?](https://www.postman.com/api-platform/api-monitoring/)** First, we want to add tests to this request, which should fail only when processing is erroneous or complete. A monitor then notifies if a test fails. Since we need to be notified upon error or when processing is complete, let's make sure the test passes only when the status is "**Running,**" as shown here: ```
pm.test("Status is Running", function () {
   pm.expect(pm.response.json().status).to.eql("Running");
});
```

 Since we just want to monitor this single request, we must make sure that the GET request is the first request in the collection. Next, add the following to the **Pre-request Script** so that the same GET request runs repeatedly: ```
postman.setNextRequest(this.request.name);
```

 In order to create a monitor for the collection, right-click on the collection and select Monitor Collection to set up the configuration details. ![Monitor configuration for Dolby Collection](https://blog.postman.com/wp-content/uploads/2021/02/Postman-Dolby-API-9.png)Monitor configuration for Dolby Collection We can configure the monitor to run every five minutes and notify us by email upon failure. Simply add your email in the recipient list. We have chosen the environment as Dolby.io Public Env. Since the monitor runs on the Postman server, it will need to access the API key and the job ID variables. To enable that, we need to persist these as INITIAL VALUES in environment settings so that they can get synced with Postman servers and picked up by the monitor. Click on the **Web Dashboard** for the monitor. Click on **Run** to start the monitor. Now you can walk away to do your chores—don't wait around, just let the monitor work its magic. Once processing completes, the test should fail and you should receive an email similar to the following: ![](https://blog.postman.com/wp-content/uploads/2021/02/Dolby-API-Postman-10.png)## API monitoring that’s music to our ears

 In the end, the birthday messages for my mother sounded loud and clear because I used this method. I recommend you try out the Dolby APIs on Postman to improve the sound quality for your own recordings when you’re building a podcast, lecture, or other media. You can also explore the [Analyze](https://www.postman.com/dolbyio/workspace/dolby-io-public-workspace/documentation/7548072-c547d2e5-abbb-4264-9843-09e6089cb5ab) collection to learn more about audio-quality metrics. In addition to exploring the Dolby Collection in this blog post, we’ve also learned about the Postman monitor—which is a simple workaround for moving away from a pull mechanism (polling the API manually) to a push mechanism (receiving a notification once a task is complete). Don’t forget to dive deeper into Postman Monitoring by visiting the Postman Learning Center [here](https://learning.postman.com/docs/designing-and-developing-your-api/monitoring-your-api/intro-monitors/). And if you’re an audiophile, you might want to get your hands (and ears) on the [“Daily Mix” with Postman Monitors and Spotify.](https://blog.postman.com/daily-mix-with-postman-monitors-and-spotify/)