Small typo corrected in SGC_ToneProt/README.txt
[sgc.git] / SGC_ToneProt / TestInitialRecognition.praat
blobbcb8cf7bfde409e45054c8659526774b286aee3c
1 # Test Initial Recognition
3 form Give input
4         word test_dir ../../test
5         word testreference_dir ../wordlists/CoGMandarinSounds
6 endform
8 clearinfo
10 Create Strings as file list... TestList 'test_dir$'/*.wav
11 numberOfTestReferences = Get number of strings
13 for j from 1 to numberOfTestReferences
14     select Strings TestList
15     testFile$ = Get string... 'j'
17     pinyin$ = replace_regex$(testFile$, "^([a-z]+[0-9]+)[0-9a-zA-Z_\-\.]*$", "\1", 0)
18     
19     execute InitialRecognition.praat 'pinyin$' 'test_dir$'/'testFile$' 'testreference_dir$'
21     result$ < lastInitialRecognitionResult.txt
22     printline 'pinyin$': 'result$'
23 endfor
25 select Strings TestList
26 Remove