elevenlabs
AI-powered audio generation using ElevenLabs API - text-to-speech with lifelike voices, sound effects generation, and music creation from text descriptions. Generate natural-sounding speech in 32 languages, create custom sound effects for games and videos, and compose royalty-free music tracks. Use this skill when the user requests: - Voice generation or text-to-speech conversion - Audio narration for content (videos, audiobooks, podcasts) - Sound effects for games, videos, or applications - Music generation from text descriptions - Multi-speaker dialogue or conversation audio - Voice cloning or custom voice creation - Audio streaming for real-time applications Capabilities: Text-to-speech (32 languages, 100+ voices), sound effects generation, music composition, voice cloning, real-time audio streaming Python SDK: elevenlabs (pip install elevenlabs)
jkitchin · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add jkitchin/knowhow --skill elevenlabs技能说明
name: elevenlabs description: | AI-powered audio generation using ElevenLabs API - text-to-speech with lifelike voices, sound effects generation, and music creation from text descriptions. Generate natural-sounding speech in 32 languages, create custom sound effects for games and videos, and compose royalty-free music tracks.
Use this skill when the user requests:
- Voice generation or text-to-speech conversion
- Audio narration for content (videos, audiobooks, podcasts)
- Sound effects for games, videos, or applications
- Music generation from text descriptions
- Multi-speaker dialogue or conversation audio
- Voice cloning or custom voice creation
- Audio streaming for real-time applications
Capabilities: Text-to-speech (32 languages, 100+ voices), sound effects generation, music composition, voice cloning, real-time audio streaming
Python SDK: elevenlabs (pip install elevenlabs) allowed-tools: ["Bash", "Read", "Write", "AskUserQuestion"]
ElevenLabs Audio Generation
Purpose
This skill enables AI-powered audio generation through ElevenLabs API. Create lifelike text-to-speech in 32 languages, generate custom sound effects for games and videos, and compose royalty-free music from text descriptions. Support for 100+ professional voices, custom voice cloning, real-time streaming, and multi-speaker dialogue.
When to Use
This skill should be invoked when the user asks to:
- Generate speech from text ("convert this to speech", "create audio narration...")
- Create voiceovers for videos, presentations, or content
- Generate audio in specific voices or languages
- Create sound effects ("generate footstep sounds", "create explosion audio...")
- Compose music from descriptions ("generate upbeat background music...")
- Build multi-speaker dialogue or conversations
- Clone voices from audio samples
- Stream audio in real-time applications
- Create audiobooks, podcasts, or audio content
Available Capabilities
1. Text-to-Speech (Voice Generation)
Models:
- Eleven Multilingual v2 (
eleven_multilingual_v2) - Highest quality, 29 languages - Eleven Flash v2.5 (
eleven_flash_v2_5) - Ultra-low 75ms latency, 32 languages, 50% cheaper - Eleven Turbo v2.5 (
eleven_turbo_v2_5) - Balanced quality and latency
Features:
- 100+ premade professional voices
- Custom voice cloning from audio samples
- Multi-speaker dialogue generation
- Real-time audio streaming
- 32 language support
- Emotional and natural intonation
- Voice settings customization (stability, similarity, style)
Output Formats:
- MP3 (various bitrates: 32kbps to 192kbps)
- PCM (8kHz to 48kHz)
- Opus, µ-law, A-law
2. Sound Effects Generation
Model:
- Eleven Text-to-Sound v2 (
eleven_text_to_sound_v2)
Features:
- Generate sound effects from text descriptions
- Customizable duration
- Looping support for seamless audio
- Prompt influence control
- High-quality audio for games, videos, UI/UX
Use Cases:
- Game audio (footsteps, explosions, ambient)
- Video production sounds
- UI/UX sound design
- Nature sounds (rain, wind, waves)
- Mechanical sounds (doors, engines, machines)
- Fantasy/sci-fi effects
3. Music Generation
Features:
- Text-to-music composition
- Vocal and instrumental tracks
- Multiple genres and styles
- Customizable track duration
- Composition plans (structured music blueprints)
- Royalty-free generated music
Parameters:
- Text prompts describing desired music
- Duration control (milliseconds)
- Genre, style, mood specifications
- Section-level composition control
Requirements:
- Paid ElevenLabs account (music API not available on free tier)
Content Policy:
- No copyrighted material (artist names, band names, trademarks)
- Returns suggestions for restricted prompts
Instructions
Step 1: Understand the Request
Analyze the user's request to determine:
- Task Type: Text-to-speech, sound effects, or music generation
- Content: What text/description to convert
- Voice/Sound: Specific voice, language, or sound characteristics
- Format: Output format requirements (MP3, streaming, etc.)
- Duration: Length requirements (for sound effects or music)
- Use Case: Narration, video, game, podcast, etc.
Step 2: Select Appropriate Model/Capability
For Text-to-Speech:
- High quality needed →
eleven_multilingual_v2 - Low latency/real-time →
eleven_flash_v2_5 - Balanced →
eleven_turbo_v2_5
For Sound Effects:
- Use
eleven_text_to_sound_v2model - Consider duration and looping needs
For Music:
- Ensure user has paid account
- Determine track length and style
Step 3: Set Up API Authentication
import os
from elevenlabs.client import ElevenLabs
# Initialize client with API key
client = ElevenLabs(api_key=os.environ.get("ELEVENLABS_API_KEY"))
API key should be set as environment variable:
export ELEVENLABS_API_KEY="your-api-key-here"
Step 4: Implement Based on Task Type
Text-to-Speech Implementation
Basic Speech Generation:
from elevenlabs.client import ElevenLabs
from pathlib import Path
client = ElevenLabs(api_key=os.environ["ELEVENLABS_API_KEY"])
# Generate speech
audio = client.text_to_speech.convert(
text="Your text content here",
voice_id="JBFqnCBsd6RMkjVDRZzb", # Default voice (George)
model_id="eleven_multilingual_v2",
output_format="mp3_44100_128"
)
# Save to file
output_path = Path("speech_output.mp3")
with output_path.open("wb") as f:
for chunk in audio:
f.write(chunk)
print(f"Audio saved to: {output_path}")
Streaming Speech (Real-time):
from elevenlabs.client import ElevenLabs
from elevenlabs import stream
client = ElevenLabs(api_key=os.environ["ELEVENLABS_API_KEY"])
# Stream audio in real-time
audio_stream = client.text_to_speech.convert_as_stream(
text="This will be streamed as it generates",
voice_id="JBFqnCBsd6RMkjVDRZ
阅读完整来源 ↗