Step Asr

v1.0.0

Transcribe audio files to text via Step ASR streaming API (HTTP SSE). Supports Chinese and English, multiple audio formats (PCM, WAV, MP3, OGG/OPUS), real-ti...

1· 349· 1 versions· 1 current· 1 all-time· Updated 11h ago· MIT-0
byLi Xie@randzero

Install

openclaw skills install step-asr

Step ASR - Streaming Speech-to-Text

Transcribe audio files using the Step (StepFun) ASR API with HTTP SSE streaming.

Quick start

python3 {baseDir}/scripts/transcribe.py /path/to/audio.wav

Usage examples

Basic transcription (Chinese, streaming output):

python3 {baseDir}/scripts/transcribe.py /path/to/audio.wav

Specify language and save to file:

python3 {baseDir}/scripts/transcribe.py /path/to/audio.mp3 --language en --out /tmp/transcript.txt

Use a prompt for terminology correction:

python3 {baseDir}/scripts/transcribe.py /path/to/audio.pcm --prompt "Related terms: OpenClaw, StepFun, ASR"

Output as JSON (includes usage stats):

python3 {baseDir}/scripts/transcribe.py /path/to/audio.ogg --json

Non-streaming mode (only print final result):

python3 {baseDir}/scripts/transcribe.py /path/to/audio.wav --no-stream

Specify audio format explicitly (for raw PCM files without extension):

python3 {baseDir}/scripts/transcribe.py /path/to/raw_audio --format-type pcm --sample-rate 16000

Supported audio formats

FormatExtensionsNotes
PCM.pcm, .rawRaw PCM, default codec pcm_s16le
WAV.wavWAV container format
MP3.mp3
OGG/OPUS.ogg, .opus

All options

FlagDefaultDescription
--languagezhLanguage code (zh or en)
--modelstep-asrASR model name
--out(stdout)Save transcription to file
--prompt(none)Hint text to improve accuracy for domain-specific terms
--format-type(auto)Audio format: pcm, mp3, ogg (auto-detected from extension)
--sample-rate16000Audio sample rate in Hz
--no-streamfalseOnly print the final complete result
--jsonfalseOutput as JSON with usage statistics
--no-itnfalseDisable inverse text normalization
--no-rerunfalseDisable second-pass error correction

API key

Set STEPFUN_API_KEY environment variable, or configure it in ~/.openclaw/openclaw.json:

{
  skills: {
    "step-asr": {
      apiKey: "YOUR_STEPFUN_API_KEY"
    }
  }
}

Get your API key from Step Platform.

Version tags

latestvk97e9knhcrnn6dtbr5z4w3tdms823c8e

Runtime requirements

🎙 Clawdis
Binspython3
EnvSTEPFUN_API_KEY
Primary envSTEPFUN_API_KEY