Errors and warnings

Errors are organized by the failure boundary: configuration/compatibility, backend execution, resources, lexicons, and missing voice-map symbols. Warning classes derive from PiperG2PWarning.

.. py:class:: PiperG2PError :module: piperg2p :canonical: piperg2p.errors.PiperG2PError

Bases: :py:class:Exception

Base class for piperg2p failures.

.. py:class:: ConfigError :module: piperg2p :canonical: piperg2p.errors.ConfigError

Bases: :py:class:~piperg2p.errors.PiperG2PError, :py:class:ValueError

The voice configuration is invalid.

.. py:class:: UnsupportedPhonemeTypeError :module: piperg2p :canonical: piperg2p.errors.UnsupportedPhonemeTypeError

Bases: :py:class:~piperg2p.errors.ConfigError

The configuration names a frontend that is not supported.

.. py:class:: UnsupportedCompatibilityError :module: piperg2p :canonical: piperg2p.errors.UnsupportedCompatibilityError

Bases: :py:class:~piperg2p.errors.ConfigError

The recognized profile is outside the implemented compatibility boundary.

.. py:class:: BackendError :module: piperg2p :canonical: piperg2p.errors.BackendError

Bases: :py:class:~piperg2p.errors.PiperG2PError

Base class for backend failures.

.. py:class:: BackendUnavailableError :module: piperg2p :canonical: piperg2p.errors.BackendUnavailableError

Bases: :py:class:~piperg2p.errors.BackendError

A requested backend cannot be initialized.

.. py:class:: PhonemizationError :module: piperg2p :canonical: piperg2p.errors.PhonemizationError

Bases: :py:class:~piperg2p.errors.BackendError

A backend failed while converting text.

.. py:class:: ResourceError :module: piperg2p :canonical: piperg2p.errors.ResourceError

Bases: :py:class:~piperg2p.errors.PiperG2PError

A language or backend resource is invalid.

.. py:class:: ResourceUnavailableError :module: piperg2p :canonical: piperg2p.errors.ResourceUnavailableError

Bases: :py:class:~piperg2p.errors.ResourceError

An optional resource is not installed or usable.

.. py:class:: LexiconError :module: piperg2p :canonical: piperg2p.errors.LexiconError

Bases: :py:class:~piperg2p.errors.PiperG2PError

Base class for lexicon overlay failures.

.. py:class:: LexiconDependencyError :module: piperg2p :canonical: piperg2p.errors.LexiconDependencyError

Bases: :py:class:~piperg2p.errors.LexiconError

An optional lexicon package is not installed.

.. py:class:: LexiconResourceError :module: piperg2p :canonical: piperg2p.errors.LexiconResourceError

Bases: :py:class:~piperg2p.errors.LexiconError

A requested lexicon asset or runtime is invalid or unavailable.

.. py:class:: LexiconConfigurationError :module: piperg2p :canonical: piperg2p.errors.LexiconConfigurationError

Bases: :py:class:~piperg2p.errors.LexiconError

Lexicon options are incompatible with the selected frontend.

.. py:class:: MissingPhonemeError :module: piperg2p :canonical: piperg2p.errors.MissingPhonemeError

Bases: :py:class:~piperg2p.errors.PiperG2PError, :py:class:KeyError

A required phoneme is absent from the selected voice map.

.. py:class:: PiperG2PWarning :module: piperg2p :canonical: piperg2p.errors.PiperG2PWarning

Bases: :py:class:UserWarning

Base class for piperg2p warnings.

.. py:class:: MissingPhonemeWarning :module: piperg2p :canonical: piperg2p.errors.MissingPhonemeWarning

Bases: :py:class:~piperg2p.errors.PiperG2PWarning

A phoneme was omitted because it is absent from the voice map.

.. py:class:: BackendFallbackWarning :module: piperg2p :canonical: piperg2p.errors.BackendFallbackWarning

Bases: :py:class:~piperg2p.errors.PiperG2PWarning

A backend fell back to a less compatible implementation.

.. py:class:: CompatibilityWarning :module: piperg2p :canonical: piperg2p.errors.CompatibilityWarning

Bases: :py:class:~piperg2p.errors.PiperG2PWarning

A compatibility-relevant lenient behavior was used.

See encoding for missing-symbol policy and eSpeak modes for automatic fallback behavior.