Skip to content

Use consistent ElevenLabs() call pattern in README.md #594

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,12 @@ pip install elevenlabs
For more detailed information about these models and others, visit the [ElevenLabs Models documentation](https://elevenlabs.io/docs/models).

```py
from dotenv import load_dotenv
from elevenlabs.client import ElevenLabs
from elevenlabs import play

load_dotenv()
Comment on lines -48 to -52
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets keep load_dotenv(), want to fix and then i will approve?


client = ElevenLabs()
client = ElevenLabs(
api_key="YOUR_API_KEY",
)

audio = client.text_to_speech.convert(
text="The first move is what sets everything in motion.",
Expand Down Expand Up @@ -118,7 +117,9 @@ Stream audio in real-time, as it's being generated.
from elevenlabs import stream
from elevenlabs.client import ElevenLabs

client = ElevenLabs()
client = ElevenLabs(
api_key="YOUR_API_KEY",
)

audio_stream = client.text_to_speech.stream(
text="This is a test",
Expand Down