Skip to content
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

(chore): document api_key kwarg #187

Merged
merged 1 commit into from
Feb 20, 2024
Merged
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
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ We support two main models: the newest `eleven_multilingual_v2`, a single founda
from elevenlabs import generate, play

audio = generate(
# api_key="YOUR_API_KEY", (Defaults to os.getenv(ELEVEN_API_KEY))
text="Hello! 你好! Hola! नमस्ते! Bonjour! こんにちは! مرحبا! 안녕하세요! Ciao! Cześć! Привіт! வணக்கம்!",
voice="Rachel",
model="eleven_multilingual_v2"
Expand Down Expand Up @@ -153,6 +154,7 @@ Clone your voice in an instant. Note that voice cloning requires an API key, see
from elevenlabs import clone, generate, play

voice = clone(
# api_key="YOUR_API_KEY", (Defaults to os.getenv(ELEVEN_API_KEY))
name="Alex",
description="An old American male voice with a slight hoarseness in his throat. Perfect for news", # Optional
files=["./sample_0.mp3", "./sample_1.mp3", "./sample_2.mp3"],
Expand All @@ -171,6 +173,7 @@ Stream audio in real-time, as it's being generated.
from elevenlabs import generate, stream

audio_stream = generate(
# api_key="YOUR_API_KEY", (Defaults to os.getenv(ELEVEN_API_KEY))
text="This is a... streaming voice!!",
stream=True
)
Expand All @@ -188,6 +191,7 @@ def text_stream():
yield "I'm a text to speech API "

audio_stream = generate(
# api_key="YOUR_API_KEY", (Defaults to os.getenv(ELEVEN_API_KEY))
text=text_stream(),
voice="Nicole",
model="eleven_monolingual_v1",
Expand Down
Loading