Skip to content

justinechang39/elevenlabs_test

Repository files navigation

ElevenLabs Transcription Tool

A TypeScript tool for batch transcribing audio/video files using the ElevenLabs Speech-to-Text API.

Setup

  1. Install dependencies:

    npm install
  2. Create a .env file with your ElevenLabs API key:

    cp .env.example .env
    # Edit .env and add your API key
  3. Add audio/video files to the to transcribe folder

Usage

  1. Development mode (with TypeScript compilation):

    npm run dev
  2. Production mode (compile first, then run):

    npm run build
    npm start

Features

  • Supports all major audio/video formats (mp3, wav, m4a, flac, ogg, mp4, mov, avi, mkv)
  • Outputs JSON transcription files next to source files with same name
  • Includes speaker diarization and audio event tagging
  • Batch processes all files in the to transcribe folder

Scripts

  • npm run build - Compile TypeScript to JavaScript
  • npm run dev - Run in development mode with ts-node
  • npm start - Run compiled JavaScript
  • npm run lint - Check code style
  • npm run lint:fix - Fix linting issues
  • npm run format - Format code with Prettier
  • npm run check - Run TypeScript check and linting

Output Format

Each audio file generates a JSON file containing:

  • text: Full transcription text
  • language_code: Detected language
  • language_probability: Confidence in language detection
  • words: Array of word objects with timestamps and speaker information

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published