Closed thealk closed 1 year ago
Some additional things I've tried that result in the same errors now also include:
Another update: Another issue apparently was that speaker adaptation was just not detecting my distinct speakers correctly at all (or at least not in a way I understand). That is, when I ran mfa align (without specifying -s), it would detect 2 speakers consistently, no matter if there were 10 different filenames, or if the files were in distinct directories.
Revising my previous updated because the original solution I came up with (concatenate files and assign one tier per speaker, named with speaker ID) was more complicated than necessary. I erroneously thought my simpler solution, below, wasn't working (just rename your tiers in your original transcript textgrids to match the speaker IDs), but I must have been doing something wrong in my initial tests because now it's working.
The ULTIMATE solution, which I am now happy with, is to make sure your transcription tier in EACH FILE has a name corresponding to the speaker. For a larger corpus with many files per speaker, this means every file for a given speaker has the same tier name, but no two speakers have the same tier name. For a smaller corpus with one file per speaker, each file just contains a tier name that matches the file name.
For anyone working in Praat, I wrote a tiny script to rename tiers according to speaker_chars in the filenames: https://github.com/thealk/PraatScripts/blob/master/mfa_prep/rename_tiers_to_speaker.praat
I am leaving this issue open because the original problem, namely that the -s flag consistently results in an error, is still an unresolved issue. However, this workaround is easy enough to implement.
Debugging checklist
[ X] Have you updated to latest MFA version? [ X] Have you tried rerunning the command with the
--clean
flag?Describe the issue When running
mfa align
with the--speaker_characters
(-s
) flag for speaker adaptation, alignment fails. TheKeyError
is the id for a single speaker. This error also occurs formfa validate
.(aligner) thea MFA % mfa align -s 4 --clean /Users/thea/Documents/0_test english_us_arpa english_us_arpa /Users/thea/Documents/1_test_out
File name formats are, for example: oc01_[bla...].wav/.TextGrid, where the first 4 characters denote the speaker ID.
mfa align
andvalidate
work as expected when--speaker_characters
flag is omitted.Command:
mfa align --speaker_characters 4 --clean /Users/thea/Documents/0_test english_us_arpa english_us_arpa /Users/thea/Documents/1_test_out
Output:
For Reproducing your issue Please fill out the following:
Log file Please attach the log file for the run that encountered an error (by default these will be stored in
~/Documents/MFA
). 0_test.logDesktop (please complete the following information):
Additional context
mfa align
on the whole data set (all files in a single directory) without specifying speaker adaptation it automatically detected 2 speakers. There are actually ~30 speakers (oc01, oc02, pd01, pd02, etc), but 2 speaker "groups", oc## and pd##. Not sure if this is relevant. A test folder with a couple oc01 and pd01 files only detected a single speaker, so it must have detected a different string for speaker id by default...