语音识别中强制对齐_求教专业人士,基于Kaldi,怎么做强制对齐,以及后续怎么对对齐的结果计算GOP呢?...
github上有一些project可以看看,tbright17/kaldi-dnn-ali-gopgithub.comBaseFloat GmmGop::Decode(fst::VectorFst &fst,DecodableAmDiagGmmScaled &decodable,std::vector *align) {FasterDecoderOptions decode_op
github上有一些project可以看看,tbright17/kaldi-dnn-ali-gopgithub.com
BaseFloat GmmGop::Decode(fst::VectorFst<:stdarc> &fst,
DecodableAmDiagGmmScaled &decodable,
std::vector *align) {
FasterDecoderOptions decode_opts;
decode_opts.beam = 2000; // number of beams for decoding. Larger, slower and more successful alignments. Smaller, more unsuccessful alignments.
FasterDecoder decoder(fst, decode_opts);
decoder.Decode(&decodable);
if (! decoder.ReachedFinal()) {
KALDI_WARN << "Did not successfully decode.";
}
fst::VectorFst decoded;
decoder.GetBestPath(&decoded);
std::vector osymbols;
LatticeWeight weight;
GetLinearSymbolSequence(decoded, align, &osymbols, &weight);
BaseFloat likelihood = -(weight.Value1()+weight.Value2());
return likelihood;
}
更多推荐



所有评论(0)