Last active
May 29, 2021 08:49
-
-
Save rashaabdulrazzak/c80223dc561ea23f7f611ad40c5480be to your computer and use it in GitHub Desktop.
local file transcript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// require fs to be able to read the file | |
const fs = require('fs') | |
// define the path where the file located | |
const filename = './resources/test.wav' | |
// the changes below should inclouded inside quickstart function | |
// read the file | |
const file = fs.readFileSync(filename) | |
// convert it to base 64 | |
const audioBytes = file.toString('base64') | |
const audio = { | |
content: audioBytes | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment