Error with FAVE Extract

164 views
Skip to first unread message

Alida Chevalier

unread,
Aug 10, 2016, 3:13:29 AM8/10/16
to FAVE (Force Alignment and Vowel Extraction) Users Group
Hello everyone,

I had a similar question a while ago, though I can't seem to trace the answer for it. Could someone please help me decode (and fix) the following error? I realise it's a problem with a missing '=' character somewhere in the TG, but I can't recall how to find or how to fix it.

Sorry about that!

All the best,
Alida


Read CMU phone set.
Speech software to be used is Praat.
Sound editor to be used is sox.
Read means and covs files for the Mahalanobis method.
Traceback (most recent call last):
  File "bin/extractFormants.py", line 2396, in <module>
    extractFormants(wavInput, tgInput, output, opts)
  File "bin/extractFormants.py", line 2167, in extractFormants
    tg.read(tgFile)
  File "/Applications/FAVE-extract/bin/praat.py", line 539, in read
    float(text.readline().strip().split('=')[1].strip()), 3)  # line reads "xmin = xxx.xxxxx"

IndexError: list index out of range


Keelan Evanini

unread,
Aug 10, 2016, 7:32:29 AM8/10/16
to fave-...@googlegroups.com
Hi Alida,

My first approach to troubleshooting this would be to add a print statement to praat.py to print out the lines of the TextGrid file as they are being read in.  That would help verify that there is a formatting issue with the TextGrid file.  If you send along your TextGrid file, I can try this out and send you the results.

--Keelan

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+unsubscribe@googlegroups.com.
To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/fave-users/e5a50990-9a17-41d5-99a6-09098676df4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alida Chevalier

unread,
Aug 10, 2016, 8:39:18 AM8/10/16
to fave-...@googlegroups.com
Thanks Keelan, that would be so great! I will send you a private email.

Best,
Alida



For more options, visit https://groups.google.com/d/optout.



--
Dr Alida Chevalier
Junior Research Fellow
SARChI, Linguistics Section
School of African and Gender Studies, Anthropology and Linguistics
University of Cape Town
021 650 5907

Keelan Evanini

unread,
Aug 13, 2016, 3:03:02 PM8/13/16
to fave-...@googlegroups.com
Hi Alida,

Thanks for sending me your TextGrid file.  After adding a print statement before line 539 in praat.py to print out each line as it is processed, I found out that the issue was with the interval 403:

        intervals [403]:
            xmin = 146.703
            xmax = 146.72091856991668
            text = "HH

"
        intervals [404]:
            xmin = 146.72091856991668
            xmax = 146.813
            text = "AE1"

Note the two newline characters after "HH.  This caused praat.py to crash, since it was expecting to find the xmin value in a line that was empty.  After I removed these two newline characters, I was able to successfully read in the TextGrid file (there were no other formatting errors in it).  Here is the modified version that should work for you:

        intervals [403]:
            xmin = 146.703
            xmax = 146.72091856991668
            text = "HH"
        intervals [404]:
            xmin = 146.72091856991668
            xmax = 146.813
            text = "AE1"

Please try running FAVE-extract again with the modified TextGrid file to verify that this solves your issue.  In the future, it would be good to modify praat.py to provide more helpful feedback to users about formatting errors in the input TextGrid files.  I've created an issue about this (https://github.com/JoFrhwld/FAVE/issues/42).

Thanks,
Keelan

Alida Chevalier

unread,
Aug 14, 2016, 8:46:37 AM8/14/16
to fave-...@googlegroups.com
Thanks very very much, Keelan! I appreciate the help a lot!

All the best,
Alida



For more options, visit https://groups.google.com/d/optout.
Message has been deleted

Jenni Thompson

unread,
Apr 3, 2017, 7:46:11 PM4/3/17
to FAVE (Force Alignment and Vowel Extraction) Users Group
Hello everyone,

Sorry to be a bother, I found this google group whilst having the same problem with FAVE-extract. I am a final year student at the University of Manchester who has been using the program for my dissertation. Was this issue solved easily? And is anyone possibly able to help me fix this error?

My error message reads:

Extracting Formants
[---------Traceback (most recent call last):                                                         ]
  File "bin/extractFormants.py", line 2396, in <module>
    extractFormants(wavInput, tgInput, output, opts)
  File "bin/extractFormants.py", line 2344, in extractFormants
    formantPredictionMethod, measurementPointMethod, nFormants, maxFormant, windowSize, preEmphasis, padBeg, padEnd, speaker)
  File "bin/extractFormants.py", line 916, in getVowelMeasurement
    formantPredictionMethod, padBeg, padEnd, means, covs)
  File "bin/extractFormants.py", line 1114, in measureVowel
    f1, f2, f3, b1, b2, b3, winnerIndex = predictF1F2(phone, selectedpoles, selectedbandwidths, means, covs)
  File "bin/extractFormants.py", line 1664, in predictF1F2
    f3 = selectedpoles[2][2]
IndexError: list index out of range

 Any help you could provide would be greatly appreciated, so close to having all my data extracted by FAVE and it's giving me this error on the very last one! Never used anything like this before and not quite sure what to do at this point!

Kind Regards,

Jenni Thompson

Josef Fruehwald

unread,
Apr 4, 2017, 11:03:07 AM4/4/17
to FAVE (Force Alignment and Vowel Extraction) Users Group
Hi Jenni,

I think your issue is a bit different from Alida's. I think I might understand what's going on here, but could you attach your config.txt file that you're using?

-Joe

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.

Jenni Thompson

unread,
Apr 4, 2017, 12:51:41 PM4/4/17
to fave-...@googlegroups.com
Hi Joe,

Thanks so much for your help, I've attached the config.txt file

Best wishes,

Jenni

To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+unsubscribe@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.
config.txt

Josef Fruehwald

unread,
Apr 5, 2017, 7:39:22 AM4/5/17
to fave-...@googlegroups.com
Ok, this looks in order, except you probably want to change the bottom line from "phila" to "NorthAmerican."

The problem looks like FAVE-extract hasn't successfully read in a file called 'means.txt'. This file should be in the main FAVE-extract directory, along with config.txt.

Can I double check that you've put the audio file and the textgrid in the FAVE-extract directory, and run it like so:

python bin/extractFormants.py +config.txt audio.wav grid.TextGrid output

-Joe

To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.
--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.

Jenni Thompson

unread,
Apr 5, 2017, 1:22:49 PM4/5/17
to fave-...@googlegroups.com
Hi Joe,

I've attached a picture of my extract directory so you can check everything is in the right place, however everything you have mentioned is there a far as I'm aware.

I ran the file as you recommended and it returned:

Extracting Formants
[---------Traceback (most recent call last):                                                         ]
  File "bin/extractFormants.py", line 2396, in <module>
    extractFormants(wavInput, tgInput, output, opts)
  File "bin/extractFormants.py", line 2344, in extractFormants
    formantPredictionMethod, measurementPointMethod, nFormants, maxFormant, windowSize, preEmphasis, padBeg, padEnd, speaker)
  File "bin/extractFormants.py", line 916, in getVowelMeasurement
    formantPredictionMethod, padBeg, padEnd, means, covs)
  File "bin/extractFormants.py", line 1114, in measureVowel
    f1, f2, f3, b1, b2, b3, winnerIndex = predictF1F2(phone, selectedpoles, selectedbandwidths, means, covs)
  File "bin/extractFormants.py", line 1664, in predictF1F2
    f3 = selectedpoles[2][2]
IndexError: list index out of range

Best wishes,

- Jenni

To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+unsubscribe@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+unsubscribe@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+unsubscribe@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.
Image 1.jpg

Josef Fruehwald

unread,
Apr 6, 2017, 6:29:40 AM4/6/17
to fave-...@googlegroups.com
Ok, could you re-run FAVE extract with the -v option like so:

python bin/extractFormants.py -v +config.txt audio.wav grid.TextGrid output

and paste everything it prints out into a text document and attach it here?

-Joe

To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.
--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.

Jenni Thompson

unread,
Apr 6, 2017, 7:00:11 AM4/6/17
to fave-...@googlegroups.com
Ran it with -V and the txt file is attached.

Thanks

-Jenni

To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+unsubscribe@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+unsubscribe@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+unsubscribe@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+unsubscribe@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+unsubscribe@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.
-vRUNvowelextraction.txt

Josef Fruehwald

unread,
Apr 6, 2017, 10:14:31 AM4/6/17
to fave-...@googlegroups.com
ok, I think I know what's wrong. You should be able to fix it in the near term by adding:

--onlyMeasureStressed

To your config.txt. That means FAVE-extract won't try to measure unstressed vowels. In the meantime, I'll try to fix the problem, in case unstressed vowels and/or schwa are important to you.

-Joe

To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.
--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.

Jenni Thompson

unread,
Apr 6, 2017, 5:25:27 PM4/6/17
to fave-...@googlegroups.com
Hi Joe,

Am I able to add -onlyMeasureStressed just at the end of the confg.txt file or does it need to be somewhere specific?

I'm not measuring unstressed vowels for this project but thank you for all your help! I'll let you know how it runs once I've changed the config.txt file.

-Jenni

To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+unsubscribe@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+unsubscribe@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+unsubscribe@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+unsubscribe@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+unsubscribe@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+unsubscribe@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+unsubscribe@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.

Josef Fruehwald

unread,
Apr 7, 2017, 5:58:46 AM4/7/17
to fave-...@googlegroups.com
Hi Jenni,

You can add that anywhere in the config.txt. Make sure you put two dashes before it.\

-Joe

To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.

Alida Chevalier

unread,
Apr 10, 2018, 7:45:44 AM4/10/18
to FAVE (Force Alignment and Vowel Extraction) Users Group
Hello Keelan (and everyone),

I have this problem again, and I can't remember how it was fixed the first time. I know that I should insert a print statement in praat.py, but I don't know how (or where) to do that. 

Could you please assist?  Here is the error I got this time. Thanks :)

10-dd-b1-f1-1d-eb:FAVE-Extract user$ python bin/extractFormants.py +config.txt Clive_Liz_Duffel.wav Clive_Liz_Duffel.TextGrid Clive_Liz_Duffel.txt

Processed options.

Read CMU phone set.

Speech software to be used is Praat.

Sound editor to be used is sox.

Read means and covs files for the Mahalanobis method.

Traceback (most recent call last):

  File "bin/extractFormants.py", line 2398, in <module>

    extractFormants(wavInput, tgInput, output, opts)

  File "bin/extractFormants.py", line 2169, in extractFormants

To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.



--
Dr Alida Chevalier
Junior Research Fellow
SARChI, Linguistics Section
School of African and Gender Studies, Anthropology and Linguistics
University of Cape Town
021 650 5907

--
You received this message because you are subscribed to the Google Groups "FAVE (Force Alignment and Vowel Extraction) Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fave-users+...@googlegroups.com.

To post to this group, send email to fave-...@googlegroups.com.
Visit this group at https://groups.google.com/group/fave-users.
Reply all
Reply to author
Forward
0 new messages