Logo

Fal

Orate supports Fal's transcription services.

Fal is a generative media platform for developers, helping you build the next generation of creativity. Orate supports Fal's transcription services.

Setup

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

import { Fal } from 'orate/fal';

Configuration

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

const fal = new Fal();

This will use the FAL_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 fal = new Fal('your_api_key');

Usage

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

Speech to Text

The Fal provider provides a stt function that allows you to create a speech-to-text transcription function using Fal's models. By default, the stt function uses the fal-ai/whisper model.

import { transcribe } from 'orate';
import { Fal } from 'orate/fal';
 
const text = await transcribe({
  model: new Fal().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 Fal().stt('fal-ai/wizper'),
  audio: new File(...),
});

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

const text = await transcribe({
  model: new Fal().stt('fal-ai/wizper', {
    diarize: true,
  }),
  audio: new File(...),
});

You can also stream the transcription.

const text = await transcribe({
  model: new Fal().stt(),
  audio: new File(...),
  stream: true,
});

On this page