Files
SnapOtter/apps/docs/vi/tools/audio/ringtone-maker.md
T
SnapOtterandGitHub 4963ab3bbd feat(docs-i18n): translate all documentation into 20 languages
All 181 docs markdown files translated into 20 languages (apps/docs/<locale>/**). Companion to the i18n code PR; admin-merged because the file count exceeds GitHub's per-PR CI trigger limit. Validated by pnpm i18n:check (all surfaces, 0 stale/missing) and a clean all-locale docs build.
2026-07-11 13:52:47 +08:00

1.6 KiB

description, i18n_source_hash, i18n_provenance, i18n_output_hash
description i18n_source_hash i18n_provenance i18n_output_hash
Tạo một đoạn nhạc chuông từ bất kỳ tệp âm thanh nào. 8fcdcc545fbc human 99ea82c04da7

Tạo nhạc chuông

Tạo một đoạn nhạc chuông (.m4r) từ bất kỳ tệp âm thanh nào bằng cách chọn thời điểm bắt đầu và thời lượng.

Endpoint API

POST /api/v1/tools/audio/ringtone-maker

Chấp nhận dữ liệu form multipart với một tệp âm thanh và một trường JSON settings.

Tham số

Tham số Kiểu Bắt buộc Mặc định Mô tả
startS number Không 0 Thời điểm bắt đầu tính bằng giây (tối thiểu 0)
durationS number Không 30 Thời lượng đoạn tính bằng giây (1 đến 30)

Yêu cầu ví dụ

curl -X POST http://localhost:1349/api/v1/tools/audio/ringtone-maker \
  -H "Authorization: Bearer si_your-api-key" \
  -F "file=@audio.mp3" \
  -F 'settings={"startS": 15, "durationS": 20}'

Phản hồi ví dụ

{
  "jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/audio.m4r",
  "originalSize": 4500000,
  "processedSize": 620000
}

Ghi chú

  • Đầu ra luôn là định dạng M4R, tương thích với nhạc chuông iPhone.
  • Thời lượng nhạc chuông tối đa là 30 giây (giới hạn của Apple).
  • Bất kỳ định dạng âm thanh nào cũng có thể dùng làm đầu vào.