-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexperimento.praat
51 lines (43 loc) · 3.06 KB
/
experimento.praat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
clearinfo
form Arquivo de áudio
comment Insira abaixo o diretório de interesse.
sentence Dir F:\Monografia\RECORTE_BÁRBARA
endform
#Para bmedsp03_1a:
txtgrd_bar = Read from file: "'dir$'\trecho_bmedsp03_1a\trecho_bmedsp03_1a.TextGrid"
txtgrd_tha = Read from file: "'dir$'\trecho_bmedsp03_1a.TextGrid"
table_sp = Read Table from tab-separated file: "'dir$'\table_sp.txt"
n_rows = Get number of rows
n_columns = Get number of columns
for i to n_rows-1
selectObject: table_sp
x = Get value: i, "interval_id"
y = Get value: i+1, "interval_id"
selectObject: txtgrd_tha
t0 = Get start point: 1, x
t = Get start point: 1, y
selectObject: txtgrd_bar
ext_txtgrd = Extract part: t0, t+0.05, 0
selectObject: ext_txtgrd
Save as text file: "'dir$'\bmedsp03_1a - txtgrd_bar - cut\'x'.TextGrid"
endfor
select all
Remove
#Para bmests10_1:
txtgrd_barb = Read from file: "'dir$'\trecho_bmedts10\segundo corte\19 segmentadores\trecho_bmedts10_1.TextGrid"
txtgrd_thai = Read from file: "'dir$'\trecho_bmedts10_1.TextGrid"
table_ts = Read Table from tab-separated file: "'dir$'\table_ts.txt"
n_rows = Get number of rows
n_columns = Get number of columns
for i to n_rows-1
selectObject: table_ts
z = Get value: i, "interval_id"
w = Get value: i+1, "interval_id"
selectObject: txtgrd_thai
t0 = Get start point: 1, z
t = Get start point: 1, w
selectObject: txtgrd_barb
ext_txtgrd = Extract part: t0, t+0.05, 0
selectObject: ext_txtgrd
Save as text file: "'dir$'\bmedts10_1 - txtgrd_bar - cut\'z'.TextGrid"
endfor