Open ryanull24 opened 3 weeks ago
deepspeed is probably being removed from default installations next release, you can comment it out of requirements.txt and reinstall.
thanks for the report!
Update: pip remove deepspeed
if you need deepspeed you also need to install the cuda-toolkit for your os, which is perhaps more complex than installing the rest of the software...
I do not really need deepspeed, I commented it out, and I am still getting the same 'no Module named TTS' when trying to run speech.py
And something else to note. On windows, piper-tts seems not to be able to be installed because of piper-phonemize
ERROR: Cannot install -r requirements.txt (line 4) because these package versions have conflicting dependencies.
The conflict is caused by:
piper-tts 1.2.0 depends on piper-phonemize~=1.1.0
piper-tts 1.1.0 depends on piper-phonemize~=1.0.0
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip to attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
But this is an issue with piper-phonemize on Windows, looking at their github.
Is this install in wsl2? I'm not much help with windows, sorry, but if you can use them, the docker images should work for you with docker desktop + wsl2.
No, I m trying to use it standalone, on Windows, no docker, no anything like that, for 2 reasons.
I ll see if I can find a solution. It might be a me issue
I managed to get it to start - thanks chatGPT, by adding
try:
from TTS.tts.configs.xtts_config import XttsConfig
from TTS.tts.models.xtts import Xtts
from TTS.utils.manage import ModelManager
except ModuleNotFoundError as e:
print(f"ModuleNotFoundError: {e}")
Now it starts, without any arguments, but then, after connecting to Open WebUI, and trying TTS, I get some more errors:
Traceback (most recent call last):
File "C:\Users\USER\AppData\Roaming\Python\Python311\site-packages\uvicorn\protocols\http\httptools_impl.py", line 435, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USER\AppData\Roaming\Python\Python311\site-packages\uvicorn\middleware\proxy_headers.py", line 78, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USER\AppData\Roaming\Python\Python311\site-packages\fastapi\applications.py", line 1054, in __call__
await super().__call__(scope, receive, send)
File "C:\Users\USER\AppData\Roaming\Python\Python311\site-packages\starlette\applications.py", line 123, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\USER\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\errors.py", line 186, in __call__
raise exc
File "C:\Users\USER\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\errors.py", line 164, in __call__
await self.app(scope, receive, _send)
File "C:\Users\USER\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\base.py", line 189, in __call__
with collapse_excgroups():
File "C:\Program Files\Python311\Lib\contextlib.py", line 158, in __exit__
self.gen.throw(typ, value, traceback)
File "C:\Users\USER\AppData\Roaming\Python\Python311\site-packages\starlette\_utils.py", line 93, in collapse_excgroups
raise exc
File "C:\Users\USER\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\base.py", line 191, in __call__
response = await self.dispatch_func(request, call_next)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\Project\LLM\openedai-speech\openedai.py", line 126, in log_requests
response = await call_next(request)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USER\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\base.py", line 165, in call_next
raise app_exc
File "C:\Users\USER\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\base.py", line 151, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "C:\Users\USER\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\cors.py", line 85, in __call__
await self.app(scope, receive, send)
File "C:\Users\USER\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\exceptions.py", line 65, in __call__
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "C:\Users\USER\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 64, in wrapped_app
raise exc
File "C:\Users\USER\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\USER\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 756, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\USER\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 776, in app
await route.handle(scope, receive, send)
File "C:\Users\USER\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 297, in handle
await self.app(scope, receive, send)
File "C:\Users\USER\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 77, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "C:\Users\USER\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 64, in wrapped_app
raise exc
File "C:\Users\USER\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\USER\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 72, in app
response = await func(request)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\USER\AppData\Roaming\Python\Python311\site-packages\fastapi\routing.py", line 278, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\USER\AppData\Roaming\Python\Python311\site-packages\fastapi\routing.py", line 191, in run_endpoint_function
return await dependant.call(**values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\Project\LLM\openedai-speech\speech.py", line 225, in generate_speech
tts_proc = subprocess.Popen(tts_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\subprocess.py", line 1026, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\Python311\Lib\subprocess.py", line 1538, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] The system cannot find the file specified
Now trying to run speech.py with arguments, for example --xtts_device cpu --preload xtts, I m getting:
Traceback (most recent call last):
File "F:\Project\LLM\openedai-speech\speech.py", line 339, in <module>
xtts = xtts_wrapper(args.preload, device=args.xtts_device, unload_timer=args.unload_timer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\Project\LLM\openedai-speech\speech.py", line 61, in __init__
model_path = ModelManager().download_model(model_name)[0]
^^^^^^^^^^^^
NameError: name 'ModelManager' is not defined
At this point, I m pretty sure I m doing something wrong.
it may need to be fixed to run piper.exe instead of piper, but honestly I think you're the first to try directly in windows.
Try making sure you're using python 3.11, piper-phonemize does not work with python 3.12 yet.
When trying to run speech. py I am getting this error:
I am on Windows 11 with python 3.11.9
I really don t have a lot of experience with python and running programs, but what I did was:
git clone repo create a virtual environment .venv activate said virtual environment .venv\Scripts\Activate pip install -r requirements.txt run speech.py - getting TTS module error go back to virtual environment and install TTS get above error
Also an error when installing deepspeed with pip install -r requirements.txt
I made sure torch was installed under the same virtual environment.