#include <iostream>
#include "base/kaldi-math.h"
#include "feat/feature-plp.h"
#include "feat/pitch-functions.h"
#include "feat/wave-reader.h"
#include "sys/stat.h"
#include "sys/types.h"
#include "base/timer.h"
Go to the source code of this file.
|
| kaldi |
| This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for mispronunciations detection tasks, the reference:
|
|
◆ main()
Definition at line 617 of file pitch-functions-test.cc.
References kaldi::DirExist(), KALDI_ERR, KALDI_LOG, kaldi::SetVerboseLevel(), kaldi::UnitTestFeatNoKeele(), and kaldi::UnitTestFeatWithKeele().
618 using namespace kaldi;
627 <<
"Not running tests that require the Keele database, " 628 <<
"please ask g.meyer@liverpool.ac.uk for the database if you need it.\n" 629 <<
"Once you have the keele/ subdirectory, containing *.{pel,pet,pev,raw,wav}, do this:\n" 630 <<
"cd keele; mkdir -p 16kHz; mkdir -p tmp; for x in *.wav; do \n" 631 <<
"sox $x -r 16000 16kHz/$x; done \n" 632 <<
"mkdir -p keele-true-lags; for f in *.pev; do \n" 633 <<
"out_f=keele-true-lags/$(echo $f | sed s:pev:txt:); ( echo ' ['; len=`cat $f | wc -l`; \n" 634 <<
"head -n $(($len-1)) $f | tail -n $(($len-14)) ; echo -n ']') >$out_f; done \n" 636 <<
"Note: the GPE reported in paper is computed using pseudo-ground-truth pitch obtained\n" 637 <<
"by voting among the pitch trackers mentioned in the paper.\n";
641 }
catch(
const std::exception &e) {
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
bool DirExist(const std::string &dirname)
void SetVerboseLevel(int32 i)
This should be rarely used, except by programs using Kaldi as library; command-line programs set the ...
static void UnitTestFeatWithKeele()
static void UnitTestFeatNoKeele()