Logo

AssemblyAI

Orate supports AssemblyAI's transcription services.

AssemblyAI is a leader in Speech AI to power world-class products with unmatched accuracy, breakthrough speech-to-text models, and profound speech understanding.

Setup

The AssemblyAI provider is available by default in Orate. To import it, you can use the following code:

import { AssemblyAI } from 'orate/assembly';

Configuration

You can use AssemblyAI by creating a new instance of the AssemblyAI class:

const assembly = new AssemblyAI();

This will use the ASSEMBLYAI_API_KEY environment variable. If you don't have this variable set, you can pass your API key as an argument to the constructor.

const assembly = new AssemblyAI('your_api_key');

Usage

The AssemblyAI provider provides a single interface for all of AssemblyAI's transcription services.

Speech to Text

The AssemblyAI provider provides a stt function that allows you to create a speech-to-text transcription function using AssemblyAI. By default, the stt function uses the best model.

import { transcribe } from 'orate';
import { AssemblyAI } from 'orate/assemblyai';
 
const text = await transcribe({
  model: new AssemblyAI().stt(),
  audio: new File(...),
});

You can specify the model to use by passing it as an argument to the stt function.

const text = await transcribe({
  model: new AssemblyAI().stt('nano'),
  audio: new File(...),
});

You can also specify specific AssemblyAI properties by passing them as an argument to the stt function.

const text = await transcribe({
  model: new AssemblyAI().stt('nano', {
    punctuate: false,
  }),
  audio: new File(...),
});

On this page