alignment/splitter

MP3 splitter — lossless per-turn extraction via ffmpeg -c copy.

One os_cmd from shell.gleam — no duplicated @externals. ffmpeg frame-accurate, lossless (just copies MP3 frames, no re-encode).

Types

pub type SplitterError {
  SplitFailed(String)
}

Constructors

  • SplitFailed(String)

Values

pub fn batch_split(
  input_path: String,
  turns: List(#(Float, Float, String)),
) -> Result(Nil, SplitterError)

Batch split each aligned turn. Returns Error(n_failed) on any failure.

pub fn split_mp3(
  input_path: String,
  start_s: Float,
  end_s: Float,
  output_path: String,
) -> Result(Nil, SplitterError)

Extract a time range from source mp3 to a new mp3 file.

✨ Search Document