espnet3.utils.scp_utils.check_utt_id
Less than 1 minute
espnet3.utils.scp_utils.check_utt_id
espnet3.utils.scp_utils.check_utt_id(value) → str
Return an utterance id as the string an SCP line and a file name take.
An SCP line is <id> <value>, so the id must not be empty or hold whitespace, or the line reads back as a different id and value. The same id also names the artifact files of that utterance, so it must not be a path: ../x or a/b would write outside the directory, and . or .. on top of it.
- Parameters:value – The id as the dataset gave it; a string, or anything whose
str()is the id. - Returns: The id as a string.
- Raises:ValueError – If the id is empty, holds whitespace or a path separator, or is
.or...
