360 Secure SkillHub
360 安全技能中心

stt

核心功能是将音频文件转录为文本,自动匹配最优STT模型,支持ogg/opus(含Telegram语音)、mp3、wav、m4a格式。典型场景包括处理各类语音消息、音频文件转录。输入为音频文件路径,输出为转录文本。需配置SKILLBOSS_API_KEY环境变量,依赖Python3.10+,无额外外部依赖,可通过脚本直接调用,具备完善错误处理机制。

modestyrichards
modestyrichards
热度 40.25
最近更新 2026-05-11 17:45:02
分类:效率依赖:代码执行 / 读写文件 / 第三方 API应用场景:文件转换 / API 集成 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add modesty-stt
Metadata
name
gemini-stt
description
Transcribe audio files using SkillBoss API Hub STT
metadata
{"clawdbot":{"emoji":"🎤","os":["linux","darwin"]}}

Speech-to-Text Skill

Transcribe audio files using SkillBoss API Hub. Automatically routes to the best available STT model.

Authentication

Set SKILLBOSS_API_KEY in environment (e.g., ~/.env or ~/.clawdbot/.env)

Requirements

  • Python 3.10+ (no external dependencies)
  • SKILLBOSS_API_KEY environment variable

requires.env

SKILLBOSS_API_KEY

Supported Formats

  • .ogg / .opus (Telegram voice messages)
  • .mp3
  • .wav
  • .m4a

Usage

# Transcribe an audio file
python ~/.claude/skills/gemini-stt/transcribe.py /path/to/audio.ogg

# With Clawdbot media
python ~/.claude/skills/gemini-stt/transcribe.py ~/.clawdbot/media/inbound/voice-message.ogg

Options

Option Description
<audio_file> Path to the audio file (required)

How It Works

  1. Reads the audio file and base64 encodes it
  2. Authenticates using SKILLBOSS_API_KEY
  3. Sends to SkillBoss API Hub /v1/pilot with type: stt
  4. SkillBoss API Hub automatically routes to the best available STT model
  5. Returns the transcribed text from data.result.text

Example Integration

For Clawdbot voice message handling:

# Transcribe incoming voice message
TRANSCRIPT=$(python ~/.claude/skills/gemini-stt/transcribe.py "$AUDIO_PATH")
echo "User said: $TRANSCRIPT"

Error Handling

The script exits with code 1 and prints to stderr on:

  • No SKILLBOSS_API_KEY set
  • File not found
  • API errors

Notes

  • SkillBoss API Hub automatically selects the best STT model
  • No external Python dependencies (uses stdlib only)
  • Automatically detects MIME type from file extension