Error in Demos->Speech->ComputeConfusions.m

Jan 9, 2015 at 5:19 PM
In running the example TIMIT phoneme recognition I found an error in the matlab file ComputeConfusions.m that postprocesses the output data.

Line 114 of Demos->Speech->ComputeConfusions.m was

theLine = fgets(fp);

With the Windows encoding of TimitStateList.txt this returns the line with its two line-end characters CR-LF. Line 118 attempts to remove the line-end character but removes only one of them:

stateList{stateIndex} = theLine(1:end-1);

This results in failure of the strcmp test at line 99 and no correct label is ever found.

What is correct for the function ReadStateList is to replace fgets by fgetl which automatically removes all line-end characters:

function stateList = ReadStateList(stateListFile)
% Read in the state list file. This file contains an ordered list of
% states, each corresponding to one label (and one output in the CNTK
% network.)
fp = fopen(stateListFile);
nStates = 183;
% Preordained
stateList = cell(nStates, 1);
stateIndex = 1;
while true
theLine = fgetl(fp);
if isempty(theLine) || theLine(1) == -1
break;
end
stateList{stateIndex} = theLine;
stateIndex = stateIndex + 1;
end
fclose(fp);

Richard


At 06:05 PM 1/7/2015, you wrote:

From: dongyu
yes, a Linux version with the core functionalities will be ready soon. What's left is the Kaldi data file reader and writer, which is not developed yet.

Read the full discussion online.

To add a post to this discussion, reply to this email ([email removed])

To start a new discussion for this project, email [email removed]

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com