audio-isolation

Audio Isolation - Extract sounds from audio/video

Isolate and extract specific sounds from audio or video files using SAM Audio AI technology. Describe the sound you want to isolate, and the API separates it from background noise.

Use cases:

  • Extract speech from noisy recordings
  • Isolate musical instruments from a mix
  • Separate specific sound effects from video audio
  • Remove background noise while preserving target sounds

Input options:

  • Provide either an audio URL/base64 or a video URL/base64 (mutually exclusive)
  • Supported audio formats: WAV, MP3, FLAC, OGG, M4A
  • Supported video formats: MP4, MOV, WEBM, AVI
  • For video input, use bounding box coordinates (x1, y1, x2, y2) to focus on a specific region

Output: WAV audio file containing the isolated sound

post/v1/ai/audio-isolation

Request

  • Base URL: https://api.magnific.com
  • URL: https://api.magnific.com/v1/ai/audio-isolation
  • Auth: API key in header x-magnific-api-key

Request body

descriptionstring required

Text description of the sound to isolate from the input audio or video. Be specific about the type of sound you want to extract.

audiostring

Audio input - either a publicly accessible HTTPS URL or base64 encoded audio. Supported formats: WAV, MP3, FLAC, OGG, M4A. Mutually exclusive with video.

videostring

Video input - either a publicly accessible HTTPS URL or base64 encoded video. Supported formats: MP4, MOV, WEBM, AVI. Mutually exclusive with audio.

x1integer

Bounding box x1 coordinate (left edge) in pixels for sound source localization. Only applicable for video input.

y1integer

Bounding box y1 coordinate (top edge) in pixels for sound source localization. Only applicable for video input.

x2integer

Bounding box x2 coordinate (right edge) in pixels for sound source localization. Only applicable for video input.

y2integer

Bounding box y2 coordinate (bottom edge) in pixels for sound source localization. Only applicable for video input.

sample_fpsnumber

Frame sampling rate in FPS for video processing. Higher values provide more temporal precision but increase processing time.

reranking_candidatesinteger

Number of reranking candidates for quality vs latency trade-off. Higher values produce better quality but slower processing.

predict_spansboolean

Enable span prediction for better isolation of non-ambient sounds like speech or musical notes.

webhook_urlstring uri

Optional callback URL that will receive asynchronous notifications whenever the task changes status. The payload sent to this URL is the same as the corresponding GET endpoint response, but without the data field.

Example request

{
  "description": "A person speaking",
  "audio": "https://example.com/input-audio.wav",
  "video": "https://example.com/input-video.mp4",
  "x1": 100,
  "y1": 50,
  "x2": 400,
  "y2": 300,
  "sample_fps": 2,
  "reranking_candidates": 1,
  "webhook_url": "https://www.example.com/webhook"
}

Response

OK - The task exists and the status is returned

Example response

{
  "data": {
    "generated": [
      "https://openapi-generator.tech",
      "https://openapi-generator.tech"
    ],
    "task_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "status": "CREATED"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.