FelixWaweru / elevenlabs-node

Eleven Labs text to speech package for NodeJS. You can use the official package at: https://www.npmjs.com/package/elevenlabs
https://www.npmjs.com/package/elevenlabs-node
MIT License
169 stars 25 forks source link

feat: support for optional file downloading to get readableStream #52

Closed alexcraviotto closed 7 months ago

alexcraviotto commented 8 months ago

I was using this library when I wanted to consider saving the elevenlabs audio file in an S3 bucket.

The problem I encountered is that I was forced to download the file and then upload it.

With this small modification we can obtain with an optional parameter downloadFile in false the readableStream, that allows to upload directly to S3 this file without downloading it previously in our machine.

FelixWaweru commented 8 months ago

Thank you for the contribution @alexcraviotto

This was a highly requested feature and we added it to the API in our last release. To do this, you can use the textToSpeechStream feature which let's you return a readableStream that you can then upload to S3