GitHub - alexhamidi/samantha: A Playwright wrapper for Meta's SAM Audio playground that removes the 29s limit by chunking audio, processing segments in parallel, and stitching outputs.

1 min read Original article ↗
0107_44s.mp4

A wrapper for Meta's SAM Audio Editor that handles audio files of any length (Meta's demo has a 29-second limit).

Upload an MP3/WAV/M4A and edit it with natural language prompts like "remove vocals" or "isolate the drums". Audio >29s is automatically split into chunks, processed in parallel, and stitched back together.

Setup & Run

Run the setup script (handles everything automatically):

The script will:

  • Install ffmpeg (if not present)
  • Install Chrome (if not present)
  • Create a virtual environment (uses uv if available for faster installs)
  • Install all Python dependencies
  • Install Playwright and its dependencies
  • Install all frontend dependencies (uses bun if available)
  • Optionally start both backend (port 8000) and frontend (port 3000)

Then open http://localhost:3000

Notes

Built on top of Meta's SAM (Segment Anything Model) audio demo.

This tool automates Meta's playground. By using it, you agree to their Terms and Usage Policy. Personal/non-commercial use only.

Processed outputs are stored locally in the backend/uploads/ and backend/outputs/ directories and metadata is stored in backend/data.json.