Play audio directly from Lambda /tmp folder Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar Manara Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!S3 Bucket Policy for hotlinking is preventing writesHow to pass a querystring or route parameter to AWS Lambda from Amazon API GatewayHow to configure aws s3 bucket to accept signed urls on Heroku?Node js - Moving a file from /tmp in Amazon Lambda to an s3bucketClearing out tmp folder from AWS LambdaIssues with JSON.parse on input object form S3 - Node.jsS3 upload from browser with presigned URL and SSE-C - 307 and 403sNodeJS - reading file from S3 to /tmp folder in LambdaPython | Lambda | Decrypt EFS data and send to S3How to access /tmp folder in Lambda with in Node?
How to open locks without disable device?
Protagonist's race is hidden - should I reveal it?
With indentation set to `0em`, when using a line break, there is still an indentation of a size of a space
Implementing 3DES algorithm in Java: is my code secure?
"Whatever a Russian does, they end up making the Kalashnikov gun"? Are there any similar proverbs in English?
Has a Nobel Peace laureate ever been accused of war crimes?
Do I need to protect SFP ports and optics from dust/contaminants? If so, how?
AI positioning circles within an arc at equal distances and heights
Married in secret, can marital status in passport be changed at a later date?
What *exactly* is electrical current, voltage, and resistance?
My admission is revoked after accepting the admission offer
Is Diceware more secure than a long passphrase?
Are these square matrices always diagonalisable?
How to find the right literary agent in the USA?
A strange hotel
What is it called when you ride around on your front wheel?
Did the Roman Empire have Penal Colonies?
How to translate "red flag" into Spanish?
Is there any hidden 'W' sound after 'comment' in : Comment est-elle?
"My boss was furious with me and I have been fired" vs. "My boss was furious with me and I was fired"
All ASCII characters with a given bit count
std::is_constructible on incomplete types
Book with legacy programming code on a space ship that the main character hacks to escape
Could Neutrino technically as side-effect, incentivize centralization of the bitcoin network?
Play audio directly from Lambda /tmp folder
Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar Manara
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!S3 Bucket Policy for hotlinking is preventing writesHow to pass a querystring or route parameter to AWS Lambda from Amazon API GatewayHow to configure aws s3 bucket to accept signed urls on Heroku?Node js - Moving a file from /tmp in Amazon Lambda to an s3bucketClearing out tmp folder from AWS LambdaIssues with JSON.parse on input object form S3 - Node.jsS3 upload from browser with presigned URL and SSE-C - 307 and 403sNodeJS - reading file from S3 to /tmp folder in LambdaPython | Lambda | Decrypt EFS data and send to S3How to access /tmp folder in Lambda with in Node?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I'm currently building a Alexa application in Node with Lambda. I have the need to convert and merge several audio files. I'm currently creating an audio file using google text-to-speech (long story on the need for it) which I write to /tmp and pulling an audio file from s3 which I also write to /tmp. I'm then using sox to merge the two files (see below) and write back to S3 (currently public) which I then have hard coded to play that particular clip.
My question is if it is possible to play audio directly from the /tmp folder as opposed to having to write the file back to S3.
await lambdaAudio.sox('-m /tmp/google-formatted.mp3 /tmp/audio.mp3 /tmp/result.mp3')
// get data from resulting mp3
const data = await readFile('/tmp/result.mp3');
const base64data = new Buffer(data, 'binary');
// put file back on AWS for playing
s3.putObject(
Bucket: 'my-bucket',
Key: 'result.mp3',
Body: base64data,
ACL:'public-read'
,function (resp)
console.log('Done');
);
return`<audio src="https://s3.amazonaws.com/my-bucket/result.mp3" />`;
node.js amazon-s3 aws-lambda alexa
add a comment |
I'm currently building a Alexa application in Node with Lambda. I have the need to convert and merge several audio files. I'm currently creating an audio file using google text-to-speech (long story on the need for it) which I write to /tmp and pulling an audio file from s3 which I also write to /tmp. I'm then using sox to merge the two files (see below) and write back to S3 (currently public) which I then have hard coded to play that particular clip.
My question is if it is possible to play audio directly from the /tmp folder as opposed to having to write the file back to S3.
await lambdaAudio.sox('-m /tmp/google-formatted.mp3 /tmp/audio.mp3 /tmp/result.mp3')
// get data from resulting mp3
const data = await readFile('/tmp/result.mp3');
const base64data = new Buffer(data, 'binary');
// put file back on AWS for playing
s3.putObject(
Bucket: 'my-bucket',
Key: 'result.mp3',
Body: base64data,
ACL:'public-read'
,function (resp)
console.log('Done');
);
return`<audio src="https://s3.amazonaws.com/my-bucket/result.mp3" />`;
node.js amazon-s3 aws-lambda alexa
add a comment |
I'm currently building a Alexa application in Node with Lambda. I have the need to convert and merge several audio files. I'm currently creating an audio file using google text-to-speech (long story on the need for it) which I write to /tmp and pulling an audio file from s3 which I also write to /tmp. I'm then using sox to merge the two files (see below) and write back to S3 (currently public) which I then have hard coded to play that particular clip.
My question is if it is possible to play audio directly from the /tmp folder as opposed to having to write the file back to S3.
await lambdaAudio.sox('-m /tmp/google-formatted.mp3 /tmp/audio.mp3 /tmp/result.mp3')
// get data from resulting mp3
const data = await readFile('/tmp/result.mp3');
const base64data = new Buffer(data, 'binary');
// put file back on AWS for playing
s3.putObject(
Bucket: 'my-bucket',
Key: 'result.mp3',
Body: base64data,
ACL:'public-read'
,function (resp)
console.log('Done');
);
return`<audio src="https://s3.amazonaws.com/my-bucket/result.mp3" />`;
node.js amazon-s3 aws-lambda alexa
I'm currently building a Alexa application in Node with Lambda. I have the need to convert and merge several audio files. I'm currently creating an audio file using google text-to-speech (long story on the need for it) which I write to /tmp and pulling an audio file from s3 which I also write to /tmp. I'm then using sox to merge the two files (see below) and write back to S3 (currently public) which I then have hard coded to play that particular clip.
My question is if it is possible to play audio directly from the /tmp folder as opposed to having to write the file back to S3.
await lambdaAudio.sox('-m /tmp/google-formatted.mp3 /tmp/audio.mp3 /tmp/result.mp3')
// get data from resulting mp3
const data = await readFile('/tmp/result.mp3');
const base64data = new Buffer(data, 'binary');
// put file back on AWS for playing
s3.putObject(
Bucket: 'my-bucket',
Key: 'result.mp3',
Body: base64data,
ACL:'public-read'
,function (resp)
console.log('Done');
);
return`<audio src="https://s3.amazonaws.com/my-bucket/result.mp3" />`;
node.js amazon-s3 aws-lambda alexa
node.js amazon-s3 aws-lambda alexa
edited Mar 23 at 8:20
John Rotenstein
80k791143
80k791143
asked Mar 22 at 15:49
eric MCeric MC
4362530
4362530
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I usually upload the lambda function zipping the code and modules and in general all the files that my code requires.
https://developer.amazon.com/blogs/post/Tx1UE9W1NQ0GYII/Publishing-Your-Skill-Code-to-Lambda-via-the-Command-Line-Interface
So if you zip the /tmp directory and publish it as part of your lambda code the audio file will be accessible by your lambda function
unfortunately this audio dialog needs to be created on the fly, writing to the /tmp folder then read so uploading it isn't an option.
– eric MC
Mar 25 at 16:17
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55303357%2fplay-audio-directly-from-lambda-tmp-folder%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I usually upload the lambda function zipping the code and modules and in general all the files that my code requires.
https://developer.amazon.com/blogs/post/Tx1UE9W1NQ0GYII/Publishing-Your-Skill-Code-to-Lambda-via-the-Command-Line-Interface
So if you zip the /tmp directory and publish it as part of your lambda code the audio file will be accessible by your lambda function
unfortunately this audio dialog needs to be created on the fly, writing to the /tmp folder then read so uploading it isn't an option.
– eric MC
Mar 25 at 16:17
add a comment |
I usually upload the lambda function zipping the code and modules and in general all the files that my code requires.
https://developer.amazon.com/blogs/post/Tx1UE9W1NQ0GYII/Publishing-Your-Skill-Code-to-Lambda-via-the-Command-Line-Interface
So if you zip the /tmp directory and publish it as part of your lambda code the audio file will be accessible by your lambda function
unfortunately this audio dialog needs to be created on the fly, writing to the /tmp folder then read so uploading it isn't an option.
– eric MC
Mar 25 at 16:17
add a comment |
I usually upload the lambda function zipping the code and modules and in general all the files that my code requires.
https://developer.amazon.com/blogs/post/Tx1UE9W1NQ0GYII/Publishing-Your-Skill-Code-to-Lambda-via-the-Command-Line-Interface
So if you zip the /tmp directory and publish it as part of your lambda code the audio file will be accessible by your lambda function
I usually upload the lambda function zipping the code and modules and in general all the files that my code requires.
https://developer.amazon.com/blogs/post/Tx1UE9W1NQ0GYII/Publishing-Your-Skill-Code-to-Lambda-via-the-Command-Line-Interface
So if you zip the /tmp directory and publish it as part of your lambda code the audio file will be accessible by your lambda function
answered Mar 23 at 8:10
Ester Gonzalez De LangaricaEster Gonzalez De Langarica
1298
1298
unfortunately this audio dialog needs to be created on the fly, writing to the /tmp folder then read so uploading it isn't an option.
– eric MC
Mar 25 at 16:17
add a comment |
unfortunately this audio dialog needs to be created on the fly, writing to the /tmp folder then read so uploading it isn't an option.
– eric MC
Mar 25 at 16:17
unfortunately this audio dialog needs to be created on the fly, writing to the /tmp folder then read so uploading it isn't an option.
– eric MC
Mar 25 at 16:17
unfortunately this audio dialog needs to be created on the fly, writing to the /tmp folder then read so uploading it isn't an option.
– eric MC
Mar 25 at 16:17
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55303357%2fplay-audio-directly-from-lambda-tmp-folder%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown