Installing issues

Hello,
I want to use the mozilla tts, but I’m having trouble installing and running it.
I’m in a conda environment and have run pip install -r requirements.txt . I downloaded the model and changed a few config such that they point to the right paths. Though when running python server/server.py -c server/conf.json I get the error

Traceback (most recent call last):
  File "server/server.py", line 3, in <module>
    from synthesizer import Synthesizer
  File "/mnt/sdb/TTS/server/synthesizer.py", line 8, in <module>
    from utils.text import text_to_sequence, phoneme_to_sequence
ModuleNotFoundError: No module named 'utils'

I’ve the feeling that I did something wrong when installing but I cannot figure it out. Can someone help?

Thanks

P.S.: I’m checked out into branch origin/Tacotron2-iter-260K-824c091 if that is of any use

In server/synthesizer.py add ‘TTS.’ Before every utils. Or copy paste utils into server.

First of all, thank you for your help.
I copied the utils folder into the server folder. Now I’m getting another error which is a good thing from my experience.

Traceback (most recent call last):
  File "server/server.py", line 3, in <module>
    from synthesizer import Synthesizer
  File "/mnt/sdb/TTS/server/synthesizer.py", line 8, in <module>
    from utils.text import text_to_sequence, phoneme_to_sequence
  File "/mnt/sdb/TTS/server/utils/text/__init__.py", line 5, in <module>
    from phonemizer.phonemize import phonemize
  File "/home/jesko/.conda/envs/tts/lib/python3.7/site-packages/phonemizer-2.0.1-py3.7.egg/phonemizer/phonemize.py", line 27, in <module>
  File "/home/jesko/.conda/envs/tts/lib/python3.7/site-packages/phonemizer-2.0.1-py3.7.egg/phonemizer/backend/__init__.py", line 19, in <module>
  File "/home/jesko/.conda/envs/tts/lib/python3.7/site-packages/phonemizer-2.0.1-py3.7.egg/phonemizer/backend/segments.py", line 21, in <module>
ModuleNotFoundError: No module named 'segments'

try pip install segments and then rerun the code.

install_requires=['joblib', 'segments', 'attrs>=18.1']

Phonemizer requires these python packages to run.

I’m getting huge errors when trying to install segments with pip install segments. Similar errors were present when I ran the pip install -r requirements.txt but it seemed to work anyway except for segments. Sorry for the big post, but I could not attach a txt file.

Collecting segments
  Using cached https://files.pythonhosted.org/packages/5b/a0/0c3fe64787745c39eb3f2f5f5f9ed8d008d9ef22e9d7f9f52f71ea4712f7/segments-2.1.3-py2.py3-none-any.whl
Requirement already satisfied: clldutils>=1.7.3 in /home/jesko/.conda/envs/tts/lib/python3.7/site-packages (from segments) (3.4.0)
Collecting regex
  Using cached https://files.pythonhosted.org/packages/fc/1d/13cc7d174cd2d05808abac3f5fb37433e30c4cd93b152d2a9c09c926d7e8/regex-2019.11.1.tar.gz
Requirement already satisfied: csvw>=1.5.6 in /home/jesko/.conda/envs/tts/lib/python3.7/site-packages (from segments) (1.6.0)
Requirement already satisfied: tabulate>=0.7.7 in /home/jesko/.conda/envs/tts/lib/python3.7/site-packages (from clldutils>=1.7.3->segments) (0.8.6)
Requirement already satisfied: colorlog in /home/jesko/.conda/envs/tts/lib/python3.7/site-packages (from clldutils>=1.7.3->segments) (4.0.2)
Requirement already satisfied: attrs>=18.1.0 in /home/jesko/.conda/envs/tts/lib/python3.7/site-packages (from clldutils>=1.7.3->segments) (19.3.0)
Requirement already satisfied: python-dateutil in /home/jesko/.conda/envs/tts/lib/python3.7/site-packages (from clldutils>=1.7.3->segments) (2.8.1)
Requirement already satisfied: uritemplate>=3.0.0 in /home/jesko/.conda/envs/tts/lib/python3.7/site-packages (from csvw>=1.5.6->segments) (3.0.0)
Requirement already satisfied: isodate in /home/jesko/.conda/envs/tts/lib/python3.7/site-packages (from csvw>=1.5.6->segments) (0.6.0)
Requirement already satisfied: rfc3986 in /home/jesko/.conda/envs/tts/lib/python3.7/site-packages (from csvw>=1.5.6->segments) (1.3.2)
Requirement already satisfied: six>=1.5 in /home/jesko/.conda/envs/tts/lib/python3.7/site-packages (from python-dateutil->clldutils>=1.7.3->segments) (1.13.0)
Building wheels for collected packages: regex
  Building wheel for regex (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/jesko/.conda/envs/tts/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-i7xxiu4a/regex/setup.py'"'"'; __file__='"'"'/tmp/pip-install-i7xxiu4a/regex/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-zep1yv5n --python-tag cp37
       cwd: /tmp/pip-install-i7xxiu4a/regex/
  Complete output (49 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.7
  creating build/lib.linux-x86_64-3.7/regex
  copying regex_3/__init__.py -> build/lib.linux-x86_64-3.7/regex
  copying regex_3/regex.py -> build/lib.linux-x86_64-3.7/regex
  copying regex_3/_regex_core.py -> build/lib.linux-x86_64-3.7/regex
  copying regex_3/test_regex.py -> build/lib.linux-x86_64-3.7/regex
  running build_ext
  building 'regex._regex' extension
  creating build/temp.linux-x86_64-3.7
  creating build/temp.linux-x86_64-3.7/regex_3
  gcc -pthread -B /home/jesko/.conda/envs/tts/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/jesko/.conda/envs/tts/include/python3.7m -c regex_3/_regex.c -o build/temp.linux-x86_64-3.7/regex_3/_regex.o
  regex_3/_regex.c: In function ‘folded_char_at’:
  regex_3/_regex.c:10625:9: warning: variable ‘folded_len’ set but not used [-Wunused-but-set-variable]
  10625 |     int folded_len;
        |         ^~~~~~~~~~
  regex_3/_regex.c: In function ‘fuzzy_match_group_fld’:
  regex_3/_regex.c:11503:10: warning: ‘data.new_text_pos’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  11503 |     if (!record_fuzzy(state, data.fuzzy_type, data.new_text_pos - data.step))
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  regex_3/_regex.c: In function ‘fuzzy_match_string_fld’:
  regex_3/_regex.c:11270:10: warning: ‘data.new_text_pos’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  11270 |     if (!record_fuzzy(state, data.fuzzy_type, data.new_text_pos - data.step))
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  regex_3/_regex.c: In function ‘basic_match’:
  regex_3/_regex.c:11608:10: warning: ‘data.new_text_pos’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  11608 |     if (!record_fuzzy(state, data.fuzzy_type, data.new_text_pos - data.step))
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  regex_3/_regex.c:11522:18: note: ‘data.new_text_pos’ was declared here
  11522 |     RE_FuzzyData data;
        |                  ^~~~
  regex_3/_regex.c:11369:10: warning: ‘data.new_text_pos’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  11369 |     if (!record_fuzzy(state, data.fuzzy_type, data.new_text_pos - data.step))
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  regex_3/_regex.c:11288:18: note: ‘data.new_text_pos’ was declared here
  11288 |     RE_FuzzyData data;
        |                  ^~~~
  gcc -pthread -B /home/jesko/.conda/envs/tts/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/jesko/.conda/envs/tts/include/python3.7m -c regex_3/_regex_unicode.c -o build/temp.linux-x86_64-3.7/regex_3/_regex_unicode.o
  gcc -pthread -shared -B /home/jesko/.conda/envs/tts/compiler_compat -L/home/jesko/.conda/envs/tts/lib -Wl,-rpath=/home/jesko/.conda/envs/tts/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/regex_3/_regex.o build/temp.linux-x86_64-3.7/regex_3/_regex_unicode.o -o build/lib.linux-x86_64-3.7/regex/_regex.cpython-37m-x86_64-linux-gnu.so
  /home/jesko/.conda/envs/tts/compiler_compat/ld: build/temp.linux-x86_64-3.7/regex_3/_regex.o: unable to initialize decompress status for section .debug_info
  /home/jesko/.conda/envs/tts/compiler_compat/ld: build/temp.linux-x86_64-3.7/regex_3/_regex.o: unable to initialize decompress status for section .debug_info
  /home/jesko/.conda/envs/tts/compiler_compat/ld: build/temp.linux-x86_64-3.7/regex_3/_regex.o: unable to initialize decompress status for section .debug_info
  /home/jesko/.conda/envs/tts/compiler_compat/ld: build/temp.linux-x86_64-3.7/regex_3/_regex.o: unable to initialize decompress status for section .debug_info
  build/temp.linux-x86_64-3.7/regex_3/_regex.o: file not recognized: file format not recognized
  collect2: error: ld returned 1 exit status
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for regex
  Running setup.py clean for regex
Failed to build regex
Installing collected packages: regex, segments
    Running setup.py install for regex ... error
    ERROR: Command errored out with exit status 1:
     command: /home/jesko/.conda/envs/tts/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-i7xxiu4a/regex/setup.py'"'"'; __file__='"'"'/tmp/pip-install-i7xxiu4a/regex/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ek6tf_e4/install-record.txt --single-version-externally-managed --compile
         cwd: /tmp/pip-install-i7xxiu4a/regex/
    Complete output (49 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.7
    creating build/lib.linux-x86_64-3.7/regex
    copying regex_3/__init__.py -> build/lib.linux-x86_64-3.7/regex
    copying regex_3/regex.py -> build/lib.linux-x86_64-3.7/regex
    copying regex_3/_regex_core.py -> build/lib.linux-x86_64-3.7/regex
    copying regex_3/test_regex.py -> build/lib.linux-x86_64-3.7/regex
    running build_ext
    building 'regex._regex' extension
    creating build/temp.linux-x86_64-3.7
    creating build/temp.linux-x86_64-3.7/regex_3
    gcc -pthread -B /home/jesko/.conda/envs/tts/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/jesko/.conda/envs/tts/include/python3.7m -c regex_3/_regex.c -o build/temp.linux-x86_64-3.7/regex_3/_regex.o
    regex_3/_regex.c: In function ‘folded_char_at’:
    regex_3/_regex.c:10625:9: warning: variable ‘folded_len’ set but not used [-Wunused-but-set-variable]
    10625 |     int folded_len;
          |         ^~~~~~~~~~
    regex_3/_regex.c: In function ‘fuzzy_match_group_fld’:
    regex_3/_regex.c:11503:10: warning: ‘data.new_text_pos’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    11503 |     if (!record_fuzzy(state, data.fuzzy_type, data.new_text_pos - data.step))
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    regex_3/_regex.c: In function ‘fuzzy_match_string_fld’:
    regex_3/_regex.c:11270:10: warning: ‘data.new_text_pos’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    11270 |     if (!record_fuzzy(state, data.fuzzy_type, data.new_text_pos - data.step))
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    regex_3/_regex.c: In function ‘basic_match’:
    regex_3/_regex.c:11608:10: warning: ‘data.new_text_pos’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    11608 |     if (!record_fuzzy(state, data.fuzzy_type, data.new_text_pos - data.step))
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    regex_3/_regex.c:11522:18: note: ‘data.new_text_pos’ was declared here
    11522 |     RE_FuzzyData data;
          |                  ^~~~
    regex_3/_regex.c:11369:10: warning: ‘data.new_text_pos’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    11369 |     if (!record_fuzzy(state, data.fuzzy_type, data.new_text_pos - data.step))
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    regex_3/_regex.c:11288:18: note: ‘data.new_text_pos’ was declared here
    11288 |     RE_FuzzyData data;
          |                  ^~~~
    gcc -pthread -B /home/jesko/.conda/envs/tts/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/jesko/.conda/envs/tts/include/python3.7m -c regex_3/_regex_unicode.c -o build/temp.linux-x86_64-3.7/regex_3/_regex_unicode.o
    gcc -pthread -shared -B /home/jesko/.conda/envs/tts/compiler_compat -L/home/jesko/.conda/envs/tts/lib -Wl,-rpath=/home/jesko/.conda/envs/tts/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/regex_3/_regex.o build/temp.linux-x86_64-3.7/regex_3/_regex_unicode.o -o build/lib.linux-x86_64-3.7/regex/_regex.cpython-37m-x86_64-linux-gnu.so
    /home/jesko/.conda/envs/tts/compiler_compat/ld: build/temp.linux-x86_64-3.7/regex_3/_regex.o: unable to initialize decompress status for section .debug_info
    /home/jesko/.conda/envs/tts/compiler_compat/ld: build/temp.linux-x86_64-3.7/regex_3/_regex.o: unable to initialize decompress status for section .debug_info
    /home/jesko/.conda/envs/tts/compiler_compat/ld: build/temp.linux-x86_64-3.7/regex_3/_regex.o: unable to initialize decompress status for section .debug_info
    /home/jesko/.conda/envs/tts/compiler_compat/ld: build/temp.linux-x86_64-3.7/regex_3/_regex.o: unable to initialize decompress status for section .debug_info
    build/temp.linux-x86_64-3.7/regex_3/_regex.o: file not recognized: file format not recognized
    collect2: error: ld returned 1 exit status
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/jesko/.conda/envs/tts/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-i7xxiu4a/regex/setup.py'"'"'; __file__='"'"'/tmp/pip-install-i7xxiu4a/regex/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ek6tf_e4/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

Are you using a fresh install OS? Do you have python3-dev?

sudo apt-get install python3-dev

I’ve bee using this for a while. I’m on a Arch based distro (manjaro) and according to the forum entries all the packages are already built with the headers which debian based distros use in the -dev packages.

Interesting. I don’t think I’d be able to help you here. Sorry.

Ok, thanks. Maybe I will try to do it in the docker container.