Kaldi-ASR Advanced Project
T-718-ATSR - Automatic Speech Recognition, TD-MSc, 2019-1
Reykjavik University - School of Computer Science, Menntavegur 1, IS-101 Reykjavik, Iceland
Click to expand
A modified version of the Kaldi-ASR yesno example project adjusted for Icelandic, for multiple speakers, and finally, it it uses a phone-based model instead of word based-model.
Custom yes/no dataset for Icelandic, made from recordings from students and the staff members from the course.
Summary:
- 10 different speakers
- 120 sentences/utterances
- Speaker 0: 10 utterances
- Speaker 1: 7 utterances
- Speaker 2: 8 utterances
- Speaker 3: 10 utterances
- Speaker 4: 10 utterances
- Speaker 5: 42 utterances
- Speaker 6: 0 utterances
- Speaker 7: 10 utterances
- Speaker 8: 8 utterances
- Speaker 9: 10 utterances
- Speaker 10: 5 utterances
- Each utterance consist of 8 words.
- The vocabulary for the words:
- Já (yes)
- Nei (no
Edit following part in the file:
if [ ! -d waves_yesno ]; then
wget waves_yesno.tar.gz || exit 1;
tar -xvzf waves_yesno.tar.gz || exit 1;
fi
We have our dataset locally, so we dont have to fetch it from a remote file host.
Remember to re-compile the script.
$ chmod 777 s5/run.sh
Add following code to the while loop:
$trans =~ s/SA\d\d-//;
This will remove the speaker Id from our filename when creating our data/{X}/text files.
Specify which speakers you want to have in the test set.
while ($l = <FL>)
{
chomp($l);
if (index($l, "SA01") == -1 && index($l, "SA10") == -1)
{
print TRAINLIST "$l\n";
}
else
{
print TESTLIST "$l\n";
}
}
Edit the code so each utterece has it corresponding speaker id istead of global.
cat data/$x/text | awk '{printf("%s %s\n", $1, substr($1, 0, 5));}' > data/$x/utt2spk
Remember to re-compile the script.
$ chmod 777 s5/local/prepare_data.sh
3.5 conf/mfcc.conf
Set the correct sample-frequency configuration based on the waves_yesno .wav file format.
--sample-frequency=16000 # waves_yesno is sampled at 16kHz
For changing the model from a word-based model to a phone-based one, we will need to change the lexicon for our system.
input/lexicon.txt
<SIL> SIL
YES J A U
NO N E I
For simplicity we cept the same labels, but changed the corresponding phonems.
lexicon_nosil.txt
YES J A U
NO N E I
phones.txt
SIL
A
E
I
J
N
U
Now we should be able to run the run.sh file successfully.
$ cd s5/
$ bash run.sh
Expected output result:
%WER 11.46 [ 11 / 96, 7 ins, 1 del, 3 sub ] exp/mono0a/decode_test_yesno/wer_14_1.0
- Egill Anton Hlöðversson - MSc. Language Technology Student
This project is licensed under the MIT License - see the LICENSE file for details.
🌟 PLEASE STAR THIS REPO IF YOU FOUND SOMETHING INTERESTING 🌟