import { openAsBlob } from "node:fs"; import { FireworksAI } from "@simplesagar/fireworksai"; const fireworksAI = new FireworksAI({ apiKey: process.env["FIREWORKS_API_KEY"] ?? "", }); async function run() { const result = await fireworksAI.audio.createTranslation({ file: await openAsBlob("./samples/test.mp3", { type: "audio/mpeg" }), model: "whisper-v3", responseFormat: "json", temperature: 0, vadModel: "silero", alignmentModel: "mms_fa", }); // Handle the result console.log(result); } run();