wavesurfer-0.0.1: Parse WaveSurfer files

Sound.WaveSurfer

Description

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] ...

Synopsis

Documentation

type Time = DoubleSource

Time type.

type DTime = TimeSource

Type for time differences.

type Label = ByteStringSource

Record label.

type Attribute = (Label, Maybe Label)Source

Key-value pair.

data Record Source

Record representing a single line in the WaveSurfer file.

Constructors

Record 

Fields

onset :: Time
 
offset :: Time
 
label :: Label
 
attributes :: [Attribute]
 

Instances

duration :: Record -> DTimeSource

Return the duration of a Record in seconds.

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.