{"skill":{"slug":"miranda-elevenlabs-speech","displayName":"Miranda ElevenLabs Speech (TTS/STT)","summary":"Text-to-Speech and Speech-to-Text using ElevenLabs AI. Use when the user wants to convert text to speech, transcribe voice messages, or work with voice in mu...","description":"---\nname: elevenlabs-speech\ndescription: Text-to-Speech and Speech-to-Text using ElevenLabs AI. Use when the user wants to convert text to speech, transcribe voice messages, or work with voice in multiple languages. Supports high-quality AI voices and accurate transcription.\n---\n\n# ElevenLabs Speech\n\nComplete voice solution — both TTS and STT using one API:\n- **TTS**: Text-to-Speech (high-quality voices)\n- **STT**: Speech-to-Text via Scribe (accurate transcription)\n\n## Quick Start\n\n### Environment Setup\n\nSet your API key:\n```bash\nexport ELEVENLABS_API_KEY=\"sk_...\"\n```\n\nOr create `.env` file in workspace root.\n\n### Text-to-Speech (TTS)\n\nConvert text to natural-sounding speech:\n\n```bash\npython scripts/elevenlabs_speech.py tts -t \"Hello world\" -o greeting.mp3\n```\n\nWith custom voice:\n```bash\npython scripts/elevenlabs_speech.py tts -t \"Hello\" -v \"voice_id_here\" -o output.mp3\n```\n\n### List Available Voices\n\n```bash\npython scripts/elevenlabs_speech.py voices\n```\n\n## Using in Code\n\n```python\nfrom scripts.elevenlabs_speech import ElevenLabsClient\n\nclient = ElevenLabsClient(api_key=\"sk_...\")\n\n# Basic TTS\nresult = client.text_to_speech(\n    text=\"Hello from zerox\",\n    output_path=\"greeting.mp3\"\n)\n\n# With custom settings\nresult = client.text_to_speech(\n    text=\"Your text here\",\n    voice_id=\"21m00Tcm4TlvDq8ikWAM\",  # Rachel\n    stability=0.5,\n    similarity_boost=0.75,\n    output_path=\"output.mp3\"\n)\n\n# Get available voices\nvoices = client.get_voices()\nfor voice in voices['voices']:\n    print(f\"{voice['name']}: {voice['voice_id']}\")\n```\n\n## Popular Voices\n\n| Voice ID | Name | Description |\n|----------|------|-------------|\n| `21m00Tcm4TlvDq8ikWAM` | Rachel | Natural, versatile (default) |\n| `AZnzlk1XvdvUeBnXmlld` | Domi | Strong, energetic |\n| `EXAVITQu4vr4xnSDxMaL` | Bella | Soft, soothing |\n| `ErXwobaYiN019PkySvjV` | Antoni | Well-rounded |\n| `MF3mGyEYCl7XYWbV9V6O` | Elli | Warm, friendly |\n| `TxGEqnHWrfWFTfGW9XjX` | Josh | Deep, calm |\n| `VR6AewLTigWG4xSOukaG` | Arnold | Authoritative |\n\n## Voice Settings\n\n- **stability** (0-1): Lower = more emotional, Higher = more stable\n- **similarity_boost** (0-1): Higher = closer to original voice\n\nDefault: stability=0.5, similarity_boost=0.75\n\n## Models\n\n- `eleven_turbo_v2_5` - Fast, high quality (default)\n- `eleven_multilingual_v2` - Best for non-English\n- `eleven_monolingual_v1` - English only\n\n## Integration with Telegram\n\nWhen user sends text and wants voice reply:\n\n```python\n# Generate speech\nresult = client.text_to_speech(text=user_text, output_path=\"reply.mp3\")\n\n# Send via Telegram message tool with media path\nmessage(action=\"send\", media=\"path/to/reply.mp3\", as_voice=True)\n```\n\n## Pricing\n\nCheck https://elevenlabs.io/pricing for current rates. Free tier available!\n\n## Speech-to-Text (STT) with ElevenLabs Scribe\n\nTranscribe voice messages using ElevenLabs Scribe:\n\n### Transcribe Audio\n\n```bash\npython scripts/elevenlabs_scribe.py voice_message.ogg\n```\n\nWith specific language:\n```bash\npython scripts/elevenlabs_scribe.py voice_message.ogg --language ara\n```\n\nWith speaker diarization (multiple speakers):\n```bash\npython scripts/elevenlabs_scribe.py voice_message.ogg --speakers 2\n```\n\n### Using in Code\n\n```python\nfrom scripts.elevenlabs_scribe import ElevenLabsScribe\n\nclient = ElevenLabsScribe(api_key=\"sk-...\")\n\n# Basic transcription\nresult = client.transcribe(\"voice_message.ogg\")\nprint(result['text'])\n\n# With language hint (improves accuracy)\nresult = client.transcribe(\"voice_message.ogg\", language_code=\"ara\")\n\n# With speaker detection\nresult = client.transcribe(\"voice_message.ogg\", num_speakers=2)\n```\n\n### Supported Formats\n\n- mp3, mp4, mpeg, mpga, m4a, wav, webm\n- Max file size: 100 MB\n- Works great with Telegram voice messages (`.ogg`)\n\n### Language Support\n\nScribe supports 99 languages including:\n- Arabic (`ara`)\n- English (`eng`)\n- Spanish (`spa`)\n- French (`fra`)\n- And many more...\n\nWithout language hint, it auto-detects.\n\n## Complete Workflow Example\n\n**User sends voice message → You reply with voice:**\n\n```python\nfrom scripts.elevenlabs_scribe import ElevenLabsScribe\nfrom scripts.elevenlabs_speech import ElevenLabsClient\n\n# 1. Transcribe user's voice message\nstt = ElevenLabsScribe()\ntranscription = stt.transcribe(\"user_voice.ogg\")\nuser_text = transcription['text']\n\n# 2. Process/understand the text\n# ... your logic here ...\n\n# 3. Generate response text\nresponse_text = \"Your response here\"\n\n# 4. Convert to speech\ntts = ElevenLabsClient()\ntts.text_to_speech(response_text, output_path=\"reply.mp3\")\n\n# 5. Send voice reply\nmessage(action=\"send\", media=\"reply.mp3\", as_voice=True)\n```\n\n## Pricing\n\nCheck https://elevenlabs.io/pricing for current rates:\n\n**TTS (Text-to-Speech):**\n- Free tier: 10,000 characters/month\n- Paid plans available\n\n**STT (Speech-to-Text) - Scribe:**\n- Free tier available\n- Check website for current pricing\n","topics":["Speech-to-Text","Text-to-Speech","Transcription","Transcribe"],"tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":337,"installsAllTime":13,"installsCurrent":0,"stars":0,"versions":1},"createdAt":1771686973511,"updatedAt":1778992110388},"latestVersion":{"version":"1.0.0","createdAt":1771686973511,"changelog":"Northern-British banshee voice ops: TTS/STT multi-lang. Audited: env-key only, no leaks.","license":null},"metadata":null,"owner":{"handle":"jeffpignataro","userId":"s173pqbgzttm4d88p48j8mveh1884mfv","displayName":"jeffpignataro","image":"https://avatars.githubusercontent.com/u/1724466?v=4"},"moderation":null}