AttributeError: 'AttrDict' object has no attribute 'gst'

I am trying to synthesize a sentence using the following command

!python /content/TTS/mozilla_voice_tts/bin/synthesize.py “Hello world” “/content/drive/My Drive/parallel_wavegan_config.json” “/content/drive/pwgan-August-26-2020_04+21PM-3424181/checkpoint_690000.pth.tar” “/content/TTS/output” --speaker_fileid 1

Then i receive this error, which i cant find any reference to. What value shoud “gst” be?

2020-08-27 10:19:18.236688: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1

Setting up Audio Processor…
| > sample_rate:22050
| > num_mels:80
| > min_level_db:-100
| > frame_shift_ms:None
| > frame_length_ms:None
| > ref_level_db:0
| > fft_size:1024
| > power:None
| > preemphasis:0.0
| > griffin_lim_iters:None
| > signal_norm:True
| > symmetric_norm:True
| > mel_fmin:50.0
| > mel_fmax:7600.0
| > spec_gain:1.0
| > stft_pad_mode:reflect
| > max_norm:4.0
| > clip_norm:True
| > do_trim_silence:True
| > trim_db:60
| > do_sound_norm:False
| > stats_path:None
| > hop_length:256
| > win_length:1024
Using model: Tacotron2
Traceback (most recent call last):
File “/content/TTS/mozilla_voice_tts/bin/synthesize.py”, line 122, in
model = setup_model(num_chars, num_speakers, C, speaker_embedding_dim)
File “/content/TTS/mozilla_voice_tts/tts/utils/generic_utils.py”, line 84, in setup_model
gst_embedding_dim=c.gst[‘gst_embedding_dim’],
AttributeError: ‘AttrDict’ object has no attribute ‘gst’

You may not have got gst in your config file. Have a look here https://github.com/mozilla/TTS/blob/dev/mozilla_voice_tts/tts/configs/config.json to see the options. I’m guessing you should turn the gst off with use_gst as False (assuming you aren’t trying to use it)

Yes, i am not trying to use it, but when running the command, it ask for it anyway. I did actually set the use_gst as false, before this error appeared

"use_gst": true,       			    // use global style tokens
"gst":	{			                // gst parameter if gst is enabled
    "gst_style_input": null,        // Condition the style input either on a
                                    // -> wave file [path to wave] or
                                    // -> dictionary using the style tokens {'token1': 'value', 'token2': 'value'} example {"0": 0.15, "1": 0.15, "5": -0.15}
                                    // with the dictionary being len(dict) <= len(gst_style_tokens).
    "gst_embedding_dim": 512,
    "gst_num_heads": 4,
    "gst_style_tokens": 10
	},

do you have this part in your config?

No, you are right

I only added parameters as i went along and got error messages. I am not very skilled as a developer (not really a developer at all).

I just had this line
“use_gst”: false, // TACOTRON ONLY: use global style tokens

Okay, found the problem i guess ^^
You need all the parameters in the config, even if you are not going to use them.
Just use the config file Neil linked and adjust it to your needs.