mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-25 09:19:23 +01:00
fix: elevenlabs cloned voices do not show up in webui after entering API key (#2107)
This commit is contained in:
parent
7584d46c29
commit
458a627ab9
@ -17,6 +17,12 @@ voices = None
|
||||
wav_idx = 0
|
||||
|
||||
|
||||
def update_api_key(key):
|
||||
params['api_key'] = key
|
||||
if key is not None:
|
||||
elevenlabs.set_api_key(key)
|
||||
|
||||
|
||||
def refresh_voices():
|
||||
global params
|
||||
your_voices = elevenlabs.voices()
|
||||
@ -167,7 +173,7 @@ def ui():
|
||||
# Event functions to update the parameters in the backend
|
||||
activate.change(lambda x: params.update({'activate': x}), activate, None)
|
||||
voice.change(lambda x: params.update({'selected_voice': x}), voice, None)
|
||||
api_key.change(lambda x: params.update({'api_key': x}), api_key, None)
|
||||
api_key.change(update_api_key, api_key, None)
|
||||
# connect.click(check_valid_api, [], connection_status)
|
||||
refresh.click(refresh_voices_dd, [], voice)
|
||||
# Event functions to update the parameters in the backend
|
||||
|
Loading…
Reference in New Issue
Block a user