2noise / ChatTTS

A generative speech model for daily dialogue.
https://2noise.com
Other
27.81k stars 3.02k forks source link

mac requirements install errors #110

Closed devskale closed 4 weeks ago

devskale commented 1 month ago

on a mac i get error when installing requirement nemo_text_processing

mac air M2 python 3.11 arm

  clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -I/opt/homebrew/include -I/Users/jwa/code/TTS/ChatTTS/.venv/include -I/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c extensions/_pywrapfst.cpp -o build/temp.macosx-14.0-arm64-cpython-311/extensions/_pywrapfst.o -std=c++17 -Wno-register -Wno-deprecated-declarations -Wno-unused-function -Wno-unused-local-typedefs -funsigned-char -stdlib=libc++ -mmacosx-version-min=10.7
  In file included from extensions/_pywrapfst.cpp:1291:
  In file included from /opt/homebrew/include/fst/util.h:44:
  In file included from /opt/homebrew/include/fst/flags.h:33:
  /opt/homebrew/include/fst/lock.h:50:8: error: 'shared_mutex' is unavailable: introduced in macOS 10.12
    std::shared_mutex mu_;
         ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/shared_mutex:181:58: note: 'shared_mutex' has been explicitly marked unavailable here
  class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_SHARED_MUTEX shared_mutex
                                                           ^
  extensions/_pywrapfst.cpp:21179:24: error: no member named 'SymbolTableTextOptions' in namespace 'fst'; did you mean 'SymbolTableToString'?
    std::unique_ptr<fst::SymbolTableTextOptions>  __pyx_v__opts;
                    ~~~~~^~~~~~~~~~~~~~~~~~~~~~
                         SymbolTableToString
  /opt/homebrew/include/fst/symbol-table.h:591:6: note: 'SymbolTableToString' declared here
  void SymbolTableToString(const SymbolTable *table, std::string *result);
       ^
  extensions/_pywrapfst.cpp:21179:19: error: template argument for template type parameter must be a type
    std::unique_ptr<fst::SymbolTableTextOptions>  __pyx_v__opts;
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
  /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/c++/v1/__memory/unique_ptr.h:123:17: note: template parameter is declared here
  template <class _Tp, class _Dp = default_delete<_Tp> >
                  ^
  extensions/_pywrapfst.cpp:21202:32: error: no type named 'SymbolTableTextOptions' in namespace 'fst'
    __pyx_v__opts.reset(new fst::SymbolTableTextOptions(__pyx_v_allow_negative_labels));
                            ~~~~~^
  extensions/_pywrapfst.cpp:60012:19: error: no matching function for call to 'CompileInternal'
    __pyx_v__tfst = fst::script::CompileInternal((*__pyx_v_self->_sstrm), __pyx_k_pywrapfst, __pyx_v_self->_fst_type, __pyx_v_self->_arc_type, __pyx_v_self->_isymbols, __pyx_v_self->_osymbols, __pyx_v_self->_ssymbols, __pyx_v_self->_acceptor, __pyx_v_self->_keep_isymbols, __pyx_v_self->_keep_osymbols, __pyx_v_self->_keep_state_numbering, __pyx_v_self->_allow_negative_labels);
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  /opt/homebrew/include/fst/script/compile.h:93:27: note: candidate function not viable: requires 11 arguments, but 12 were provided
  std::unique_ptr<FstClass> CompileInternal(
                            ^
  /opt/homebrew/include/fst/script/compile.h:64:6: note: candidate function template not viable: requires single argument 'args', but 12 arguments were provided
  void CompileInternal(FstCompileArgs *args) {
       ^
  5 errors generated.
  error: command '/usr/bin/clang' failed with exit code 1
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pynini Running setup.py clean for pynini Failed to build pynini ERROR: Could not build wheels for pynini, which is required to install pyproject.toml-based projects (.venv) jwa@jMacAir ChatTTS % pip install --ignore-installed llvmlite -e . Obtaining file:///Users/jwa/code/TTS/ChatTTS ERROR: file:///Users/jwa/code/TTS/ChatTTS does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.

TTdogCC commented 1 month ago

i was able to overcome this pynini error by installing the required version manually, according to the requirements.txt file the pynini version is 2.1.5. i had 2.1.6 installed and when i corrected the version it worked for me. Python version I used was 3.8. i want the MPS support thought because it only runs on cpu not gpu

codingl2k1 commented 1 month ago

I used conda install pynini==2.1.5, then pip install nemo_text_processing was successful.

fastfading commented 4 weeks ago

/opt/homebrew/opt/openfst/include/fst/lock.h:50:8: error: 'shared_mutex' is unavailable: introduced in macOS 10.12

问题在这里 mac 过不去。

ToviHe commented 3 weeks ago

我用 conda install -c conda-forge pynini==2.1.5 后,可以安装。注意使用conda-forge的仓库,默认anaconda好像找不到包