Skip to main content

Installation

Install Tafrigh using your preferred package manager.

Requirements

Tafrigh requires Node.js 24.0.0 or higher, or Bun 1.3.3 or higher.
Before installing, make sure you have:
  • Node.js 24.0.0+ or Bun 1.3.3+
  • FFmpeg installed on your system (required for audio processing)
  • At least one Wit.ai API key (create one here)

Package managers

npm install tafrigh

Verify installation

After installation, verify that Tafrigh is properly installed by importing it in a test file:
import { init, transcribe } from 'tafrigh';

console.log('Tafrigh installed successfully!');

FFmpeg installation

Tafrigh uses FFmpeg for audio processing. If you don’t have FFmpeg installed:
brew install ffmpeg
Verify FFmpeg is installed:
ffmpeg -version

Get Wit.ai API keys

To use Tafrigh, you’ll need at least one Wit.ai API key:
1

Create a Wit.ai account

Visit wit.ai and sign up for a free account
2

Create a new app

In the Wit.ai dashboard, create a new app and select the language you want to transcribe
3

Copy your API key

Go to Settings > API Details and copy your Server Access Token
The language you select when creating your Wit.ai app determines the transcription language. If your API key is for English and you provide Arabic audio, the transcription will not be accurate.

Next steps

Quick start

Learn how to transcribe your first audio file

Build docs developers (and LLMs) love