aflr npm

node v10.24.1
version: 0.3.6
endpointsharetweet
Aflorithmic Javascript SDK example usage with CommonJS
const Aflr = require("aflr").default; async function example() { try { Aflr.configure({ apiKey: process.env.apikey, debug: true }); const script = await Aflr.Script.create({ scriptText: "Hello world" }); console.log(script); const speech = await Aflr.Speech.create({ scriptId: script["scriptId"] }); console.log(speech); const bg_tracks = await Aflr.Sound.list(); console.log(bg_tracks); const mastering = await Aflr.Mastering.create({ scriptId: script["scriptId"], backgroundTrackId: bg_tracks[0]["id"], audience: [{}] }); console.log(mastering); const masteringResult = await Aflr.Mastering.retrieve(script["scriptId"], {}); console.log(masteringResult); } catch (e) { console.error(e); } } example();
Loading…

no comments

    sign in to comment