Skip to content

Commit fb5749c

Browse files
Adriaan-ANTclaude
andcommitted
Enhance ElevenLabs README with comprehensive usage guide
Added a detailed "How to Use This Cookbook" section that guides users through: - Step 1: Environment setup with API keys and dependencies - Step 2: Working through the notebook to learn concepts - Step 3: Running the production script for hands-on experience Also expanded the "More About ElevenLabs" section with additional resources including Voice Library, API Playground, and SDK links. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 9dd3f63 commit fb5749c

File tree

2 files changed

+93
-79
lines changed

2 files changed

+93
-79
lines changed

third_party/ElevenLabs/README.md

Lines changed: 67 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,75 @@
22

33
[ElevenLabs](https://elevenlabs.io/) provides AI-powered speech-to-text and text-to-speech APIs for creating natural-sounding voice applications with advanced features like voice cloning and streaming synthesis.
44

5-
* The [Low Latency Voice Assistant Notebook](./low_latency_stt_claude_tts.ipynb) demonstrates building a real-time voice assistant using ElevenLabs for speech processing and Claude for intelligent responses, with progressive optimizations to reduce latency through streaming.
5+
This cookbook demonstrates how to build a low-latency voice assistant by combining ElevenLabs' speech processing with Claude's intelligent responses, progressively optimizing for real-time performance.
66

7-
* The companion [WebSocket Streaming Script](./stream_voice_assistant_websocket.py) provides a production-ready implementation of a conversational voice assistant with continuous microphone input, gapless audio playback, and low latency.
7+
## What's Included
88

9-
# More about ElevenLabs
9+
* **[Low Latency Voice Assistant Notebook](./low_latency_stt_claude_tts.ipynb)** - An interactive tutorial that walks you through building a voice assistant step-by-step, demonstrating various optimization techniques to minimize latency through streaming.
1010

11-
Learn more at [elevenlabs.io](https://elevenlabs.io) and view the [API Documentation](https://elevenlabs.io/docs/overview).
11+
* **[WebSocket Streaming Script](./stream_voice_assistant_websocket.py)** - A production-ready conversational voice assistant featuring continuous microphone input, gapless audio playback, and the lowest possible latency using WebSocket streaming.
1212

13-
# Get Started
13+
## How to Use This Cookbook
1414

15-
If you're ready to get started using ElevenLabs, head over to the [ElevenLabs Platform](https://elevenlabs.io/sign-up) to create a free account and get your API key with free monthly credits.
15+
We recommend following this sequence to get the most out of this cookbook:
16+
17+
### Step 1: Set Up Your Environment
18+
19+
1. **Get your API keys:**
20+
- ElevenLabs API key: [elevenlabs.io/app/developers/api-keys](https://elevenlabs.io/app/developers/api-keys)
21+
- Anthropic API key: [console.anthropic.com/settings/keys](https://console.anthropic.com/settings/keys)
22+
23+
2. **Configure your environment:**
24+
```bash
25+
cp .env.example .env
26+
# Edit .env and add your API keys
27+
```
28+
29+
3. **Install dependencies:**
30+
```bash
31+
pip install -r requirements.txt
32+
```
33+
34+
### Step 2: Work Through the Notebook
35+
36+
Start with the **[Low Latency Voice Assistant Notebook](./low_latency_stt_claude_tts.ipynb)**. This interactive guide will teach you:
37+
38+
- How to use ElevenLabs for speech-to-text transcription
39+
- How to generate Claude responses and measure latency
40+
- How streaming reduces time-to-first-token
41+
- How to stream text-to-speech for faster audio playback
42+
- The tradeoffs between different streaming approaches
43+
- Why WebSocket streaming provides the best balance of latency and quality
44+
45+
The notebook includes performance metrics and comparisons at each step, helping you understand the impact of each optimization.
46+
47+
### Step 3: Try the Production Script
48+
49+
After understanding the concepts from the notebook, run the **[WebSocket Streaming Script](./stream_voice_assistant_websocket.py)** to experience a fully functional voice assistant:
50+
51+
```bash
52+
python stream_voice_assistant_websocket.py
53+
```
54+
55+
**How it works:**
56+
1. Press Enter to start recording
57+
2. Speak your question into the microphone
58+
3. Press Enter to stop recording
59+
4. The assistant will respond with natural speech
60+
5. Repeat or press Ctrl+C to exit
61+
62+
The script demonstrates production-ready implementations of:
63+
- Real-time microphone recording with sounddevice
64+
- Continuous conversation with context retention
65+
- WebSocket-based streaming for minimal latency
66+
- Custom audio queue for seamless playback
67+
68+
## More About ElevenLabs
69+
70+
Here are some helpful resources to deepen your understanding:
71+
72+
- [ElevenLabs Platform](https://elevenlabs.io/) - Official website
73+
- [API Documentation](https://elevenlabs.io/docs/overview) - Complete API reference
74+
- [Voice Library](https://elevenlabs.io/voice-library) - Explore available voices
75+
- [API Playground](https://elevenlabs.io/app/speech-synthesis/text-to-speech) - Test voices interactively
76+
- [Python SDK](https://github.com/elevenlabs/elevenlabs-python) - Official Python SDK

0 commit comments

Comments
 (0)