lugia19 / elevenlabslib

Full python wrapper for the elevenlabs API.
MIT License
148 stars 27 forks source link

Cant Add Voice from URL - ERROR #23

Closed CroSSer23 closed 11 months ago

CroSSer23 commented 11 months ago

{"detail":{"status":"needs_authorization","message":"Neither authorization header nor xi-api-key received, please provide one."}}

`import concurrent.futures from elevenlabslib.helpers import from elevenlabslib import

def process_api_key(api_key): user = ElevenLabsUser(api_key)

try: user.add_shared_voice_from_URL("https://elevenlabs.io/voice-lab/share/efba40d5d86c6dd1af1d20cf2be292869d82ca928d0a2d8ab30f47defd2dd7a9/6buUoCSgjTtLCEqFXwEc","Hades - grim gravitas") print(f'ADDED') except IndexError: print(f'NOT ADDED')

with open('api.txt') as f: api_keys = f.read().splitlines()

with concurrent.futures.ThreadPoolExecutor() as executor: for api_key in api_keys:
executor.submit(process_api_key, api_key)`

lugia19 commented 11 months ago

Ah, yes, I need to remove those functions altogether. Sadly, elevenlabs have disabled the ability to interact with the voice sharing endpoints via the API key. There isn't anything that can be done beyond somehow getting the bearer token from a browser session, and manually using that.

CroSSer23 commented 11 months ago

Thank you)))))) Too bad I deleted all the voices from all my keys first, and then went to check the add function)))) Well, selenium will have to be used after all!