mcpField
S
speech-to-text

speech-to-text

github.com/inference-sh生产力7901.1k 次安装2 周前更新
代码仓库

关于 speech-to-text

通过 inference.sh 应用转录音频的 belt CLI 技能,提供多种 Whisper 和 ElevenLabs 模型,并支持时间戳片段与英语翻译,适用于会议、播客等内容。

主要功能

  1. 01使用多种模型转录
  2. 02生成带时间戳的片段
  3. 03将音频翻译成英语
  4. 04以 JSON 输出检测到的语言

适用场景

  1. 01转录会议录音
  2. 02制作播客文本
  3. 03生成视频字幕
  4. 04将语音笔记转为文本

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/inference-sh/skills --skill speech-to-text

安装后在 Claude Code 中输入/speech-to-text确认已加载。

详细介绍

安装 belt CLI 技能: npx skills add belt-sh/cli

语音转文本

通过 inference.sh CLI 将音频转录为文本。

语音转文本

快速开始

需要 inference.sh CLI(belt)。安装说明

belt login

belt app run infsh/fast-whisper-large-v3 --input '{"audio": "https://audio.mp3"}'

可用模型

模型应用 ID适用场景
ElevenLabs Scribe v2elevenlabs/stt准确率 98% 以上、说话人分离、支持 90 多种语言
Fast Whisper V3infsh/fast-whisper-large-v3快速转录
Whisper V3 Largeinfsh/whisper-v3-large最高准确率

示例

基础转录
belt app run infsh/fast-whisper-large-v3 --input '{"audio": "https://meeting.mp3"}'
带时间戳
belt app sample infsh/fast-whisper-large-v3 --save input.json

# {
#   "audio": "https://podcast.mp3",
#   "return_timestamps": "sentence"
# }

belt app run infsh/fast-whisper-large-v3 --input input.json
翻译(为英语)
belt app run infsh/whisper-v3-large --input '{
  "audio": "https://french-audio.mp3",
  "task": "translate"
}'
从视频转录
# Extract audio from video first
belt app run infsh/video-audio-extractor --input '{"video_file": "https://video.mp4"}' > audio.json

# Transcribe the extracted audio
belt app run infsh/fast-whisper-large-v3 --input '{"audio": "<audio-url>"}'

工作流:视频字幕

# 1. Transcribe video audio
belt app run infsh/fast-whisper-large-v3 --input '{
  "audio": "https://video.mp4",
  "return_timestamps": "sentence"
}' > transcript.json

# 2. Pass the transcript segments as captions
belt app run infsh/caption-videos --input '{
  "video_file": "https://video.mp4",
  "segments": [{"start": 0.0, "end": 2.5, "text": "<segments-from-step-1>"}]
}'

支持的语言

Whisper 支持 99 种以上的语言,包括: 英语、西班牙语、法语、德语、意大利语、葡萄牙语、中文、日语、韩语、阿拉伯语、印地语、俄语等。

使用场景

  • 会议:转录录音
  • 播客:生成转录文本
  • 字幕:为视频创建字幕
  • 语音备忘录:转换为可搜索文本
  • 访谈:用于研究的转录
  • 无障碍:让音频内容更易于访问

输出格式

返回包含以下内容的 JSON:

  • text:完整转录文本
  • segments:带时间戳的片段(如有请求)
  • language:检测到的语言

相关技能

# 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

文档

评论

支持 Markdown