-
Notifications
You must be signed in to change notification settings - Fork 154
Add /upload_sample route to allow upload new speakers using Web API #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 12 commits
98845ca
9f783f6
1e7a025
47d3568
571c4f2
f10207f
5e310e0
65dfd1c
f720b33
0e9f827
e7faea6
c9e67cf
f1e8c39
c388e1d
38f8dfa
2570806
dd9c688
19a1f69
c5de028
1d412ea
5c1a35f
241dd37
ae57177
bf46de0
f51038b
0218c48
b8a1ca0
05b5812
5cf3f7e
33efb27
8164e94
6f08109
9d47698
5897796
561e6f0
4662efc
3060a1c
df041b4
72770c6
4713e53
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,10 @@ | ||
| dist | ||
| venv | ||
| speakers | ||
| output | ||
| test | ||
| models | ||
| xtts_api_server/models | ||
| *.pyc | ||
| xtts_api_server/RealtimeTTS/engines/coqui_engine_old.py | ||
| xtts_models | ||
| modules-xtts.txt | ||
| modules-xtts.txt |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,116 @@ | ||
| { | ||
| "nbformat": 4, | ||
| "nbformat_minor": 0, | ||
| "metadata": { | ||
| "colab": { | ||
| "provenance": [], | ||
| "gpuType": "T4" | ||
| }, | ||
| "kernelspec": { | ||
| "name": "python3", | ||
| "display_name": "Python 3" | ||
| }, | ||
| "language_info": { | ||
| "name": "python" | ||
| }, | ||
| "accelerator": "GPU" | ||
| }, | ||
| "cells": [ | ||
| { | ||
| "cell_type": "markdown", | ||
| "source": [ | ||
| "**Run next block, restart session when asked and run same block until everything installs.**\n", | ||
| "\n", | ||
| "Last message should be like this (yes, ignore ERROR)\n", | ||
| "\n", | ||
| "\n", | ||
| "```\n", | ||
| "ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n", | ||
| "torchvision 0.19.0+cu121 requires torch==2.4.0, but you have torch 2.1.1+cu121 which is incompatible\n", | ||
| "Successfully installed torch-2.1.1+cu121 torchaudio-2.1.1+cu121 triton-2.1.0\n", | ||
| "\n", | ||
| "```\n", | ||
| "\n" | ||
| ], | ||
| "metadata": { | ||
| "id": "FmMMJppi2-Gh" | ||
| } | ||
| }, | ||
| { | ||
| "cell_type": "code", | ||
| "execution_count": null, | ||
| "metadata": { | ||
| "id": "lT4ieCTnr_L7" | ||
| }, | ||
| "outputs": [], | ||
| "source": [ | ||
| "!apt-get update && apt-get install --no-install-recommends -y sox libsox-fmt-all curl wget gcc git git-lfs build-essential libaio-dev libsndfile1 ssh ffmpeg sshpass portaudio19-dev libportaudio2\n", | ||
| "!git clone https://github.com/abeiro/xtts-api-server\n", | ||
| "%cd xtts-api-server\n", | ||
| "!python3 -m pip install --upgrade pip wheel ninja virtualenv\n", | ||
| "!pip install setuptools==68.1.2\n", | ||
| "!pip install deepspeed\n", | ||
| "!pip install -r requirements.txt\n", | ||
| "!pip install torch==2.1.1+cu121 torchaudio==2.1.1+cu121 --index-url https://download.pytorch.org/whl/cu121" | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
| "source": [ | ||
| "**Run this once to get model downloaded and deepspeed compiled. Once uvicorn starts, stop and proceed to next block**\n", | ||
| "\n", | ||
| "\n", | ||
| "\n" | ||
| ], | ||
| "metadata": { | ||
| "id": "u1Ir_s5U3ZcT" | ||
| } | ||
| }, | ||
| { | ||
| "cell_type": "code", | ||
| "source": [ | ||
| "!python3 -m xtts_api_server --listen --deepspeed" | ||
| ], | ||
| "metadata": { | ||
| "id": "Xs5dXNL43VFB" | ||
| }, | ||
| "execution_count": null, | ||
| "outputs": [] | ||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
| "source": [ | ||
| "**Run and note cloudflare address. Wait for message:**\n", | ||
| "\n", | ||
| "```\n", | ||
| "INFO: Uvicorn running on http://0.0.0.0:8020 (Press CTRL+C to quit)\n", | ||
| "\n", | ||
| "```\n", | ||
| "\n", | ||
| "Use http://generated-domain-name:80 in AI-FF conf.\n", | ||
| "\n" | ||
| ], | ||
| "metadata": { | ||
| "id": "xOowr61z3nT2" | ||
| } | ||
| }, | ||
| { | ||
| "cell_type": "code", | ||
| "source": [ | ||
| "#Run\n", | ||
| "!rm nohup.out\n", | ||
| "!wget -c https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -O cloudflared-linux-amd64\n", | ||
| "!chmod +x cloudflared-linux-amd64\n", | ||
| "!nohup ./cloudflared-linux-amd64 tunnel --url http://localhost:8020 &\n", | ||
| "!sleep 8\n", | ||
| "!cat nohup.out\n", | ||
| "!python3 -m xtts_api_server --listen --deepspeed" | ||
| ], | ||
| "metadata": { | ||
| "id": "xuLmVnEW2PYM" | ||
| }, | ||
| "execution_count": null, | ||
| "outputs": [] | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,65 @@ | ||||||||||||||||||||||||||||||||||||||||||||
| #!/bin/bash | ||||||||||||||||||||||||||||||||||||||||||||
| clear | ||||||||||||||||||||||||||||||||||||||||||||
| cat << EOF | ||||||||||||||||||||||||||||||||||||||||||||
| CHIM XTTS | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| This will install CHIM XTTS. This is a high quality TTS service that works with Skyrim voices. | ||||||||||||||||||||||||||||||||||||||||||||
| You can also generate your own voices. | ||||||||||||||||||||||||||||||||||||||||||||
| However it will require around 4GB of VRAM! | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| Options: | ||||||||||||||||||||||||||||||||||||||||||||
| * deepseed = Uses more VRAM but faster | ||||||||||||||||||||||||||||||||||||||||||||
| * lowvram = Uses less VRAM but slower | ||||||||||||||||||||||||||||||||||||||||||||
| * regular = Middle ground of both options above | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| If you are not sure use lowvram. | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| EOF | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| if [ ! -d /home/dwemer/python-tts ]; then | ||||||||||||||||||||||||||||||||||||||||||||
| exit "XTTSv2 not installed" | ||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| mapfile -t files < <(find /home/dwemer/xtts-api-server/ -name "start-*.sh") | ||||||||||||||||||||||||||||||||||||||||||||
| # Check if any files were found | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| if [ ${#files[@]} -eq 0 ]; then | ||||||||||||||||||||||||||||||||||||||||||||
| echo "No files found matching the pattern." | ||||||||||||||||||||||||||||||||||||||||||||
| exit 1 | ||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| # Display the files in a numbered list | ||||||||||||||||||||||||||||||||||||||||||||
| echo -e "Select a an option from the list:\n\n" | ||||||||||||||||||||||||||||||||||||||||||||
| for i in "${!files[@]}"; do | ||||||||||||||||||||||||||||||||||||||||||||
| echo "$((i+1)). ${files[$i]}" | ||||||||||||||||||||||||||||||||||||||||||||
| done | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| echo "0. Disable service"; | ||||||||||||||||||||||||||||||||||||||||||||
| echo | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+31
to
+39
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix typos in user-facing text (“deepseed” → “deepspeed”; “Select a an” → “Select an”). User-visible messages should be correct and professional. -echo -e "Select a an option from the list:\n\n"
+echo -e "Select an option from the list:\n\n"
@@
-* deepseed = Uses more VRAM but faster
+* deepspeed = Uses more VRAM but faster📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||
| # Prompt the user to make a selection | ||||||||||||||||||||||||||||||||||||||||||||
| read -p "Select an option by picking the matching number: " selection | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| # Validate the input | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| if [ "$selection" -eq "0" ]; then | ||||||||||||||||||||||||||||||||||||||||||||
| echo "Disabling service. Run this again to enable" | ||||||||||||||||||||||||||||||||||||||||||||
| rm /home/dwemer/xtts-api-server/start.sh &>/dev/null | ||||||||||||||||||||||||||||||||||||||||||||
| exit 0 | ||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| if ! [[ "$selection" =~ ^[0-9]+$ ]] || [ "$selection" -lt 1 ] || [ "$selection" -gt ${#files[@]} ]; then | ||||||||||||||||||||||||||||||||||||||||||||
| echo "Invalid selection." | ||||||||||||||||||||||||||||||||||||||||||||
| exit 1 | ||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+45
to
+54
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Reorder input validation to prevent comparison errors - if [ "$selection" -eq "0" ]; then
+ # Check for zero before numeric comparison
+ if [ "$selection" = "0" ]; then
echo "Disabling service. Run this again to enable"
rm /home/dwemer/xtts-api-server/start.sh &>/dev/null
exit 0
fi
- if ! [[ "$selection" =~ ^[0-9]+$ ]] || [ "$selection" -lt 1 ] || [ "$selection" -gt ${#files[@]} ]; then
+ if ! [[ "$selection" =~ ^[0-9]+$ ]] || [ "$selection" -lt 1 ] || [ "$selection" -gt ${#files[@]} ]; then
echo "Invalid selection."
exit 1
fi📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| # Get the selected file | ||||||||||||||||||||||||||||||||||||||||||||
| selected_file="${files[$((selection-1))]}" | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| echo "You selected: $selected_file" | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| ln -sf $selected_file /home/dwemer/xtts-api-server/start.sh | ||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Quote path variables in - ln -sf $selected_file /home/dwemer/xtts-api-server/start.sh
+ ln -sf "$selected_file" "/home/dwemer/xtts-api-server/start.sh"📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,42 @@ | ||||||||||||||||||||||||||||||||||||||||||||
| #!/bin/bash | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| cd /home/dwemer/xtts-api-server | ||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Ensure - cd /home/dwemer/xtts-api-server
+ cd /home/dwemer/xtts-api-server || { echo "Error: cannot cd to xtts-api-server"; exit 1; }📝 Committable suggestion
Suggested change
🧰 Tools🪛 Shellcheck (0.10.0)[warning] 2-2: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. (SC2164)
Comment on lines
+2
to
+9
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Add shebang and strict error handling. + #!/bin/bash
+ set -euo pipefail🧰 Tools🪛 Shellcheck (0.10.0)[error] 1-1: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive. (SC2148) [warning] 2-2: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. (SC2164) |
||||||||||||||||||||||||||||||||||||||||||||
| python3 -m venv /home/dwemer/python-tts | ||||||||||||||||||||||||||||||||||||||||||||
| source /home/dwemer/python-tts/bin/activate | ||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+9
to
+11
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add error handling and avoid hardcoded paths. Multiple critical issues:
If 🛡️ Recommended fixes-cd /home/dwemer/xtts-api-server
-python3 -m venv /home/dwemer/python-tts
-source /home/dwemer/python-tts/bin/activate
+# Determine script directory and use relative paths
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" || { echo "Failed to determine script directory"; exit 1; }
+cd "$SCRIPT_DIR" || { echo "Failed to navigate to $SCRIPT_DIR"; exit 1; }
+
+# Allow user to configure paths or use defaults
+VENV_PATH="${VENV_PATH:-$HOME/python-tts}"
+python3 -m venv "$VENV_PATH" || { echo "Failed to create virtual environment at $VENV_PATH"; exit 1; }
+source "$VENV_PATH/bin/activate" || { echo "Failed to activate virtual environment"; exit 1; }Additionally, consider adding 📝 Committable suggestion
Suggested change
🧰 Tools🪛 Shellcheck (0.11.0)[warning] 9-9: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. (SC2164) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| echo "This will take a while so please wait." | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| # Ask user about GPU | ||||||||||||||||||||||||||||||||||||||||||||
| read -p "Do you own a GT10XX series GPU? (yes/no): " gpu_answer | ||||||||||||||||||||||||||||||||||||||||||||
| if [[ "$gpu_answer" =~ ^[Yy][Ee][Ss]$ || "$gpu_answer" =~ ^[Yy]$ ]]; then | ||||||||||||||||||||||||||||||||||||||||||||
| torch_url="https://download.pytorch.org/whl/nightly/cu118" | ||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||
| torch_url="https://download.pytorch.org/whl/nightly/cu128" | ||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| python3 -m pip install --upgrade pip wheel ninja virtualenv | ||||||||||||||||||||||||||||||||||||||||||||
| pip install setuptools==68.1.2 | ||||||||||||||||||||||||||||||||||||||||||||
| pip install -r requirements.txt | ||||||||||||||||||||||||||||||||||||||||||||
| pip uninstall -y torch torchaudio | ||||||||||||||||||||||||||||||||||||||||||||
| pip install --pre -U torch torchaudio --index-url "$torch_url" | ||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Consistently invoke pip via Mixing bare - pip install setuptools==68.1.2
- pip install -r requirements.txt
- pip uninstall -y torch torchaudio
- pip install --pre -U torch torchaudio --index-url "$torch_url"
+ python3 -m pip install setuptools==68.1.2
+ python3 -m pip install -r requirements.txt
+ python3 -m pip uninstall -y torch torchaudio
+ python3 -m pip install --pre -U torch torchaudio --index-url "$torch_url"📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||
| #pip install xtts-api-server #Fails | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainVerify xtts_api_server is importable before trying to run it. requirements.txt install doesn’t show how xtts_api_server is provided (editable install, local package, etc.). Ensure it exists to avoid runtime failure. Run this script to check for the module/package presence in the repo and potential entry-points: Also applies to: 52-52 🏁 Script executed: #!/bin/bash
# Search for a Python package/module named xtts_api_server
rg -nP -C2 '\bxtts_api_server\b' --type py
# Look for a setup.cfg/pyproject with "xtts_api_server" or console_scripts entrypoints
fd -H 'pyproject.toml' -x rg -nP -C2 'xtts_api_server|console_scripts'
fd -H 'setup.cfg' -x rg -nP -C2 'xtts_api_server|console_scripts'Length of output: 1773 Ensure the • ddistro_install.sh (lines 34–35): replace the commented-out pip install line with a local install, for example: pip install -e . # installs the local xtts_api_server package(or [project.scripts]
xtts-api-server = "xtts_api_server.__main__:main"Then 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||
| sed -i 's/checkpoint = load_fsspec(model_path, map_location=torch.device("cpu"))\["model"\]/checkpoint = load_fsspec(model_path, map_location=torch.device("cpu"), weights_only=False)["model"]/' /home/dwemer/python-tts/lib/python3.11/site-packages/TTS/tts/models/xtts.py | ||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Stop hard-coding the Python 3.11 site-packages path. Line [46] assumes the venv lives under -sed -i 's/checkpoint = load_fsspec(model_path, map_location=torch.device("cpu"))\["model"\]/checkpoint = load_fsspec(model_path, map_location=torch.device("cpu"), weights_only=False)["model"]/' /home/dwemer/python-tts/lib/python3.11/site-packages/TTS/tts/models/xtts.py
+model_file="$(
+ python - <<'PY'
+import sysconfig, pathlib
+print(pathlib.Path(sysconfig.get_path("purelib")) / "TTS/tts/models/xtts.py")
+PY
+)"
+if [[ ! -f "$model_file" ]]; then
+ echo "Error: xtts.py not found at $model_file"
+ exit 1
+fi
+sed -i 's/checkpoint = load_fsspec(model_path, map_location=torch.device("cpu"))\["model"\]/checkpoint = load_fsspec(model_path, map_location=torch.device("cpu"), weights_only=False)["model"]/' "$model_file"🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| cp /home/dwemer/TheNarrator.wav speakers/TheNarrator.wav | ||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Check file existence before copying speaker sample. Copying if [[ ! -f "$SAMPLE_PATH" ]]; then
echo "Error: sample file not found at $SAMPLE_PATH"
exit 1
fi
cp "$SAMPLE_PATH" "${BASE_DIR}/speakers/" |
||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| source /home/dwemer/python-tts/bin/activate | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| ./conf.sh | ||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+102
to
+106
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Validate file existence before operations. Both the ♻️ Recommended validation+# Copy speaker sample if available
+NARRATOR_SOURCE="/home/dwemer/TheNarrator.wav" # TODO: Make configurable
+if [ -f "$NARRATOR_SOURCE" ]; then
-cp /home/dwemer/TheNarrator.wav speakers/TheNarrator.wav
+ cp "$NARRATOR_SOURCE" speakers/TheNarrator.wav
+else
+ echo "Warning: TheNarrator.wav not found at $NARRATOR_SOURCE"
+fi
source /home/dwemer/python-tts/bin/activate
-./conf.sh
+if [ -x ./conf.sh ]; then
+ ./conf.sh
+else
+ echo "ERROR: conf.sh not found or not executable"
+ exit 1
+fi📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| echo | ||||||||||||||||||||||||||||||||||||||||||||
| echo "This will start CHIM XTTS to download the selected model" | ||||||||||||||||||||||||||||||||||||||||||||
| echo "Wait for the message 'Uvicorn running on http://0.0.0.0:8020 (Press CTRL+C to quit)'" | ||||||||||||||||||||||||||||||||||||||||||||
| echo "Then close this window. Press ENTER to continue" | ||||||||||||||||||||||||||||||||||||||||||||
| read | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| echo "please wait...." | ||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
| python -m xtts_api_server --listen | ||||||||||||||||||||||||||||||||||||||||||||
|
coderabbitai[bot] marked this conversation as resolved.
Outdated
|
||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Use the venv’s Python interpreter to launch the server. Relying on system - python -m xtts_api_server --listen
+ python3 -m xtts_api_server --listen📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||
| echo "Press Enter | ||||||||||||||||||||||||||||||||||||||||||||
|
coderabbitai[bot] marked this conversation as resolved.
Outdated
|
||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix invalid use of
exitwith a string.exitonly accepts numeric status codes. Useechoto print the message and thenexit 1.📝 Committable suggestion
🧰 Tools
🪛 Shellcheck (0.10.0)
[error] 21-21: Can only exit with status 0-255. Other data should be written to stdout/stderr.
(SC2242)