FAVE Extract Doesn't Find Any Vowels

71 views
Skip to first unread message

Eli

unread,
Dec 13, 2018, 5:04:30 PM12/13/18
to FAVE (Force Alignment and Vowel Extraction) Users Group
Hello,

I got FAVE Extract up and running on Ubuntu 16, but for some reason it can't find any vowels in my test file. They're findable - Montreal Forced Aligner found them just fine. I suspect that it's being picky about TextGrid formats, because it thinks each phoneme is a word, but I don't know what it needs. Has anyone run into this before? Thanks so much in advance!

Here's the command I use to run things:
python bin/extractFormants.py -v --speechSoftware praat --minVowelDuration 0.001 ${fileName}.wav ${fileName}.TextGrid ${fileName}.txt

Here's the output:
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.
Please enter background information for speaker :
(Press [return] if correct; if not, simply enter new data (do not use [delete]).)
Name:    
Sex:   M
Age:   
Ethnicity:  
Location:  
Year of recording: 
Years of schooling: 
Identified vowels in the TextGrid.
   ...no vowels in word B at 0.060.
   ...no vowels in word IH0 at 0.150.
   ...no vowels in word T at 0.230.
   ...no vowels in word W at 0.310.
   ...no vowels in word IY1 at 0.370.
   ...no vowels in word N at 0.440.

And here's the entire .TextGrid:
File type = "ooTextFile"
Object class = "TextGrid"
xmin = 0.0
xmax = 0.68003125
tiers? <exists>
size = 2
item []:
        item [1]:
                class = "IntervalTier"
                name = "words"
                xmin = 0.0
                xmax = 0.68003125
                intervals: size = 3
                        intervals [1]:
                                xmin = 0.0
                                xmax = 0.060
                                text = ""
                        intervals [2]:
                                xmin = 0.060
                                xmax = 0.580
                                text = "between"
                        intervals [3]:
                                xmin = 0.580
                                xmax = 0.68003125
                                text = ""
        item [2]:
                class = "IntervalTier"
                name = "phones"
                xmin = 0.0
                xmax = 0.68003125
                intervals: size = 9
                        intervals [1]:
                                xmin = 0.000
                                xmax = 0.060
                                text = "sil"
                        intervals [2]:
                                xmin = 0.060
                                xmax = 0.150
                                text = "B"
                        intervals [3]:
                                xmin = 0.150
                                xmax = 0.230
                                text = "IH0"
                        intervals [4]:
                                xmin = 0.230
                                xmax = 0.310
                                text = "T"
                        intervals [5]:
                                xmin = 0.310
                                xmax = 0.370
                                text = "W"
                        intervals [6]:
                                xmin = 0.370
                                xmax = 0.440
                                text = "IY1"
                        intervals [7]:
                                xmin = 0.440
                                xmax = 0.580
                                text = "N"
                        intervals [8]:
                                xmin = 0.580
                                xmax = 0.660
                                text = "sp"
                        intervals [9]:
                                xmin = 0.660
                                xmax = 0.68003125
                                text = ""

Josef Fruehwald

unread,
Dec 14, 2018, 9:11:32 AM12/14/18
to FAVE (Force Alignment and Vowel Extraction) Users Group
Hi Eli,

At the moment, FAVE-extract really only works on text grids aligned using FAVE-align. The differences aren't very drastic between them, but the big issue here is that FAVE-extract expects the phone tier to be the first tier, and the word tier to be the second. Your text grid looks like it's the other way around.

I'm not 100% sure that FAVE-extract would work if you just flipped the two tiers, because there are some transcriptional differences between the two aligners as well.

-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.
To view this discussion on the web visit https://groups.google.com/d/msgid/fave-users/6c2daf76-4ab7-4589-977a-1baa284c34d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eli

unread,
Dec 18, 2018, 1:11:05 PM12/18/18
to FAVE (Force Alignment and Vowel Extraction) Users Group
Hi Josef,

Thank you for the reply! I didn't realize it had those preferences. I was able to change the script so that it expects TextGrids in the opposite order, and it seems to be running successfully now. The returned values look reasonable, but I'll try to get FAVE-align working for comparison.

Let me know if code contribution would be useful.

Eli

Lisa Johnson

unread,
Feb 19, 2019, 4:18:06 PM2/19/19
to FAVE (Force Alignment and Vowel Extraction) Users Group
Eli,

I'm interested in how you got this to work and if you were able to make comparisons between measurements obtained from MFA alignments and from FAVE-align alignments.  Can you share what you did to reverse the tiers?

Thanks,
Lisa

Eli Bowen

unread,
Mar 1, 2019, 3:46:02 PM3/1/19
to fave-...@googlegroups.com, Lisa Johnson
Hi Lisa,

To get this working on MFA TextGrids, which have the word first (rather than phonemes first), I had to change the below lines in bin/extractFormants.py:
LINE 933: phone_midpoints = [p.xmin() + 0.5 * (p.xmax() - p.xmin()) for p in tg[speaker.tiernum]]
became    phone_midpoints = [p.xmin() + 0.5 * (p.xmax() - p.xmin()) for p in tg[speaker.tiernum+1]]
LINE 937: for w in tg[speaker.tiernum + 1]: # for each interval...
became    for w in tg[speaker.tiernum]:     # for each interval...
LINE 949: for p in tg[speaker.tiernum][left:right]:
became    for p in tg[speaker.tiernum+1][left:right]:

This simple change causes the script to fail with FAVE-align textgrids - a better solution would be to use if-statements. I've attached the modified extractFormants.py - to avoid antivirus issues the file extension has been changed (if it still doesn't go through, email me directly for a copy).

Life events have so far prevented me from quantitatively comparing the results on MFA vs FAVE-align. However, I can say that the MFA-based results seem reasonable so far.

Another thing I noticed is that speaker.tiernum is determined by line order - simply renumbering the tiers in the textgrid does nothing, because tier numbers in the .textgrid file are ignored.

Eli

PS: To get things working, I also had to make several changes which might be unrelated to the issue at hand:
(a)  in lines elif os.name == 'posix':\n PRAATNAME = 'Praat', change 'Praat' to 'praat'
(b)  wrap try except TypeError around each of the below lines:
LINE 1265: m.norm_tracks.append(round(650 + 150 * (lobanov(m.tracks[2 * i], grand_means[0], grand_stdvs[0])), 0)) # F1
LINE 1266: m.norm_tracks.append(round(1700 + 420 * (lobanov(m.tracks[2 * i + 1], grand_means[1], grand_stdvs[1])), 0)) # F2
extractFormants.txt
Reply all
Reply to author
Forward
0 new messages