Project management of NTIS P1 Cybernetic Systems and Department of Cybernetics | WiKKY

Project

General

Profile

Task #3971 » formants.praat

Bořil Tomáš, 15.07.2016 19:50

 
1
??inputDirectory$ = "d:/Tomas/Fonetika/Plzen synteza/probl?my/ml?ne
2
ek/formanty/wav/";
3

4
outputDirectory$ = "d:/Tomas/Fonetika/Plzen synteza/probl?my/ml?ne
5
ek/formanty/formant/";
6

7

8

9
fileStrings = Create Strings as file list... list 'inputDirectory$'*.*
10

11
numberOfFiles = Get number of strings
12

13

14

15
for indFile to numberOfFiles
16

17
    select fileStrings
18

19
    fileNameWav$ = Get string... indFile
20

21
    fName$ = left$(fileNameWav$, length(fileNameWav$) - 4)
22

23
    fileNameFormant$ = fName$ + ".csv"
24

25

26

27
    soundID = Read from file... 'inputDirectory$''fileNameWav$'
28

29
    formantID = To Formant (burg): 0.005, 6, 6600, 0.025, 50
30

31
    formantTrackID = Track: 4, 550, 1650, 2750, 3850, 4950, 1, 1, 1
32

33
    tableID = Down to Table: "no", "yes", 6, "yes", 3, "yes", 3, "yes"
34

35
    Save as comma-separated file... 'outputDirectory$''fileNameFormant$'
36

37
    
38

39
    select soundID
40

41
    plus formantID
42

43
    plus formantTrackID
44

45
    plus tableID
46

47
    Remove
48

49
endfor
50

51

52

53
select fileStrings
54

55
Remove
56

    (1-1/1)