Fix global var access for coqui

This commit is contained in:
SillyLossy
2023-07-26 22:27:15 +03:00
parent ec7cf2f1df
commit 30a2424e8f
2 changed files with 41 additions and 18 deletions

View File

@@ -167,6 +167,28 @@ cd SillyTavern-extras
| `--sd-remote-ssl` | Use SSL for the remote SD backend<br>Default: **False** |
| `--sd-remote-auth` | Specify the `username:password` for the remote SD backend (if required) |
## Coqui TTS
### Running on Mac M1
#### ImportError: symbol not found
If you're getting the following error when running coqui-tts module on M1 Mac:
```
ImportError: dlopen(/Users/user/.../lib/python3.11/site-packages/MeCab/_MeCab.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace '__ZN5MeCab11createModelEPKc'
```
Do the following:
1. Install homebrew: https://brew.sh/
2. Build and install the `mecab` package
```
brew install --build-from-source mecab
ARCHFLAGS='-arch arm64' pip install --no-binary :all: --compile --use-pep517 --no-cache-dir --force mecab-python3
```
## ChromaDB
ChromaDB is a blazing fast and open source database that is used for long-term memory when chatting with characters. It can be run in-memory or on a local server on your LAN.

View File

@@ -136,6 +136,7 @@ def is_multi_speaker_model():
global type
global spkdirectory
global multspeakjson
global tts
if tts is None:
multspeak = "None"
@@ -179,6 +180,7 @@ def is_multi_speaker_model():
def is_multi_lang_model():
global multlang
global tts
if tts is None:
multlang = "None"
return multlang
@@ -385,4 +387,3 @@ def coqui_tts(text, speaker_id, mspker_id, style_wav, language_id):
multlang = None
multspeak = None
return response