No module named TTS

Hello everyone, I was just playing around with mozilla tools and wants to use moz TTS for my project.

  1. I clone the TTS repository
  2. Run “python develop” successfully
  3. Also downloaded best_model.pth.tar and config.json file.
  4. Store these files in a folder named tts_model inside tts folder.
  5. In the same folder tts_model I’m using file.
    But everytime I run file, I got this error
    "" Traceback (most recent call last):
    ** File “”, line 7, in **
    ** from TTS.models.tacotron import Tacotron**
    ModuleNotFoundError: No module named ‘TTS’""
    I tried something available on the discussion but still can’t come up with the solution. can someone please help me out in this.
    I’m using Windows 7
    Thank you so much.
    Using visual studio for IDE
    You can find the error below for better understanding.


You have to install TTS system wide first. Run python3 develop

Thank you for the positive response.
Actually I run this command successfully, still getting the same error.
You can find the glimpse of the output after running “python develop”

running this command on the folder "TTS"

I hope you understand my concern

Have you follow the steps at ?

Thank you so much for your reply.
I’m afraid that I didn’t follow the steps in the link suggested by you.
In place of that, I was following the below link.

In this link, I was following step 3
Step 3 is used for mozilla TTS. If you find, this is something wrong which I’m doing then please guide me in the same.
Thanks in advance.

Well, the minimal example for me was this

from deepspeech import Model
import scipy

filename = "/home/tyoc213/Documentos/github/fairseq/hello.wav"
samplerate, data =

ds = Model('/home/tyoc213/Descargas/DATASET/deepspeech-0.7.4-models.pbmm') # , N_FEATURES) #, N_CONTEXT) #, 'model/alphabet.txt' , BEAM_WIDTH)

recognized_text = ds.stt(data)
print(f"El texto reconocido es <<{recognized_text}>>")    

It ouputs WavFileWarning: Reached EOF prematurely; finished at 87274 bytes, expected 2147418156 bytes from header.
  samplerate, data =
TensorFlow: v1.15.0-24-gceb46aa
DeepSpeech: v0.7.4-0-gfcd9563
2020-07-03 23:53:06.827760: I tensorflow/core/platform/] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
El texto reconocido es <<fholo>>

from 1 of the the pinned post

Sorry to say, but I’m trying TTS, and I’m afraid that this is the example for deepspeech STT. Are you having anything related to TTS?

Oh, yes, Indeed!!!, sorry for that :slight_smile:

If I get something working, I will get back and post it.

Yeah working with TTS.
Trying to follow step 3 from this blog.

Hey! Have you solved the problem now? I have the same problem as you. Please let me know if you have a solution. Thank you very much!

A quick fix to this is export PYTHONPATH=/path/to/folder/TTS/, e.g when you have TTS installed in “/home/myuser/TTS” your PYTHONPATH is “/home/myuser”.