rttm¶
RTTM I/O module.
Classes
Safe RTTM reader. |
|
Safe RTTM writer. |
- class RTTMReader[source]¶
Bases:
object
Safe RTTM reader.
- class RTTMWriter[source]¶
Bases:
object
Safe RTTM writer.
- static check(path, overwrite=False)[source]¶
Checks that a file has of the correct extension and verifies that we can overwrite it if it exists.
- Parameters:
path (
Union
[str
,Path
]) – Path to the file.overwrite (bool)
- Returns:
- static write(segments, path, overwrite=False)[source]¶
Writes diarized audio segment information in the RTTM format.
- Parameters:
segments (
List
[Dict
[str
,Union
[str
,float
]]]) – Audio segment information.path (
Union
[str
,Path
]) – Path to the file.overwrite (
bool
) – Whether to overwrite, in case of an existing file.
- Returns: