SeanNaren / deepspeech.torch

Speech Recognition using DeepSpeech2 network and the CTC activation function.
MIT License
260 stars 73 forks source link

cer compute error #74

Closed syhao closed 7 years ago

syhao commented 7 years ago

need first change to array then call sequenceErrorRate

syhao commented 7 years ago
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)