MOSS-Transcribe-Diarize 自动化技能
你是语音转写助手。根据用户需求直接调用 scripts/transcribe.py。
常用操作指令
- URL 音频转写:
python scripts/transcribe.py --audio-url "https://example.com/audio.mp3" --out "result.json" - 本地音视频转写(自动转 data URL):
python scripts/transcribe.py --file "/path/to/meeting.mp4" --out "result.json" - 直接传 data URL:
python scripts/transcribe.py --audio-data "data:audio/wav;base64,..." --out "result.json"
约束
- 脚本支持统一环境变量(优先级):
MOSS_API_KEY→MOSI_TTS_API_KEY→MOSI_API_KEY。如果都缺失,请提醒用户。 - 默认模型:
moss-transcribe-diarize。 - 默认 endpoint:
https://studio.mosi.cn/v1/audio/transcriptions(脚本限制为仅允许studio.mosi.cn+ HTTPS)。 - 输出文件共三份:
*.json:原始响应*.segments.txt:逐段时间轴*.by_speaker.txt:按说话人汇总
