FlorianEagox / WeeaBlind

A program to dub non-english media with modern AI speech synthesis, diarization, and voice cloning!
https://tessapainter.com/project/WeeaBlind
284 stars 26 forks source link

TypeError: Descriptors cannot be created directly. | Win11 #20

Open LightC0de opened 7 months ago

LightC0de commented 7 months ago

Hello esteemed developer. Firstly, I'd like to express my gratitude for creating and maintaining this project. Thanks to individuals like you, OpenSource thrives!

I followed the instructions in the readme, but unfortunately, I still encountered an error.

My ENV Win 11 x64 - Python 3.10 (from Microsoft Store). FFmpeg, Espeak-NG, and MSVC Build Tools are installed. My GPU is an Nvidia RTX 4070 Ti.

Steps to reproduce the error:

  1. git clone https://github.com/FlorianEagox/weeablind.git
  2. cd weeablind
  3. python3.10 -m venv venv
  4. .\venv\Scripts\activate
  5. pip install -r requirements-win-310.txt --no-deps
  6. python weeablind.py

Error in the console:

C:\Users\Danil\dev\weeablind\output\sample.wav
espeak [WinError 2] The system cannot find the file specified
espeakng [WinError 2] The system cannot find the file specified
torchvision is not available - cannot save figures
C:\Users\Danil\dev\weeablind\venv\lib\site-packages\pyannote\audio\core\io.py:43: UserWarning: torchaudio._backend.set_audio_backend has been deprecated. With dispatcher enabled, this function is no-op. You can remove the function call.
  torchaudio.set_audio_backend("soundfile")
2024-04-03 22:55:50.907235: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2024-04-03 22:55:50.907388: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Traceback (most recent call last):
  File "C:\Users\Danil\dev\weeablind\weeablind.py", line 6, in <module>
    from tabs.ListStreams import ListStreamsTab
  File "C:\Users\Danil\dev\weeablind\tabs\ListStreams.py", line 3, in <module>
    import vocal_isolation
  File "C:\Users\Danil\dev\weeablind\vocal_isolation.py", line 4, in <module>
    from spleeter.separator import Separator
  File "C:\Users\Danil\dev\weeablind\venv\lib\site-packages\spleeter\separator.py", line 26, in <module>
    import tensorflow as tf  # type: ignore
  File "C:\Users\Danil\dev\weeablind\venv\lib\site-packages\tensorflow\__init__.py", line 37, in <module>
    from tensorflow.python.tools import module_util as _module_util
  File "C:\Users\Danil\dev\weeablind\venv\lib\site-packages\tensorflow\python\__init__.py", line 37, in <module>
    from tensorflow.python.eager import context
  File "C:\Users\Danil\dev\weeablind\venv\lib\site-packages\tensorflow\python\eager\context.py", line 29, in <module>
    from tensorflow.core.framework import function_pb2
  File "C:\Users\Danil\dev\weeablind\venv\lib\site-packages\tensorflow\core\framework\function_pb2.py", line 16, in <module>
    from tensorflow.core.framework import attr_value_pb2 as tensorflow_dot_core_dot_framework_dot_attr__value__pb2
  File "C:\Users\Danil\dev\weeablind\venv\lib\site-packages\tensorflow\core\framework\attr_value_pb2.py", line 16, in <module>
    from tensorflow.core.framework import tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__pb2
  File "C:\Users\Danil\dev\weeablind\venv\lib\site-packages\tensorflow\core\framework\tensor_pb2.py", line 16, in <module>
    from tensorflow.core.framework import resource_handle_pb2 as tensorflow_dot_core_dot_framework_dot_resource__handle__pb2
  File "C:\Users\Danil\dev\weeablind\venv\lib\site-packages\tensorflow\core\framework\resource_handle_pb2.py", line 16, in <module>
    from tensorflow.core.framework import tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2
  File "C:\Users\Danil\dev\weeablind\venv\lib\site-packages\tensorflow\core\framework\tensor_shape_pb2.py", line 36, in <module>
    _descriptor.FieldDescriptor(
  File "C:\Users\Danil\dev\weeablind\venv\lib\site-packages\google\protobuf\descriptor.py", line 621, in __new__
    _message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates

Please let me know how I could avoid such an error? Perhaps I did something wrong.

FlorianEagox commented 7 months ago

Hi there, thank you so much for the encouragement and for checking out my software. If you do

pip install protobuf==3.20

That usually fixes the last issue. Idk why it's still trying to upgrade that higher even though I explicitly specify it

If you want to test the application until I resolve this, you can just install requirements-min.txt