Docker missing espeak

So, I’m back. This time with a computer that has a actual GPU. And I got farther than before. (It’s much easier to get started now.)

I can get the docker server running, however it seems espeak is somehow missing from the container.

 > Loading model ...
 | > model config:  ./server/config.json
 | > model file:  ./server/checkpoint_261000.pth.tar
 > Setting up Audio Processor...
 | > bits:None
 | > sample_rate:22050
 | > num_mels:80
 | > min_level_db:-100
 | > frame_shift_ms:12.5
 | > frame_length_ms:50
 | > ref_level_db:20
 | > num_freq:1025
 | > power:1.5
 | > preemphasis:0.98
 | > griffin_lim_iters:60
 | > signal_norm:True
 | > symmetric_norm:False
 | > mel_fmin:0.0
 | > mel_fmax:8000.0
 | > max_norm:1.0
 | > clip_norm:True
 | > do_trim_silence:True
 | > n_fft:2048
 | > hop_length:275
 | > win_length:1102
 > Using model: Tacotron2
 * Serving Flask app "server" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: on
[INFO]  * Running on http://0.0.0.0:5002/ (Press CTRL+C to quit)
[INFO]  * Restarting with stat
 > Loading model ...
 | > model config:  ./server/config.json
 | > model file:  ./server/checkpoint_261000.pth.tar
 > Setting up Audio Processor...
 | > bits:None
 | > sample_rate:22050
 | > num_mels:80
 | > min_level_db:-100
 | > frame_shift_ms:12.5
 | > frame_length_ms:50
 | > ref_level_db:20
 | > num_freq:1025
 | > power:1.5
 | > preemphasis:0.98
 | > griffin_lim_iters:60
 | > signal_norm:True
 | > symmetric_norm:False
 | > mel_fmin:0.0
 | > mel_fmax:8000.0
 | > max_norm:1.0
 | > clip_norm:True
 | > do_trim_silence:True
 | > n_fft:2048
 | > hop_length:275
 | > win_length:1102
 > Using model: Tacotron2
[WARNING]  * Debugger is active!
[INFO]  * Debugger PIN: 298-132-932
[INFO] 172.17.0.1 - - [17/Jan/2020 01:32:23] "GET / HTTP/1.1" 200 -
[INFO] 172.17.0.1 - - [17/Jan/2020 01:32:24] "GET /favicon.ico HTTP/1.1" 404 -
 > Model input: Hello World!
Hello World!.
[INFO] 172.17.0.1 - - [17/Jan/2020 01:32:33] "GET /api/tts?text=Hello%20World! HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/Flask-1.1.1-py3.6.egg/flask/app.py", line 2463, in __call__
    return self.wsgi_app(environ, start_response)
  File "/usr/local/lib/python3.6/dist-packages/Flask-1.1.1-py3.6.egg/flask/app.py", line 2449, in wsgi_app
    response = self.handle_exception(e)
  File "/usr/local/lib/python3.6/dist-packages/Flask-1.1.1-py3.6.egg/flask/app.py", line 1866, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.6/dist-packages/Flask-1.1.1-py3.6.egg/flask/_compat.py", line 39, in reraise
    raise value
  File "/usr/local/lib/python3.6/dist-packages/Flask-1.1.1-py3.6.egg/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.6/dist-packages/Flask-1.1.1-py3.6.egg/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.6/dist-packages/Flask-1.1.1-py3.6.egg/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.6/dist-packages/Flask-1.1.1-py3.6.egg/flask/_compat.py", line 39, in reraise
    raise value
  File "/usr/local/lib/python3.6/dist-packages/Flask-1.1.1-py3.6.egg/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.6/dist-packages/Flask-1.1.1-py3.6.egg/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/srv/app/server/server.py", line 28, in tts
    data = synthesizer.tts(text)
  File "/srv/app/server/synthesizer.py", line 58, in tts
    phoneme_to_sequence(text, text_cleaner, self.config.phoneme_language, self.config.enable_eos_bos_chars),
  File "/srv/app/utils/text/__init__.py", line 54, in phoneme_to_sequence
    phonemes = text2phone(clean_text, language)
  File "/srv/app/utils/text/__init__.py", line 30, in text2phone
    ph = phonemize(text, separator=seperator, strip=False, njobs=1, backend='espeak', language=language)
  File "/usr/local/lib/python3.6/dist-packages/phonemizer-2.0.1-py3.6.egg/phonemizer/phonemize.py", line 149, in phonemize
    logger=logger)
  File "/usr/local/lib/python3.6/dist-packages/phonemizer-2.0.1-py3.6.egg/phonemizer/backend/espeak.py", line 48, in __init__
    super(self.__class__, self).__init__(language, logger=logger)
  File "/usr/local/lib/python3.6/dist-packages/phonemizer-2.0.1-py3.6.egg/phonemizer/backend/base.py", line 39, in __init__
    '{} not installed on your system'.format(self.name()))
RuntimeError: espeak not installed on your system

This is from the Tacotron2-iter-260K-824c091 branch and the 261000 checkpoint.

Ended up changing the Dockerfile so it installs espeak. Also made a pull request.

Hey can u share your config.json file and whl file for this model… since am unable to get it working :frowning: would be of great help

I don’t have ether, I used the docker file.

Here is a gist I made for you with some stuff that may help.

you can send a PR as you fix this in docker.