Closed CroSSer23 closed 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.
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!
{"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)`