Skip to content

mac install flashtts fail #98

@fastfading

Description

@fastfading

this project is the only project that could make tts on mac so fast. however ,looks like it is out of maintain for a while.
wish it could be fixed @HuiResearch

conda uv all have the same issue .

conda create -n flashtts python=3.11

pip install flashtts

Error 1

   building '_pywrapfst' extension
      creating build/temp.macosx-11.0-arm64-cpython-311/extensions
      clang++ -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/xx/miniconda3/envs/flashtts/include -arch arm64 -fPIC -O2 -isystem /Users/xx/miniconda3/envs/flashtts/include -arch arm64 -I/Users/xx/miniconda3/envs/flashtts/include/python3.11 -c extensions/_pywrapfst.cpp -o build/temp.macosx-11.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.12
      extensions/_pywrapfst.cpp:1190:10: fatal error: 'fst/util.h' file not found
       1190 | #include <fst/util.h>
            |          ^~~~~~~~~~~~
      1 error 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

if I solve it by
brew install openfst
export CFLAGS="-I$(brew --prefix openfst)/include"
export CXXFLAGS="-I$(brew --prefix openfst)/include"
export LDFLAGS="-L$(brew --prefix openfst)/lib"
then

Error 2

      building '_pynini' extension
      clang++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /Users/xx/miniconda3/envs/flashtts/include -arch arm64 -fPIC -O2 -isystem /Users/xx/miniconda3/envs/flashtts/include -arch arm64 -Iextensions -I/Users/xx/miniconda3/envs/flashtts/include/python3.12 -c extensions/_pynini.cpp -o build/temp.macosx-11.0-arm64-cpython-312/extensions/_pynini.o -std=c++17 -Wno-register -Wno-deprecated-declarations -Wno-unused-function -Wno-unused-local-typedefs -funsigned-char -stdlib=libc++ -mmacosx-version-min=10.12
      In file included from extensions/_pynini.cpp:1251:
      In file included from extensions/stringmapscript.h:31:
      extensions/stringmap.h:185:26: error: no member named 'StringJoin' in namespace 'fst'; did you mean 'StrJoin'?
        185 |                  << fst::StringJoin(line, "\t") << "`";
            |                     ~~~~~^~~~~~~~~~
            |                          StrJoin
      /Users/xx/miniconda3/envs/flashtts/include/fst/compat.h:204:13: note: 'StrJoin' declared here
        204 | std::string StrJoin(const std::vector<S> &elements, std::string_view delim) {
            |             ^
      In file included from extensions/_pynini.cpp:1251:
      In file included from extensions/stringmapscript.h:31:
      extensions/stringmap.h:230:26: error: no member named 'StringJoin' in namespace 'fst'; did you mean 'StrJoin'?
        230 |                  << fst::StringJoin(line, "\t") << "`";
            |                     ~~~~~^~~~~~~~~~
            |                          StrJoin
      /Users/xx/miniconda3/envs/flashtts/include/fst/compat.h:204:13: note: 'StrJoin' declared here
        204 | std::string StrJoin(const std::vector<S> &elements, std::string_view delim) {
            |             ^
      2 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
Failed to build pynini
error: failed-wheel-build-for-install

× Failed to build installable wheels for some pyproject.toml based projects
╰─> pynini

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions