SonixWriter

Formats reference data into the on-disk text formats parsed by SonixParser — the inverse direction, for tools that author reference lessons.

Currently supports the .pitchPP format (inverse of SonixParser.parsePitchString).

Quick Start

val text = SonixWriter.formatPitchString(pitchData)
// round-trips: SonixParser.parsePitchString(text) == pitchData (unvoiced normalized to 0)

See also

The matching parsers.

Functions

Link copied to clipboard
fun formatHpcp(frames: List<FloatArray>, hopSize: Int, sampleRate: Int): ByteArray

Encode HPCP chroma frames as binary HPCP chroma bytes.

Link copied to clipboard

Format pitch data as .pitchPP text: one time<TAB>pitchHz line per frame, in chronological order.

Link copied to clipboard

Format transcription data as .trans/phrases JSON: an array of phrase objects (id, lyrics, time_stamp, trans[]).