Parse WaveSurfer files.
WaveSurfer is an application for analysing and annotating audio files. http://www.speech.kth.se/wavesurfer/
A WaveSurfer file consists of lines containing a label and corresponding onsets and offsets in seconds:
onset offset label
This library supports an extended file format, where the first label can be followed by additional key-value pairs, separated by colons:
onset offset label key1[:value1] key2[:value2] ...
- type Time = Double
- type DTime = Time
- type Label = ByteString
- type Attribute = (Label, Maybe Label)
- data Record = Record {}
- duration :: Record -> DTime
- type Result a = Either ParseError a
- encode :: Content -> ByteString
- decode :: ByteString -> Result Content
- interact :: (Record -> Record) -> ByteString -> Result ByteString
Documentation
type Label = ByteStringSource
Record label.
Record representing a single line in the WaveSurfer file.
type Result a = Either ParseError a
Result type.
encode :: Content -> ByteStringSource
Encode Content
to a lazy ByteString
.
decode :: ByteString -> Result ContentSource
Decode Content
from a lazy ByteString
.
interact :: (Record -> Record) -> ByteString -> Result ByteStringSource