diff --git a/kcpp_docs.embd b/kcpp_docs.embd index f8f88fd96..5d38ad728 100644 --- a/kcpp_docs.embd +++ b/kcpp_docs.embd @@ -1463,7 +1463,7 @@ }, "voice": { "type": "string", - "description": "The voice to use when generating the audio. You can enter anything you like, a qunique speaker will be generated." + "description": "The voice to use when generating the audio. You can enter anything you like, a unique speaker will be generated. There are a few preset voices you can use: kobo,cheery,sleepy,tutor,shouty,bored,record" } }, "type": "object" diff --git a/koboldcpp.py b/koboldcpp.py index 29a0e94d2..552d34f0e 100644 --- a/koboldcpp.py +++ b/koboldcpp.py @@ -1845,18 +1845,18 @@ ws ::= | " " | "\n" [ \t]{0,20} def LaunchWebbrowser(target_url, failedmsg): try: - import webbrowser as wb - if wb.open(target_url, autoraise=True): - return # If successful, exit the function - raise RuntimeError("wb.open failed, using fallback") + if os.name == "posix" and "DISPLAY" in os.environ: # UNIX-like systems + import subprocess + result = subprocess.run(["xdg-open", target_url], check=True) + if result.returncode == 0: + return # fallback successful + raise RuntimeError("no xdg-open") except Exception: try: - if os.name == "posix" and "DISPLAY" in os.environ: # UNIX-like systems - import subprocess - result = subprocess.run(["xdg-open", target_url], check=True) - if result.returncode == 0: - return # fallback successful - raise RuntimeError("fallback failed") + import webbrowser as wb + if wb.open(target_url, autoraise=True): + return # If successful, exit the function + raise RuntimeError("wb.open failed") except Exception: print(failedmsg) print(f"Please manually open your browser to {target_url}")