SeanNaren / deepspeech.torch

Speech Recognition using DeepSpeech2 network and the CTC activation function.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cer compute error

syhao opened this issue · comments

commented

need first change to array then call sequenceErrorRate

commented
target_char={}
predict_char={}
for i=1, #targetTranscript do
    local character = targetTranscript:sub(i, i)
    table.insert(target_char,character)
end
for i=1,#predictTranscript  do
    local character = predictTranscript:sub(i, i)
    table.insert(predict_char,character)
end
return self:sequenceErrorRate(target_char, predict_char)