Error when running example 'Usage' code #6

by GourabHazra - opened

Traceback (most recent call last):
File "c:/Users/Admin/Desktop/Projects/NLP_Cron/cron_audio_test.py", line 27, in
generator = task.build_generator(model, cfg)
File "C:\Users\Admin\Desktop\Projects\NLP_Cron\cronenv\lib\site-packages\fairseq\tasks\text_to_speech.py", line 151, in build_generator
model = models[0]
TypeError: 'FastSpeech2Model' object is not subscriptable

I get this error when running on windows 10 in a virtual environment.

Use the model=models it worked for me