用途
Speech-to-Text 是一个语音转文字技能,通过 inference.sh CLI(belt)调用语音识别模型,将音频内容转写为文本。它面向需要批量或自动化处理音频转写的用户,可在命令行中直接运行。
主要能力
该技能提供多个可选模型:
- ElevenLabs Scribe v2(App ID:elevenlabs/stt):准确率 98%+,支持说话人分离(diarization),支持 90+ 语言。
- Fast Whisper V3(App ID:infsh/fast-whisper-large-v3):适合快速转写。
- Whisper V3 Large(App ID:infsh/whisper-v3-large):最高准确率。
Whisper 支持 99+ 语言,包括英语、西班牙语、法语、德语、意大利语、葡萄牙语、中文、日语、韩语、阿拉伯语、印地语、俄语等。
输出为 JSON,包含:text(完整转写文本)、segments(如请求则返回带时间戳的分段)、language(检测到的语言)。
使用方式
首先安装 belt CLI 技能:
npx skills add belt-sh/cli
需要 inference.sh CLI(belt),安装说明见官方文档。登录:
belt login
基础转写示例:
belt app run infsh/fast-whisper-large-v3 --input '{"audio_url": "https://audio.mp3"}'
带时间戳的转写:
belt app sample infsh/fast-whisper-large-v3 --save input.json
# {
# "audio_url": "https://podcast.mp3",
# "timestamps": true
# }
belt app run infsh/fast-whisper-large-v3 --input input.json
翻译为英文:
belt app run infsh/whisper-v3-large --input '{
"audio_url": "https://french-audio.mp3",
"task": "translate"
}'
从视频转写(先提取音频):
# Extract audio from video first
belt app run infsh/video-audio-extractor --input '{"video_url": "https://video.mp4"}' > audio.json
# Transcribe the extracted audio
belt app run infsh/fast-whisper-large-v3 --input '{"audio_url": "<audio-url>"}'
视频字幕工作流:
# 1. Transcribe video audio
belt app run infsh/fast-whisper-large-v3 --input '{
"audio_url": "https://video.mp4",
"timestamps": true
}' > transcript.json
# 2. Use transcript for captions
belt app run infsh/caption-videos --input '{
"video_url": "https://video.mp4",
"captions": "<transcript-from-step-1>"
}'
适用场景
- 会议:转写录音。
- 播客:生成文字稿。
- 字幕:为视频创建字幕。
- 语音笔记:转换为可搜索文本。
- 访谈:用于研究的转写。
- 无障碍:让音频内容更易获取。
相关技能
# ElevenLabs STT (98%+ accuracy, diarization)
npx skills add inference-sh/skills@elevenlabs-stt
# ElevenLabs TTS (reverse direction)
npx skills add inference-sh/skills@elevenlabs-tts
# Full platform skill (all apps)
npx skills add inference-sh/skills@infsh-cli
# Text-to-speech (reverse direction)
npx skills add inference-sh/skills@text-to-speech
# Video generation (add captions)
npx skills add inference-sh/skills@ai-video-generation
# AI avatars (lipsync with transcripts)
npx skills add inference-sh/skills@ai-avatar-video
浏览所有音频应用:
belt app list --category audio
限制
资料未提供收费、价格、平台限制、并发或时长上限等信息,暂未提供。使用前需安装并登录 inference.sh CLI(belt)。