用途
elevenlabs-stt 是一个技能,用于通过 inference.sh CLI(命令名为 belt)调用 ElevenLabs 的语音转文字(STT)与强制对齐能力。资料将其定位为基于 Scribe 模型的高精度转写工具。
安装与登录
安装技能:
npx skills add belt-sh/cli
需要先安装 inference.sh CLI(belt),相关资料仅指向安装说明,未给出更多步骤。登录命令为:
belt login
主要能力
模型
- Scribe v2(
scribe_v2):最新、精度最高,为默认模型。 - Scribe v1(
scribe_v1):稳定、经过验证的模型。
资料称转写准确率为 98%+,支持 90 多种语言并自动检测。
基础转写
belt app run elevenlabs/stt --input '{"audio": "https://meeting-recording.mp3"}'
说话人分离
belt app run elevenlabs/stt --input '{
"audio": "https://meeting.mp3",
"diarize": true
}'
音频事件标记
可检测笑声、掌声、音乐及其他非语音事件:
belt app run elevenlabs/stt --input '{
"audio": "https://podcast.mp3",
"tag_audio_events": true
}'
指定语言
belt app run elevenlabs/stt --input '{
"audio": "https://spanish-audio.mp3",
"language_code": "spa"
}'
语言代码留空时自动检测。
组合全部选项
belt app run elevenlabs/stt --input '{
"audio": "https://conference.mp3",
"model": "scribe_v2",
"diarize": true,
"tag_audio_events": true,
"language_code": "eng"
}'
强制对齐
将已知文本与音频对齐,以获得精确的词级和字符级时间戳,适用于字幕、口型同步和卡拉 OK:
belt app run elevenlabs/forced-alignment --input '{
"audio": "https://narration.mp3",
"text": "This is the exact text spoken in the audio file."
}'
输出示例:
{
"words": [
{"text": "This", "start": 0.0, "end": 0.3},
{"text": "is", "start": 0.35, "end": 0.5},
{"text": "the", "start": 0.55, "end": 0.65}
],
"text": "This is the exact text spoken in the audio file."
}
强制对齐的适用场景包括:为视频字幕提供精确时间;让音频与动画角色的口型同步;为歌词提供逐词时间;提供同步的无障碍文本。
示例工作流:视频字幕
# 1. 转写视频音频
belt app run elevenlabs/stt --input '{
"audio": "https://video.mp4",
"diarize": true
}' > transcript.json
# 2. 使用转写结果生成字幕
belt app run infsh/caption-videos --input '{
"video_url": "https://video.mp4",
"captions": "<transcript-from-step-1>"
}'
支持语言
资料列出 90 多种语言,包括英语、西班牙语、法语、德语、意大利语、葡萄牙语、中文、日语、韩语、阿拉伯语、印地语、俄语、土耳其语、荷兰语、瑞典语等。
适用场景
- 会议:转写录音并识别说话人。
- 播客:生成带音频事件标签的转写文本。
- 字幕:为视频创建带时间轴的字幕。
- 研究:对访谈录音进行转写并分离说话人。
- 无障碍:让音频内容可搜索、可访问。
- 口型同步:通过强制对齐为动画提供时间依据。
相关技能
# ElevenLabs TTS(反方向)
npx skills add inference-sh/skills@elevenlabs-tts
# ElevenLabs dubbing(翻译音频)
npx skills add inference-sh/skills@elevenlabs-dubbing
# 其他 STT 模型(Whisper)
npx skills add inference-sh/skills@speech-to-text
# 全平台技能(所有应用)
npx skills add inference-sh/skills@infsh-cli
浏览全部音频应用:
belt app list --category audio
限制
资料未提供收费、价格、音频格式与大小限制、并发或速率限制等信息,需另行确认。