Currently, I'm trying to convert a response of Kinesis Vides Stream GetMedia API to an audio file but have had no success in this. According to AWS documentation, - result of GetMedia request? it's recommended to use Kinesis Video Stream Parser Library. But I'd like to use js/ts implementation. Is it possible to convert this stream to an audio file using just js/ts?
Thank you for your help.
I finally figured out how to convert a Kinesis Video Stream into an audio file. This is how I did it with Node.js and the AWS SDK for JavaScript:
After choosing the default npm options, open the newly generated
package.jsonfile and add the following:Now install the SDK modules:
Then in the
index.jsfile, copy and paste the following:Run the script:
and this should output the
audio.wavfile!