Skip to content

Commit 5c03b50

Browse files
authored
Update readme (#729)
1 parent c657527 commit 5c03b50

File tree

1 file changed

+34
-21
lines changed

1 file changed

+34
-21
lines changed

README.md

Lines changed: 34 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,24 @@ pip install elevenlabs
2424

2525
### Main Models
2626

27-
1. **Eleven Multilingual v2** (`eleven_multilingual_v2`)
27+
1. **Eleven v3** (`eleven_v3`)
28+
- Dramatic delivery and performances
29+
- 70+ languages supported
30+
- Supported for natural multi-speaker dialogue
31+
32+
2. **Eleven Multilingual v2** (`eleven_multilingual_v2`)
2833

2934
- Excels in stability, language diversity, and accent accuracy
3035
- Supports 29 languages
3136
- Recommended for most use cases
3237

33-
2. **Eleven Flash v2.5** (`eleven_flash_v2_5`)
38+
3. **Eleven Flash v2.5** (`eleven_flash_v2_5`)
3439

3540
- Ultra-low latency
3641
- Supports 32 languages
3742
- Faster model, 50% lower price per character
3843

39-
2. **Eleven Turbo v2.5** (`eleven_turbo_v2_5`)
44+
4. **Eleven Turbo v2.5** (`eleven_turbo_v2_5`)
4045

4146
- Good balance of quality and latency
4247
- Ideal for developer use cases where speed is crucial
@@ -51,12 +56,12 @@ from elevenlabs.play import play
5156

5257
load_dotenv()
5358

54-
client = ElevenLabs()
59+
elevenlabs = ElevenLabs()
5560

56-
audio = client.text_to_speech.convert(
61+
audio = elevenlabs.text_to_speech.convert(
5762
text="The first move is what sets everything in motion.",
5863
voice_id="JBFqnCBsd6RMkjVDRZzb",
59-
model_id="eleven_multilingual_v2",
64+
model_id="eleven_v3",
6065
output_format="mp3_44100_128",
6166
)
6267

@@ -71,23 +76,23 @@ play(audio)
7176

7277
## Voices
7378

74-
List all your available voices with `voices()`.
79+
List all your available voices with `search()`.
7580

7681
```py
7782
from elevenlabs.client import ElevenLabs
7883

79-
client = ElevenLabs(
84+
elevenlabs = ElevenLabs(
8085
api_key="YOUR_API_KEY",
8186
)
8287

83-
response = client.voices.search()
88+
response = elevenlabs.voices.search()
8489
print(response.voices)
8590
```
8691

8792
For information about the structure of the voices output, please refer to the [official ElevenLabs API documentation for Get Voices](https://elevenlabs.io/docs/api-reference/get-voices).
8893

8994
Build a voice object with custom settings to personalize the voice style, or call
90-
`client.voices.get_settings("your-voice-id")` to get the default settings for the voice.
95+
`elevenlabs.voices.settings.get("your-voice-id")` to get the default settings for the voice.
9196

9297
</details>
9398

@@ -99,11 +104,11 @@ Clone your voice in an instant. Note that voice cloning requires an API key, see
99104
from elevenlabs.client import ElevenLabs
100105
from elevenlabs.play import play
101106

102-
client = ElevenLabs(
107+
elevenlabs = ElevenLabs(
103108
api_key="YOUR_API_KEY",
104109
)
105110

106-
voice = client.voices.ivc.create(
111+
voice = elevenlabs.voices.ivc.create(
107112
name="Alex",
108113
description="An old American male voice with a slight hoarseness in his throat. Perfect for news", # Optional
109114
files=["./sample_0.mp3", "./sample_1.mp3", "./sample_2.mp3"],
@@ -118,9 +123,11 @@ Stream audio in real-time, as it's being generated.
118123
from elevenlabs import stream
119124
from elevenlabs.client import ElevenLabs
120125

121-
client = ElevenLabs()
126+
elevenlabs = ElevenLabs(
127+
api_key="YOUR_API_KEY",
128+
)
122129

123-
audio_stream = client.text_to_speech.stream(
130+
audio_stream = elevenlabs.text_to_speech.stream(
124131
text="This is a test",
125132
voice_id="JBFqnCBsd6RMkjVDRZzb",
126133
model_id="eleven_multilingual_v2"
@@ -145,20 +152,20 @@ import asyncio
145152

146153
from elevenlabs.client import AsyncElevenLabs
147154

148-
eleven = AsyncElevenLabs(
155+
elevenlabs = AsyncElevenLabs(
149156
api_key="MY_API_KEY"
150157
)
151158

152159
async def print_models() -> None:
153-
models = await eleven.models.list()
160+
models = await elevenlabs.models.list()
154161
print(models)
155162

156163
asyncio.run(print_models())
157164
```
158165

159-
## Conversational AI
166+
## ElevenAgents
160167

161-
Build interactive AI agents with real-time audio capabilities using ElevenLabs Conversational AI.
168+
Build interactive AI agents with real-time audio capabilities using ElevenAgents.
162169

163170
### Basic Usage
164171

@@ -167,14 +174,16 @@ from elevenlabs.client import ElevenLabs
167174
from elevenlabs.conversational_ai.conversation import Conversation, ClientTools
168175
from elevenlabs.conversational_ai.default_audio_interface import DefaultAudioInterface
169176

170-
client = ElevenLabs(api_key="YOUR_API_KEY")
177+
elevenlabs = ElevenLabs(
178+
api_key="YOUR_API_KEY",
179+
)
171180

172181
# Create audio interface for real-time audio input/output
173182
audio_interface = DefaultAudioInterface()
174183

175184
# Create conversation
176185
conversation = Conversation(
177-
client=client,
186+
client=elevenlabs,
178187
agent_id="your-agent-id",
179188
requires_auth=True,
180189
audio_interface=audio_interface,
@@ -195,6 +204,10 @@ For advanced use cases involving context propagation, resource reuse, or specifi
195204
import asyncio
196205
from elevenlabs.conversational_ai.conversation import ClientTools
197206

207+
elevenlabs = ElevenLabs(
208+
api_key="YOUR_API_KEY",
209+
)
210+
198211
async def main():
199212
# Get the current event loop
200213
custom_loop = asyncio.get_running_loop()
@@ -212,7 +225,7 @@ async def main():
212225

213226
# Use with conversation
214227
conversation = Conversation(
215-
client=client,
228+
client=elevenlabs,
216229
agent_id="your-agent-id",
217230
requires_auth=True,
218231
audio_interface=audio_interface,

0 commit comments

Comments
 (0)