Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lunarity/a2s-cli

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lunarity/a2s-cli

A CLI tool for transcribing audio files to subtitles

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
231
Maintainers
0
Weekly downloads
 
Created
Source

A2S - CLI (Audio to Subtitles - Command Line Interface)

A command-line tool that transcribes audio files using OpenAI's Whisper model.

Features

  • Batch process multiple audio files
  • Support for multiple languages
  • Customizable input and output directories
  • Progress tracking and detailed logging
  • Summary report after completion

Prerequisites

  • Bun runtime
  • OpenAI API key

Installation

  1. Clone the repository

  2. Install dependencies:

    bun install
    
  3. Set up your OpenAI API key:

    • Copy .env.example to create a new .env file
    • Add your OpenAI API key to the .env file:
    OPENAI_API_KEY=your-api-key-here
    

Usage

Basic usage with default options:

bun transcribe

This command will:

  • Rename audio files to remove spaces and special characters
  • Transcribe all audio files to text
  • Format the output with proper line breaks

Additional Commands

  • bun rename - Clean up audio file names
  • bun format - Format existing transcript files
  • bun clean - Remove all files from audio and transcripts directories
  • bun youtube - Download audio from YouTube to the ./audio directory

Output

Transcribed files will be saved in the transcripts directory with the same base name as the input audio file.

Notes

  • Supports MP3 and WAV audio files
  • Optimized for Polish language transcription
  • Automatically formats output with proper sentence breaks

Options

  • -l, --lang <language> - Specify the language to transcribe to (default: "en")
  • -i, --input-dir <directory> - Set input directory (default: "./audio")
  • -o, --output-dir <directory> - Set output directory (default: "./transcripts")

Example with options:

bun transcribe --lang pl --input-dir ./my-audio --output-dir ./my-transcripts

Directory Structure

.
├── audio/          # Default input directory for audio files
├── transcripts/    # Default output directory for transcriptions
├── api/            # API related files
├── index.ts        # Main application file
└── utils.ts        # Utility functions

Output Format

Transcriptions are saved as text files in the output directory. The filename will match the input audio file's name (without the audio extension).

Error Handling

  • The tool provides detailed error messages for failed transcriptions
  • A summary report shows successful and failed transcriptions
  • Failed transcriptions don't stop the batch process

Contributing

Feel free to submit issues and pull requests.

License

MIT

Keywords

FAQs

Package last updated on 01 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc