pietrop / assemblyai-node-sdk

AssemblyAI Node SDK for v2 of the API - Unofficial, and unsupported Node SDK for AssemblyAI v2 of the API

Home Page:https://www.assemblyai.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AssemblyAI Node SDK v2

Example usage

require('dotenv').config()
const assemblyai = require('./index.js');
const ApiKey = process.env.ASSEMBLYAI_API_KEY;

const filePath = "./example.mp3"; // some path to a local file, in .gitignore 

async function upload() {
    try {
        const response = await assemblyai({ApiKey, filePath});
        console.log('response', response)
    } catch (e) { // Do some error handling here
        console.log('error in example usage:: ', e)
    }
}

upload();

examples assumes there is a .env file, but you can also handle your credentials in the parent app how you see fit.

ASSEMBLYAI_API_KEY=YOUR_ASSEMBLYAI_CREDENTIALS

TODO

  • Initialization
  • Upload an audio file for transcription
  • Transcribe audio from a URL
  • Create a custom model

About

AssemblyAI Node SDK for v2 of the API - Unofficial, and unsupported Node SDK for AssemblyAI v2 of the API

https://www.assemblyai.com


Languages

Language:JavaScript 100.0%