Open Tobe2d opened 11 months ago
from elevenlabs import voices, generate, stream
voice_object = Voice.from_id(id)
voice_object.settings = VoiceSettings(
stability=self.stability / 100,
similarity_boost=self.clarity / 100,
style=self.style_exxageration / 100,
use_speaker_boost=True
)
audio_stream = generate(
text=generator,
voice=voice_object,
model=model,
stream=True
)
stream(audio_stream)
Roughly like this, hope that helps. Note that streaming only works with the v1 models.
Sry needs this too: from elevenlabs.api import Voice, VoiceSettings
Thanks for the reply,
I am getting this error:
Start speaking. I'm all ears.
Can you hear me? <<< Traceback (most recent call last): File "E:\Ai__Project\AIVoiceChat\voice_talk_vad.py", line 63, in
voice_object = Voice.from_id(o6y7W8Np) ^^^^^^^^^^^^^^^^^^^^ NameError: name 'o6y7W8Np' is not defined
Pls try: voice_object = Voice.from_id("o6y7W8Np")
Moving step ahead.
another error:
NameError: name 'self' is not defined
seems I need to add the name of the model somewhere as it is named in elvenlabs
Replace model with "eleven_monolingual_v1" and the self.stability etc with a value between 0 and 100
Or eleven_multilingual_v1. V2 models dont work with stream.
I would like to add elevenlabs custom voice based on id and name. custom voice = cloned own voice ;-)
Hope you can help me on this