@pietrop/assemblyai

2.0.3 • Public • Published

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

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.3
    13
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.3
    13
  • 2.0.2
    6
  • 2.0.1
    1
  • 2.0.0
    1

Package Sidebar

Install

npm i @pietrop/assemblyai

Weekly Downloads

1

Version

2.0.3

License

ISC

Unpacked Size

87.9 kB

Total Files

8

Last publish

Collaborators

  • pietrop