Sand AISand AI MAGI-2ตอนนี้ MAGI-2 อยู่บน SandBase แล้ว: วิดีโอ 1080p พร้อมเสียงในตัวลองใช้เลย

SAM Audio Span Separate

meta/sam-audio/span-separate

SAM Audio by Meta isolates a sound using time spans that mark where it occurs, optionally guided by a text description. It returns the isolated target and the residual audio, either full length or trimmed to the spans.

ราคาพื้นฐาน
$0.05USD / การรัน
การทำงาน
async
ประเภโมเดล
audio
ฟิลด์อินพุต
7
เส้นทางโปรดักชัน

ลองใช้โมเดล

Playground

เปิด Playground
อินพุต
Audio file or URL to process.
Time spans where the target sound occurs. Each item has `start` and `end` in seconds and `include` (true to isolate sounds in this span, false to exclude them).
Optional but recommended text describing the sound to isolate.
Trim the output to the span time range. If false, returns the full audio length with the target isolated throughout.
Rank reranking candidates by how well their non-silent regions match the spans. Works without a prompt; requires `reranking_candidates` > 1.
17
Number of candidates to generate and rank (1–7). Higher improves quality but adds $0.025 per 30 s per extra candidate. ช่วง: 1 ถึง 7.
Output audio format.
เอาต์พุตพร้อมใช้งาน

เอาต์พุตของคุณจะแสดงที่นี่

กรอกอินพุตให้ครบ แล้วคลิก Run

การ์ดโมเดล

ข้อมูลจำเพาะ

ราคา

ราคาพื้นฐาน
$0.05 / การรัน

บริบทและ modalities

อินพุต
กำหนดตามสคีมา
เอาต์พุต
audio

ความสามารถ

แชท
ไม่รองรับ
วิชัน
ไม่รองรับ
การให้เหตุผล
ไม่รองรับ
เอาต์พุตแบบมีโครงสร้าง
ไม่รองรับ
การเรียกใช้ฟังก์ชัน
ไม่รองรับ
อินพุตเสียง
ไม่รองรับ

การเข้าถึง

ผู้ให้บริการ
Meta
รหัสโมเดล
meta/sam-audio/span-separate
การทำงาน
async
Base URL
https://api.sandbase.ai
API
Unified Run API
Endpoint
/v1/run

API README

SAM Audio Span Separate

SAM Audio isolates a sound from the time spans where it occurs, with an optional text hint, and returns it with the residual track.

Fields

FieldTypeDefaultNotes
audioaudio file or URL, required—Recording to separate.
spansarray of {start, end, include}, required—Time ranges in seconds; include: false marks ranges to exclude.
promptstring—Optional hint about the sound.
trim_to_spanbooleanfalseReturn only the span range instead of the full length.
use_sound_activity_rankingbooleanfalseRank candidates by match to the spans; needs more than one candidate.
reranking_candidatesinteger 1–71Extra candidates improve quality; each adds $0.025 per 30 s.
output_formatwav / mp3wavOutput file format.

Output

FieldNotes
urlIsolated target sound.
residual_urlEverything else (the input minus the target).
durationOutput length in seconds.

Billing

$0.05 per started 30 seconds of output audio (shorter with trim_to_span), plus $0.025 per 30 seconds for each extra reranking candidate. The final charge uses the measured output length; the quote uses the input length (10 minutes if it cannot be read).

AudioPrice
30 s, 1 candidate$0.05
2 min, 1 candidate$0.20
2 min, 3 candidates$0.40

Failed runs are not charged.

Prompting

  • Mark a span where the target is clearly audible; add a short prompt such as dog barking for better results.

Also on SandBase

Related: meta/sam-audio/separate, meta/sam-audio/visual-separate.

เริ่มสร้าง

ส่งคำขอแรกของคุณ

เอ็นด์พอยต์ที่ใช้งานร่วมกับ OpenAI ได้ พร้อมการยืนยันตัวตนและการติดตามการใช้งานแบบรวมศูนย์

Production API
เอ็นด์พอยต์ Unified Run API
https://api.sandbase.ai/v1/run
รหัสโมเดล
meta/sam-audio/span-separate
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
  -X POST "https://api.sandbase.ai/v1/run" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'SANDBASE_JSON'
{
  "model": "meta/sam-audio/span-separate",
  "audio": "https://v3b.fal.media/files/b/0a8853d1/T7zRmsiculA6u_V6RCF2c_man.mp3",
  "spans": [
    [
      {
        "end": 10,
        "start": 6,
        "include": true
      }
    ]
  ],
  "prompt": "man singing",
  "trim_to_span": false,
  "output_format": "wav",
  "reranking_candidates": 1,
  "use_sound_activity_ranking": false
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
  status=$(printf '%s' "$result" | jq -r .status)
  case "$status" in completed|failed|timeout) break ;; esac
  sleep 2
  result=$(curl --fail-with-body --silent \
    -H "Authorization: Bearer $SANDBASE_API_KEY" \
    "https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"
01

สคีมาขาเข้า

7 พารามิเตอร์ · จำเป็น 2 · ไม่บังคับ 5

พารามิเตอร์ประเภทจำเป็นคำอธิบาย
audiostringจำเป็นAudio file or URL to process.
spansobject[]จำเป็นTime spans where the target sound occurs. Each item has `start` and `end` in seconds and `include` (true to isolate sounds in this span, false to exclude them).
promptstringไม่บังคับOptional but recommended text describing the sound to isolate.
trim_to_spanbooleanไม่บังคับTrim the output to the span time range. If false, returns the full audio length with the target isolated throughout. · ค่าเริ่มต้น: false
output_formatstringไม่บังคับOutput audio format. · ตัวเลือก: wav, mp3 · ค่าเริ่มต้น: "wav"
wavmp3
reranking_candidatesintegerไม่บังคับNumber of candidates to generate and rank (1–7). Higher improves quality but adds $0.025 per 30 s per extra candidate. · ต่ำสุด: 1 · สูงสุด: 7 · ค่าเริ่มต้น: 1
use_sound_activity_rankingbooleanไม่บังคับRank reranking candidates by how well their non-silent regions match the spans. Works without a prompt; requires `reranking_candidates` > 1. · ค่าเริ่มต้น: false
02

สคีมาเอาต์พุต

ฟิลด์ประเภทคำอธิบาย
idstringตัวระบุเฉพาะสำหรับงาน generation
statusstringสถานะงาน: pending, running, completed, failed, timeout
modelstringโมเดลที่ใช้สำหรับ generation
outputsarrayอาร์เรย์ของรายการเอาต์พุต
outputs[].urlstringURL ของอาร์ติแฟกต์ที่สร้างขึ้น
outputs[].content_typestringประเภท MIME (เช่น image/png, video/mp4)
errorobject | nullรายละเอียดข้อผิดพลาดหากล้มเหลว, เป็น null เมื่อสำเร็จ
error.typestringรหัสประเภทข้อผิดพลาดที่เครื่องอ่านได้
error.messagestringคำอธิบายข้อผิดพลาดที่มนุษย์อ่านได้

เวิร์กโฟลว์แบบอะซิงก์

โมเดลนี้ทำงานแบบอะซิงโครนัส ส่งคำขอแล้วคอยตรวจผลลัพธ์

  1. ส่ง: POST ไปที่ /v1/run แล้วอ่าน id ที่ส่งกลับมา
  2. คอยตรวจ: GET /v1/run/{id} จนกว่าสถานะจะเป็น completed, failed หรือ timeout
  3. ดึงข้อมูล: อ่าน outputs จากการตอบกลับที่เสร็จสมบูรณ์

เลือกโมเดลของคุณ

เปรียบเทียบโมเดล

โมเดลภาพและวิดีโอทั้งหมด
โมเดลประเภทราคามาตรฐานเปิดตัว
SAM Audio Span Separateโมเดลนี้
Meta
เสียง$0.05 / ครั้ง30 ธ.ค. 2568
Metaเสียง$0.05 / ครั้ง30 ธ.ค. 2568
Metaเสียง$0.05 / ครั้ง30 ธ.ค. 2568
Metaเสียง$0.04 / ครั้ง27 ต.ค. 2568

คำถาม

คำถามที่พบบ่อย

ฉันจะเรียก Meta SAM Audio Span Separate ผ่าน SandBase ได้อย่างไร?

สร้าง SandBase API key แล้วส่งคำขอด้วย model ID "meta/sam-audio/span-separate" ไปที่ Unified Run API (/v1/run) ที่ https://api.sandbase.ai ตัวอย่างคำขอบนหน้านี้แสดง payload ที่ถูกต้องทั้งหมด

ฉันจำเป็นต้องมีบัญชี Meta แยกต่างหากไหม?

ไม่จำเป็น SandBase API key และยอดคงเหลือหนึ่งชุดให้คุณเข้าถึง Meta SAM Audio Span Separate และโมเดลอื่น ๆ ในแค็ตตาล็อกได้ คุณไม่ต้องสมัครใช้งานกับ Meta แยกต่างหาก