ldc_bpcsad.io
.write_rttm_file
- ldc_bpcsad.io.write_rttm_file(rttm_path, segs, file_id, channel=1, is_sorted=False, precision=2)[source]
Write speech segments to Rich Transcription Time Marked (RTTM) file.
- Parameters:
rttm_path (pathlib.Path) – Path to file in RTTM format.
segs (Iterable[Segment]) – Speech segments.
file_id (str) – File ID to output with segment. Typically, basename of the audio file the segment is on.
channel (int, optional) – Channel segment is on in audio file (1 indexed). (Default: 1)
is_sorted (bool, optional) – If True, treat segs as already sorted. Otherwise, sort before writing. (Default: False)
precision (int, optional) – Output will be truncated to precision decimal places. (Default: 2)
References