← 返回 Skills 市场
vinhbui3004

Upload audio to AIOZ Stream

作者 vinhbui3004 · GitHub ↗ · v1.0.1
cross-platform ✓ 安全检测通过
1317
总下载
0
收藏
1
当前安装
2
版本数
在 OpenClaw 中安装
/install audio-upload-aioz-stream
功能描述
Quick upload audio to AIOZ Stream API. Create audio objects with default or custom encoding configurations, upload the file, complete the upload, then return the audio link to the user.
使用说明 (SKILL.md)

AIOZ Stream Audio Upload

Upload audio to AIOZ Stream API quickly with API key authentication. The full upload flow requires 3 API calls: Create → Upload Part → Complete.

When to use this skill

  • User wants to upload or create an audio on AIOZ Stream
  • User mentions "upload audio", "create audio", "aioz stream audio"
  • User wants to get an HLS streaming link for their audio

Authentication

This skill uses API key authentication. The user must provide:

  • stream-public-key: their AIOZ Stream public key
  • stream-secret-key: their AIOZ Stream secret key

Ask the user for these keys if not provided. They will be sent as HTTP headers on ALL API calls.

Usage Options

When the user wants to upload audio, ask them to choose:

Option 1: Default Upload (Quick)

Creates an audio object with minimal config — just a title. Then uploads the file.

Example user prompt:

"Upload audio file /path/to/audio.mp3 with title My Podcast"

Option 2: Custom Upload (Advanced)

Creates an audio object with full encoding configuration including quality presets, bitrate, sample rate, tags, metadata, etc. Then uploads the file.

Example user prompt:

"Upload audio with custom config: title My Podcast, highest quality HLS, 320kbps, 48000Hz, tags podcast,tech"

Full Upload Flow (3 Steps)

Step 1: Create Audio Object

Default:

curl -s -X POST 'https://api-w3stream.attoaioz.cyou/api/videos/create' \
  -H 'stream-public-key: PUBLIC_KEY' \
  -H 'stream-secret-key: SECRET_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "AUDIO_TITLE",
    "type": "audio"
  }'

Custom (with encoding config):

curl -s -X POST 'https://api-w3stream.attoaioz.cyou/api/videos/create' \
  -H 'stream-public-key: PUBLIC_KEY' \
  -H 'stream-secret-key: SECRET_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "AUDIO_TITLE",
    "type": "audio",
    "description": "DESCRIPTION",
    "is_public": true,
    "tags": ["tag1", "tag2"],
    "metadata": [
      {"key": "KEY", "value": "VALUE"}
    ],
    "qualities": [
      {
        "resolution": "highest",
        "type": "hls",
        "container_type": "mpegts",
        "audio_config": {
          "codec": "aac",
          "bitrate": 320000,
          "channels": "2",
          "sample_rate": 48000,
          "language": "en",
          "index": 0
        }
      },
      {
        "resolution": "standard",
        "type": "hls",
        "container_type": "mpegts",
        "audio_config": {
          "codec": "aac",
          "bitrate": 128000,
          "channels": "2",
          "sample_rate": 44100,
          "language": "en",
          "index": 0
        }
      }
    ]
  }'

Response: Extract data.id — this is the AUDIO_ID used in the next steps.

Step 2: Upload File Part

Upload the actual audio file binary to the created audio object.

First, get the file size and compute the MD5 hash:

# Get file size (cross-platform compatible)
FILE_SIZE=$(stat -f%z /path/to/audio.mp3 2>/dev/null || stat -c%s /path/to/audio.mp3)
END_POS=$((FILE_SIZE - 1))

# Compute MD5 hash
HASH=$(md5sum /path/to/audio.mp3 | awk '{print $1}')

Then upload via multipart form-data with the Content-Range header:

curl -s -X POST "https://api-w3stream.attoaioz.cyou/api/videos/AUDIO_ID/part" \
  -H 'stream-public-key: PUBLIC_KEY' \
  -H 'stream-secret-key: SECRET_KEY' \
  -H "Content-Range: bytes 0-$END_POS/$FILE_SIZE" \
  -F "file=@/path/to/audio.mp3" \
  -F "index=0" \
  -F "hash=$HASH"

Important: The Content-Range header is required for the upload to succeed. Format: bytes {start}-{end}/{total_size} where:

  • For single-part uploads: start=0, end=file_size-1, total_size=file_size
  • For multi-part uploads: adjust start/end positions for each chunk

Form-data fields:

  • file: the audio file binary (use @/path/to/file)
  • index: 0 (for single-part upload, increment for multi-part)
  • hash: MD5 hash of the file part

Step 3: Complete Upload

After the file part is uploaded, call the complete endpoint to finalize:

curl -s -X GET "https://api-w3stream.attoaioz.cyou/api/videos/AUDIO_ID/complete" \
  -H 'accept: application/json' \
  -H 'stream-public-key: PUBLIC_KEY' \
  -H 'stream-secret-key: SECRET_KEY'

This triggers transcoding. The upload is now considered successful.

After Upload — Get Audio Link

After completing the upload, fetch the audio detail to get the streaming URL:

curl -s 'https://api-w3stream.attoaioz.cyou/api/videos/AUDIO_ID' \
  -H 'stream-public-key: PUBLIC_KEY' \
  -H 'stream-secret-key: SECRET_KEY'

Parse the response to find the HLS URL from the assets or hls field and return it to the user.

Important: Audio outputs do NOT have an mp4_url field. Only HLS/DASH streaming links are available.

Custom Upload Config Reference

Quality Presets (resolution field):

  • standard — Standard quality
  • good — Good quality
  • highest — Highest quality
  • lossless — Lossless quality

Streaming Formats (type field):

  • hls — HTTP Live Streaming (container: mpegts or mp4)
  • dash — Dynamic Adaptive Streaming (container: fmp4)

Audio Config:

  • codec: aac (only supported codec)
  • bitrate: integer in bits/sec (e.g., 128000, 256000, 320000)
  • channels: "2" (stereo)
  • sample_rate: 8000, 11025, 16000, 22050, 32000, 44100, 48000, 88200, 96000
  • language: BCP 47 code (e.g., en, vi)
  • index: 0

Recommended bitrates:

  • Podcast/Voice: 64000 - 128000 bps
  • Music standard: 128000 - 192000 bps
  • Music high quality: 192000 - 256000 bps
  • Music highest: 256000 - 320000 bps

Recommended sample rates:

  • Voice: 22050 or 32000
  • Music: 44100 or 48000

Response Handling

  1. Parse the JSON response from the create call → extract data.id
  2. Compute MD5 hash of the audio file
  3. Upload the file part with the hash
  4. Call complete endpoint
  5. Fetch audio detail to get streaming URL
  6. Return the audio link to the user
  7. If the audio is still transcoding (status: transcoding), inform the user and suggest checking back later

Error Handling

  • 401: Invalid API keys — ask user to verify their public and secret keys
  • 400: Bad request — check the request body format
  • 500: Server error — suggest retrying

Example Interaction Flow

  1. User: "Upload my audio to AIOZ Stream"
  2. Ask for API keys (public + secret) if not known
  3. Ask for the audio file path
  4. Ask: "Default upload (quick) or custom config?"
    • If default: ask for title only
    • If custom: ask for title, quality preset, bitrate, sample rate, tags, etc.
  5. Step 1: Create audio object → get AUDIO_ID
  6. Step 2: Compute file hash, upload file part
  7. Step 3: Call complete endpoint
  8. Fetch audio detail → return streaming URL to user
安全使用建议
This skill appears to do exactly what it says: create an audio object and upload a local file to the specified API. Before using it: (1) confirm you trust the API endpoint (the host uses a nonstandard .cyou TLD—verify it with your provider if unsure); (2) only provide your stream-public-key and stream-secret-key when you trust the recipient, and avoid pasting long-lived secrets into untrusted interfaces; (3) the scripts will read the local file path you provide and call curl/jq/md5sum — ensure those binaries exist and you are uploading the intended file; (4) if you need stronger safety, run the included shell scripts locally yourself so you can inspect network requests and avoid sending credentials through an automated agent.
功能分析
Type: OpenClaw Skill Name: audio-upload-aioz-stream Version: 1.0.1 The skill is designed to upload audio files to the AIOZ Stream API. It explicitly declares the use of `curl`, `jq`, and `md5sum` binaries, which are used in the provided shell scripts (`scripts/create_audio_custom.sh`, `scripts/create_audio_default.sh`, `scripts/get_audio_detail.sh`, `scripts/upload_audio_file.sh`) for network communication, JSON parsing, and file hashing/size calculation, respectively. File system access is limited to reading the user-specified audio file for upload. API keys are user-provided and sent only to the `api-w3stream.attoaioz.cyou` endpoint. There is no evidence of data exfiltration, malicious execution, persistence mechanisms, obfuscation, or prompt injection attempts against the agent to perform actions outside the stated purpose.
能力评估
Purpose & Capability
Name/description, SKILL.md, reference docs, and included scripts consistently implement an audio upload flow (create → upload part → complete) to the W3Stream/AIOZ API. Required binaries (curl, jq, md5sum) are appropriate for the described operations.
Instruction Scope
Runtime instructions and scripts stick to the upload flow and only access: the provided API keys (as headers), the local audio file path, and the network endpoints for the API. They do not reference unrelated files, system paths, or additional credentials.
Install Mechanism
No install spec is provided (instruction + scripts only). This is lower-risk: the skill doesn't download or install external code during installation. All bundled scripts are plain shell wrappers around curl/jq/md5sum.
Credentials
The skill requires API keys to operate (stream-public-key, stream-secret-key), but these are requested interactively in the instructions rather than declared as required environment variables. That is reasonable for a user-driven upload tool, but you should ensure you only supply valid keys and avoid storing long-lived secrets here if you don't trust the endpoint.
Persistence & Privilege
always:false (default) and scripts do not attempt to modify other skills or system-wide settings. The skill does not request permanent presence or elevated privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install audio-upload-aioz-stream
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /audio-upload-aioz-stream 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Renamed skill from "w3stream-audio-upload" to "aioz-stream-audio-upload" throughout documentation. - Updated references and user prompts from "W3Stream" to "AIOZ Stream" for clarity and consistency. - Added two new metadata files: .clawhub/origin.json and _meta.json.
v1.0.0
Initial release of w3stream-audio-upload skill: - Allows quick and custom audio uploads to W3Stream via API key authentication. - Supports full upload flow: Create audio object → Upload file → Complete upload. - Offers both default (quick title-only) and advanced (custom encoding config) upload modes. - Guides user to provide required API keys and file info, then returns HLS streaming link after upload. - Handles errors for authentication, bad requests, and server issues with clear user prompts.
元数据
Slug audio-upload-aioz-stream
版本 1.0.1
许可证
累计安装 1
当前安装数 1
历史版本数 2
常见问题

Upload audio to AIOZ Stream 是什么?

Quick upload audio to AIOZ Stream API. Create audio objects with default or custom encoding configurations, upload the file, complete the upload, then return the audio link to the user. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1317 次。

如何安装 Upload audio to AIOZ Stream?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install audio-upload-aioz-stream」即可一键安装,无需额外配置。

Upload audio to AIOZ Stream 是免费的吗?

是的,Upload audio to AIOZ Stream 完全免费(开源免费),可自由下载、安装和使用。

Upload audio to AIOZ Stream 支持哪些平台?

Upload audio to AIOZ Stream 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Upload audio to AIOZ Stream?

由 vinhbui3004(@vinhbui3004)开发并维护,当前版本 v1.0.1。

💬 留言讨论