ertk.preprocessing.phonemize.PhonemizeConfig

class ertk.preprocessing.phonemize.PhonemizeConfig(language: str = 'en-us', backend: str = 'festival', ph_sep: str | None = ' ', syl_sep: str | None = None, word_sep: str | None = None, preserve_punctuation: bool = False, preserve_empty_lines: bool = True, strip: bool = False, language_switch: str = 'keep-flags')

Bases: ERTKConfig

Phonemizer configuration.

__init__(language: str = 'en-us', backend: str = 'festival', ph_sep: str | None = ' ', syl_sep: str | None = None, word_sep: str | None = None, preserve_punctuation: bool = False, preserve_empty_lines: bool = True, strip: bool = False, language_switch: str = 'keep-flags') None

Methods

__init__([language, backend, ph_sep, ...])

Inherited Methods

default()

Create default config.

from_config(config)

Create config object from any compatible config.

from_file(path)

Create config from YAML file and optionlly override some values.

merge_with_args(args)

Merge config with command-line arguments.

merge_with_config(config)

Merge other config into this config.

to_dictconfig()

Convert config to DictConfig.

to_file(path)

Write config to YAML file.

to_string()

Generate YAML string representation of config.

Attributes

backend

Backend to use.

language

Language to use.

language_switch

Language switch flagging.

ph_sep

Phoneme separator.

preserve_empty_lines

Preserve empty lines.

preserve_punctuation

Preserve punctuation.

strip

Strip whitespace.

syl_sep

Syllable separator.

word_sep

Word separator.

backend: str = 'festival'

Backend to use.

language: str = 'en-us'

Language to use.

language_switch: str = 'keep-flags'

Language switch flagging. One of “keep-flags”, “remove-flags”, “remove-utterance”.

ph_sep: str | None = ' '

Phoneme separator.

preserve_empty_lines: bool = True

Preserve empty lines.

preserve_punctuation: bool = False

Preserve punctuation.

strip: bool = False

Strip whitespace.

syl_sep: str | None = None

Syllable separator.

word_sep: str | None = None

Word separator.