# Is any other way to download the audio response in collection

**URL:** <https://community.postman.com/t/is-any-other-way-to-download-the-audio-response-in-collection/10406>\
**Category:** Help Hub\
**Tags:** collections\
**Created:** [January 29, 2020, 6:23am UTC](https://community.postman.com/t/is-any-other-way-to-download-the-audio-response-in-collection/10406 "2020-01-29T06:23:25Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![pravinder](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/pravinder/32/3672_2.png) [@pravinder](https://community.postman.com/u/pravinder)\
**Post date:** [January 29, 2020, 6:23am UTC](https://community.postman.com/t/is-any-other-way-to-download-the-audio-response-in-collection/10406/1 "2020-01-29T06:23:25Z")

</div>

i have any api end point which is going to translate the text in to speech . for single single language translation i am able to download the response through send and download button ,but i am trying to pass an csv file in a collection runner to run my request but it ll gives the response in an musical symbol format .My problem is i am not able to download that translation as a mp3 format .

---

<div class="post-metadata">

**Author:** ![jeevananthank](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/jeevananthank/32/4075_2.png) [@jeevananthank](https://community.postman.com/u/jeevananthank)\
**Post date:** [February 10, 2020, 10:53am UTC](https://community.postman.com/t/is-any-other-way-to-download-the-audio-response-in-collection/10406/2 "2020-02-10T10:53:15Z")

</div>

Hi @pravinder i was able to download files using newman. If that is ok for you, suggest you to use that.

> var i = 0,  
> fs = require(‘fs’),  
> newman = require(‘newman’); // ensure that you have run “npm i newman” in the same directory as this file  
> newman.run({  
> collection: require(‘./Test.postman\_collection.json’),  
> }, function (err, summary) {  
> // handle collection run err, process the run summary here  
> }).on(‘request’, function (err, execution) { // This is triggered when a response has been recieved  
> if (err) { return console.error(err); }  
> fs.writeFile(`response${i++}.pdf`, execution.response.stream, function (error) {  
> if (error) { console.error(error); }  
> });  
> });

---

<div class="post-metadata">

**Author:** ![pravinder](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/pravinder/32/3672_2.png) [@pravinder](https://community.postman.com/u/pravinder)\
**Post date:** [February 10, 2020, 11:27am UTC](https://community.postman.com/t/is-any-other-way-to-download-the-audio-response-in-collection/10406/3 "2020-02-10T11:27:15Z")

</div>

Hi  
Thanks for support . i will check it once and ll getback to you

---

<div class="post-metadata">

**Author:** ![jeevananthank](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/jeevananthank/32/4075_2.png) [@jeevananthank](https://community.postman.com/u/jeevananthank)\
**Post date:** [February 10, 2020, 11:39am UTC](https://community.postman.com/t/is-any-other-way-to-download-the-audio-response-in-collection/10406/4 "2020-02-10T11:39:17Z")

</div>

@pravinder sorry, forgot to mention this. Save this code to a .js file and run the file from cmd using

`node test.js`  
Remember to run `npm i newman` in the directory where you run the collection.

---

<div class="post-metadata">

**Author:** ![pravinder](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/pravinder/32/3672_2.png) [@pravinder](https://community.postman.com/u/pravinder)\
**Post date:** [February 10, 2020, 11:59am UTC](https://community.postman.com/t/is-any-other-way-to-download-the-audio-response-in-collection/10406/5 "2020-02-10T11:59:24Z")

</div>

Hi @jeevananthank  
Its not working . i have to run my collection with environment variables .where should i stored all these ?

---

<div class="post-metadata">

**Author:** ![jeevananthank](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/jeevananthank/32/4075_2.png) [@jeevananthank](https://community.postman.com/u/jeevananthank)\
**Post date:** [February 10, 2020, 12:00pm UTC](https://community.postman.com/t/is-any-other-way-to-download-the-audio-response-in-collection/10406/6 "2020-02-10T12:00:40Z")

</div>

> [@pravinder](#):
>
> s .where should i stor

Refer [GitHub - postmanlabs/newman: Newman is a command-line collection runner for Postman](https://github.com/postmanlabs/newman#newmanrunevents)

---

<div class="post-metadata">

**Author:** ![pravinder](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/pravinder/32/3672_2.png) [@pravinder](https://community.postman.com/u/pravinder)\
**Post date:** [February 11, 2020, 5:33am UTC](https://community.postman.com/t/is-any-other-way-to-download-the-audio-response-in-collection/10406/7 "2020-02-11T05:33:49Z")

</div>

Hi @jeevananthank  
Sorry not able to run . can you please explain me step by step so that i will do accordingly

---

<div class="post-metadata">

**Author:** ![pravinder](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/pravinder/32/3672_2.png) [@pravinder](https://community.postman.com/u/pravinder)\
**Post date:** [February 11, 2020, 7:20am UTC](https://community.postman.com/t/is-any-other-way-to-download-the-audio-response-in-collection/10406/8 "2020-02-11T07:20:25Z")

</div>

![image](https://us1.discourse-cdn.com/getpostman/original/3X/b/a/bac59af4b8bbb6073f67d402af70559a7b75d7bb.png)  
please see the error list

---

<div class="post-metadata">

**Author:** ![fatih](https://avatars.discourse-cdn.com/v4/letter/f/d9b06d/32.png) [@fatih](https://community.postman.com/u/fatih)\
**Post date:** [May 14, 2020, 1:01am UTC](https://community.postman.com/t/is-any-other-way-to-download-the-audio-response-in-collection/10406/9 "2020-05-14T01:01:32Z")

</div>

Hi @jeevananthank,  
Thank you for sharing your script. As far as I see, your script is the only way for downloading a pdf file via newman.  
How can I pass a Bearer token in your script?  
I checked the documentation but could not find a way for it.

---

<div class="post-metadata">

**Author:** ![m234461](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@m234461](https://community.postman.com/u/m234461)\
**Post date:** [June 16, 2021, 6:20pm UTC](https://community.postman.com/t/is-any-other-way-to-download-the-audio-response-in-collection/10406/10 "2021-06-16T18:20:48Z")

</div>

@pravinder @jeevananthank : Hi, i have similar issue facing i.e not able to download .wav or mp3 format via collection. I am running a collection which is able to download the content (as symbols) however i would need to get in .wav file to play the audio. For this to work send with download when run the collection . Could you assist me what changes required in order to send with download work?
