Skip to content

Commit 8e292d1

Browse files
authored
Update README.md
1 parent 42ff829 commit 8e292d1

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Go Reference](https://pkg.go.dev/badge/github.com/vocatart/golab.svg)](https://pkg.go.dev/github.com/vocatart/golab)
44

5-
simple HTK label reading and writing for go.
5+
simple HTK & TextGrid handling for go.
66

77
## example
88

@@ -11,7 +11,7 @@ allows you to read and write annotation data from lab files that are in seconds.
1111
```go
1212
package main
1313

14-
import "github.com/vocatart/golab"
14+
import "github.com/vocatart/golab/htk"
1515

1616
func main() {
1717
lab = golab.ReadLab("path/to/file.lab")
@@ -27,4 +27,17 @@ func main() {
2727
}
2828
```
2929

30+
for textgrid, implementation is mostly there, but cannot write to files yet.
31+
32+
```go
33+
package main
34+
35+
import "github.com/vocatart/golab/textgrid"
36+
37+
func main() {
38+
tg = golab.ReadTextgrid("path/to/file.TextGrid")
39+
40+
fmt.Printf("textgrid file %s, duration of %f, has %d tiers.", tg.GetName(), tg.GetDuration(), tg.GetTiers().GetSize())
41+
}
42+
```
3043
some .lab examples taken from [kiritan_singing](https://github.com/mmorise/kiritan_singing).

0 commit comments

Comments
 (0)