Skip to content

Result

class Prediction

Container for single word prediction result.

__init__

def __init__(word, phonemes, phoneme_tokens, confidence, token_probs)

Initializes a Prediction object.

Args
  • word (str): Original word to predict.

  • phonemes (str): Predicted phonemes (without special tokens).

  • phoneme_tokens (List[str]): Predicted phoneme tokens (including special tokens).

  • confidence (float): Total confidence of result.

  • token_probs (List[float]): Probability of each phoneme token.

class PhonemizerResult

Container for phonemizer output.

__init__

def __init__(text, phonemes, split_text, split_phonemes, predictions)

Initializes a PhonemizerResult object.

Args
  • text (List[str]): List of input texts.

  • phonemes (List[str]): List of output phonemes.

  • split_text (List[List[str]]): List of texts, where each text is split into words and special chars.

  • split_phonemes (List[List[str]]): List of phonemes corresponding to split_text.

  • predictions (Dict[str, Prediction]): Dictionary with entries word to Tuple (phoneme, probability).