Closed RevelryMedia closed 3 months ago
Hi, I had the same problem before and I fixed it by removing voices I added from Voice Library
Hi, I had the same problem before and I fixed it by removing voices I added from Voice Library
Wow, that actually worked!!! Thanks! Definitely a bug.
Try downgrading the library:
pip install elevenlabs==0.3.0b0
Pydantic types are broken.
Replacing the class like this was good enough for my purposes at least:
# /usr/lib/python3.11/site-packages/elevenlabs/types/voice_sharing_response.py
class VoiceSharingResponse(pydantic.BaseModel):
status: VoiceSharingState
history_item_sample_id: typing.Optional[str] = None
date_unix: int
whitelisted_emails: typing.List[str]
public_owner_id: str
original_voice_id: str
financial_rewards_enabled: bool
free_users_allowed: bool
live_moderation_enabled: bool
rate: float
notice_period: int
disable_at_unix: typing.Optional[int] = None
voice_mixing_allowed: bool
instagram_username: typing.Optional[str] = None
twitter_username: typing.Optional[str] = None
youtube_username: typing.Optional[str] = None
tiktok_username: typing.Optional[str] = None
featured: bool
ban_reason: typing.Optional[str] = None
liked_by_count: int
cloned_by_count: int
name: str
description: typing.Optional[str] = None
labels: typing.Dict[str, str]
review_status: ReviewStatus
review_message: typing.Optional[str] = None
enabled_in_library: bool
Hey folks -- thanks for reporting this error. We will be releasing a fix shortly!
This is fixed in v1.0.1!
Tried installing the 1.0.0 and running the basic example (w/key) in the docs and I'm getting the below error: (The only issue I had in the old version was when I forgot to shut my vpn off.)
Sample code used:
`from elevenlabs import play from elevenlabs.client import ElevenLabs
client = ElevenLabs( api_key="YOUR_API_KEY", # Defaults to ELEVEN_API_KEY )
audio = client.generate( text="Hello! 你好! Hola! नमस्ते! Bonjour! こんにちは! مرحبا! 안녕하세요! Ciao! Cześć! Привіт! வணக்கம்!", voice="Rachel", model="eleven_multilingual_v2" ) play(audio)`
Error:
Traceback (most recent call last): File "c:\dev\aiVideoStream\elevenlabscontrol.py", line 16, in <module> audio = client.generate( ^^^^^^^^^^^^^^^^ File "C:\dev\Environments\aivideo\Lib\site-packages\elevenlabs\client.py", line 179, in generate voices_response = self.voices.get_all(request_options=request_options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\dev\Environments\aivideo\Lib\site-packages\elevenlabs\voices\client.py", line 69, in get_all return pydantic.parse_obj_as(GetVoicesResponse, _response.json()) # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\dev\Environments\aivideo\Lib\site-packages\pydantic\v1\tools.py", line 38, in parse_obj_as return model_type(__root__=obj).__root__ ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\dev\Environments\aivideo\Lib\site-packages\pydantic\v1\main.py", line 341, in __init__ raise validation_error pydantic.v1.error_wrappers.ValidationError: 32 validation errors for ParsingModel[GetVoicesResponse] __root__ -> voices -> 46 -> sharing -> history_item_sample_id none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 46 -> sharing -> disable_at_unix none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 46 -> sharing -> instagram_username none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 46 -> sharing -> twitter_username none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 46 -> sharing -> youtube_username none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 46 -> sharing -> tiktok_username none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 46 -> sharing -> ban_reason none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 46 -> sharing -> review_message none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 47 -> sharing -> history_item_sample_id none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 47 -> sharing -> disable_at_unix none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 47 -> sharing -> instagram_username none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 47 -> sharing -> twitter_username none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 47 -> sharing -> youtube_username none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 47 -> sharing -> tiktok_username none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 47 -> sharing -> ban_reason none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 47 -> sharing -> review_message none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 48 -> sharing -> history_item_sample_id none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 48 -> sharing -> disable_at_unix none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 48 -> sharing -> instagram_username none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 48 -> sharing -> twitter_username none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 48 -> sharing -> youtube_username none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 48 -> sharing -> tiktok_username none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 48 -> sharing -> ban_reason none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 48 -> sharing -> review_message none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 49 -> sharing -> history_item_sample_id none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 49 -> sharing -> disable_at_unix none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 49 -> sharing -> instagram_username none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 49 -> sharing -> twitter_username none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 49 -> sharing -> youtube_username none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 49 -> sharing -> tiktok_username none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 49 -> sharing -> ban_reason none is not an allowed value (type=type_error.none.not_allowed) __root__ -> voices -> 49 -> sharing -> review_message none is not an allowed value (type=type_error.none.not_allowed)