Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: TypeError: path must be a string or Buffer when calling #11

Open
ABettega opened this issue Nov 22, 2017 · 0 comments
Open

Comments

@ABettega
Copy link

I'm having trouble while calling Polly.

Polly.synthesizeSpeech(params, (err, data) => { if (err) { console.log(err.code) } else if (data) { if (data.AudioStream instanceof Buffer) { Fs.writeFile(argv.mp3, data.AudioStream, (err)=> { if (err) { return console.log(err) } console.log("The file was saved!") var output = child_process.execSync('lame --decode ' + argv.mp3 + ' ' + '-b 8000' + ' ' + argv.wav + '.wav'); }) } } })

/opt/aws-nodejs-sample/node_modules/aws-sdk/lib/request.js:31
throw err;
^

TypeError: path must be a string or Buffer
at TypeError (native)
at Object.fs.open (fs.js:631:11)
at Object.fs.writeFile (fs.js:1303:6)
at Response. (/opt/aws-nodejs-sample/script.js:29:4)
at Request. (/opt/aws-nodejs-sample/node_modules/aws-sdk/lib/request.js:364:18)
at Request.callListeners (/opt/aws-nodejs-sample/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
at Request.emit (/opt/aws-nodejs-sample/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
at Request.emit (/opt/aws-nodejs-sample/node_modules/aws-sdk/lib/request.js:683:14)
at Request.transition (/opt/aws-nodejs-sample/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/opt/aws-nodejs-sample/node_modules/aws-sdk/lib/state_machine.js:14:12)

I have no idea how to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant