Skip to content

Commit 216a8af

Browse files
authored
Fixes (#552)
* add new tutorials * try-catch gradio launch * update api to 0.8.1 * add REACT_UI_PORT #533 * remove upgrade section, add text generation webui * add info on integrations * disable stable audio extension in dockerfile
1 parent ec286fe commit 216a8af

File tree

7 files changed

+38
-39
lines changed

7 files changed

+38
-39
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ RUN pip install --no-cache-dir torch==$TORCH_VERSION git+https://github.com/rsxd
4646
RUN pip install --no-cache-dir torch==$TORCH_VERSION git+https://github.com/rsxdalv/extension_styletts2@main
4747
RUN pip install --no-cache-dir torch==$TORCH_VERSION git+https://github.com/rsxdalv/extension_vall_e_x@main
4848
RUN pip install --no-cache-dir torch==$TORCH_VERSION git+https://github.com/rsxdalv/extension_maha_tts@main
49-
RUN pip install --no-cache-dir torch==$TORCH_VERSION git+https://github.com/rsxdalv/extension_stable_audio@main
49+
# RUN pip install --no-cache-dir torch==$TORCH_VERSION git+https://github.com/rsxdalv/extension_stable_audio@main
5050
# RUN pip install --no-cache-dir torch==$TORCH_VERSION hydra-core==1.3.2
5151
RUN pip install --no-cache-dir torch==$TORCH_VERSION nvidia-ml-py
5252

README.md

Lines changed: 16 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -297,32 +297,6 @@ See the [2024 Changelog](./documentation/changelog-2024.md) for a detailed list
297297
See the [2023 Changelog](./documentation/changelog-2023.md) for a detailed list of changes in 2023.
298298
</details>
299299

300-
## Upgrading (For old installations)
301-
*In case of issues, feel free to contact the developers*.
302-
303-
<details>
304-
<summary>Click to expand</summary>
305-
306-
### Upgrading from v6 to new installer
307-
308-
#### Recommended: Fresh install
309-
* Download the [new version](https://github.com/rsxdalv/tts-webui/archive/refs/heads/main.zip) and run the start_tts_webui.bat (Windows) or start_tts_webui.sh (MacOS, Linux)
310-
* Once it is finished, close the server.
311-
* Recommended: Copy the old generations to the new directory, such as favorites/ outputs/ outputs-rvc/ models/ collections/ config.json
312-
* With caution: you can copy the whole new tts-webui directory over the old one, but there might be some old files that are lost.
313-
314-
#### In-place upgrade, can delete some files, tweaks
315-
* Update the existing installation using the update_*platform* script
316-
* After the update run the new start_tts_webui.bat (Windows) or start_tts_webui.sh (MacOS, Linux) inside of the tts-webui directory
317-
* Once the server starts, check if it works.
318-
* With caution: if the new server works, within the one-click-installers directory, delete the old installer_files.
319-
320-
#### *Is there any more optimal way to do this?*
321-
322-
Not exactly, the dependencies clash, especially between conda and python (and dependencies are already in a critical state, moving them to conda is ways off). Therefore, while it might be possible to just replace the old installer with the new one and running the update, the problems are unpredictable and **unfixable**. Making an update to installer requires a lot of testing so it's not done lightly.
323-
324-
</details>
325-
326300
## Extensions
327301

328302
Extensions are available to install from the webui itself, or using React UI. They can also be installed using the extension manager. Internally, extensions are just python packages that are installed using pip. Multiple extensions can be installed at the same time, but there might be compatibility issues between them. After installing or updating an extension, you need to restart the app to load it.
@@ -336,8 +310,7 @@ Updates need to be done manually by using the mini-control panel:
336310

337311
### Silly Tavern
338312

339-
1. Install the Kokoro TTS API extension
340-
![kokoro-tts-api-extension](./documentation/screenshots/kokoro-tts-api-extension.png)
313+
1. Update OpenAI TTS API extension to latest version
341314
2. Start the API and test it with Python Requests
342315

343316
*(OpenAI client might not be installed thus the Test with Python OpenAI client might fail)*
@@ -347,6 +320,21 @@ Updates need to be done manually by using the mini-control panel:
347320
![silly-tavern-tts-api](./documentation/screenshots/silly-tavern-tts-api.png)
348321
4. Test it out!
349322

323+
### Text Generation WebUI (oobabooga/text-generation-webui)
324+
325+
1. Install https://github.com/rsxdalv/text-to-tts-webui extension in text-generation-webui
326+
2. Start the API and test it with Python Requests
327+
3. Configure using the panel: ![oobaboooga-text-to-tts-webui](./documentation/screenshots/oobaboooga-text-to-tts-webui.png)
328+
329+
### OpenWebUI
330+
331+
1. Enable OpenAI API extension in TTS WebUI
332+
2. Start the API and test it with Python Requests
333+
3. Once you can see the audio generates successfully, go to OpenWebUI, and add a new TTS API
334+
Default provider endpoint: `http://localhost:7778/v1/audio/speech`
335+
4. Test it out!
336+
![openwebui](./documentation/screenshots/openwebui.png)
337+
350338
### OpenAI Compatible APIs
351339

352340
Using the instructions above, you can install an OpenAI compatible API, and use it with Silly Tavern or other OpenAI compatible clients.
136 KB
Loading
111 KB
Loading

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ gradio_iconbutton @ https://github.com/rsxdalv/gradio_iconbutton/releases/downlo
5555

5656
deprecated >= 1.2.13
5757

58-
extension_kokoro_tts_api @ https://github.com/rsxdalv/extension_kokoro_tts_api/releases/download/v0.8.0/extension_kokoro_tts_api-0.8.0-py3-none-any.whl
58+
extension_kokoro_tts_api @ https://github.com/rsxdalv/extension_kokoro_tts_api/releases/download/v0.8.1/extension_kokoro_tts_api-0.8.1-py3-none-any.whl

server.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424

2525
gr_options = config["gradio_interface_options"]
26-
26+
REACT_UI_PORT = os.environ.get("REACT_UI_PORT", 3000)
2727

2828
def start_gradio_server(config):
2929

@@ -57,11 +57,14 @@ def upgrade_gradio_options(options):
5757

5858
print("\n\n")
5959

60-
demo.queue().launch(
61-
**gr_options,
62-
allowed_paths=["."],
63-
favicon_path="./react-ui/public/favicon.ico",
64-
)
60+
try:
61+
demo.queue().launch(
62+
**gr_options,
63+
allowed_paths=["."],
64+
favicon_path="./react-ui/public/favicon.ico",
65+
)
66+
except Exception as e:
67+
print(f"Failed to launch Gradio server: {e}")
6568

6669

6770
def server_hypervisor():
@@ -88,7 +91,7 @@ def signal_handler(signal, frame, postgres_process):
8891
if "--no-react" not in os.sys.argv:
8992
print("Starting React UI...")
9093
subprocess.Popen(
91-
"npm start --prefix react-ui",
94+
f"npm start --prefix react-ui -- -p {REACT_UI_PORT}",
9295
env={
9396
**os.environ,
9497
"GRADIO_BACKEND_AUTOMATIC": f"http://127.0.0.1:{gr_options['server_port']}/",
@@ -139,6 +142,5 @@ def signal_handler(signal, frame, postgres_process):
139142
import webbrowser
140143

141144
if gr_options["inbrowser"] and "--no-react" not in os.sys.argv:
142-
webbrowser.open("http://localhost:3000")
143-
145+
webbrowser.open(f"http://localhost:{REACT_UI_PORT}")
144146
start_gradio_server(config=config)

tts_webui/tutorials/tab.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ def tutorial_tab():
1616
# ### Coming soon!
1717
# """
1818
# )
19+
#
20+
with gr.Tab("Chat with Chatterbox in SillyTavern!"):
21+
youtube_video("_0rftbXPJLI")
22+
# 5:10
23+
# Now playing
24+
# Chatterbox TTS by Resemble AI - Local ElevenLabs
25+
# https://www.youtube.com/watch?v=yJhzwmwFpcs
26+
with gr.Tab("Chatterbox TTS"):
27+
youtube_video("yJhzwmwFpcs")
1928
with gr.Tab("Extensions"):
2029
youtube_video("https://www.youtube.com/watch?v=nfZEoXOGX5Y")
2130
# with gr.Tab("TTS WebUI scroll through preview 2025 (silent)"):

0 commit comments

Comments
 (0)