SuperAPI AI 工具集

elevenlabs

通用与其它

查看项目

更新于 10-15 21:06

技能介绍

用途:将文本或文档转换为高质量音频,支持单人旁白与双人对话播客两种模式。当用户提到创建播客、朗读文档、文本转语音(TTS)、生成音频版本等需求时启用。

主要能力:从文本或文档生成语音;列出可用语音;按句子边界自动分块(约4000字符)并保持音色连续,再用 ffmpeg 拼接;播客模式依据 JSON 脚本生成双人对话音频。

使用方式:在 skills/elevenlabs/config.json 配置 api_key(必填)、default_voice、default_model、podcast_voice1、podcast_voice2,或设置 ELEVENLABS_API_KEY 环境变量。处理 PDF/DOCX 需安装依赖:pip install PyPDF2 python-docx;多块旁白与播客需 ffmpeg。常用命令: python skills/elevenlabs/scripts/elevenlabs.py voices python skills/elevenlabs/scripts/elevenlabs.py tts --text "Hello world" --output ~/Downloads/hello.mp3 python skills/elevenlabs/scripts/elevenlabs.py tts --file /path/to/doc.pdf --output ~/Downloads/narration.mp3 python skills/elevenlabs/scripts/elevenlabs.py podcast --script /tmp/script.json --voice1 ID1 --voice2 ID2 --output ~/Downloads/podcast.mp3 播客脚本为 JSON 数组,每项含 speaker(host1/host2)与 text,每轮建议不超过3000字符。

适用场景:文档朗读、播客制作、音频版本生成等。

限制:需自备 ElevenLabs API 密钥;PDF/DOCX 需额外依赖;多块与播客需 ffmpeg;大文档会消耗账户字符额度,应提前提醒用户。具体收费与价格资料未提供。