ovos-scriptconv-g2p-plugin
An OVOS Plugin Manager (OPM) Grapheme2Phoneme plugin.
This plugin does not phonemize text itself. It is a thin adapter over scriptconv's phonemizer registry, which bundles 45 phonemizer backends behind one API and converts every one of them to IPA on request - including backends that natively emit ARPABET, X-SAMPA, or another notation, since notation conversion is scriptconv's whole reason to exist.
Which backend runs is a matter of config, nothing else. Point phonemizer
at any scriptconv.phonemizers.Phonemizer
registry name and this plugin uses it. Leave it unset and scriptconv's own
per-language LANG_DEFAULTS/fallback chain (explicit default ->
orthography2ipa -> espeak)
picks a backend per word, same as calling scriptconv.phonemizers.phonemize()
directly.
Benchmarked and compared against the other G2P plugins in the ovos-plugin-arena.
Install
pip install ovos-scriptconv-g2p-plugin
scriptconv and ovos-plugin-manager are the only hard dependencies.
Individual phonemizer backends are optional - scriptconv lazy-imports them,
and installing this plugin does not pull in any of the 45 backing
packages. If you configure a backend whose package isn't installed, you get
a clear ImportError naming the pip extra to install, e.g.:
pip install scriptconv[espeak] # espeak backend
pip install scriptconv[o2i] # orthography2ipa backend
pip install scriptconv[pt-phonemizers] # tugaphone backend
See scriptconv's pyproject.toml for the full extras list - one per
backend or language family.
Configuration
"g2p": {
"module": "ovos-scriptconv-g2p-plugin",
"ovos-scriptconv-g2p-plugin": {
"phonemizer": "espeak",
"lang": "en-us"
}
}
phonemizer(optional): registry name of the scriptconv phonemizer to use, e.g."espeak","orthography2ipa","tugaphone". Omit it to let scriptconv pick the default backend per language.lang(optional): default language used when a caller doesn't pass one explicitly.- any other key is forwarded as a keyword argument to the underlying
scriptconv phonemizer constructor (
model,normalizer, ...).
Usage
from ovos_plugin_manager.g2p import OVOSG2PFactory
config = {"g2p": {"module": "ovos-scriptconv-g2p-plugin",
"ovos-scriptconv-g2p-plugin": {"phonemizer": "espeak"}}}
g2p = OVOSG2PFactory.create(config)
print(g2p.get_ipa("hello", "en-us"))
Links
- scriptconv - the phonemizer registry and notation converter this plugin wraps
- ovos-plugin-manager -
defines the
Grapheme2PhonemePlugincontract this plugin implements - ovos-plugin-arena - benchmarks this plugin against other G2P engines
Metadata
Release files for ovos-scriptconv-g2p-plugin 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ovos_scriptconv_g2p_plugin-0.0.1.tar.gz | 9.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ovos_scriptconv_g2p_plugin-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.8 kB
Release files / ovos_scriptconv_g2p_plugin-0.0.1.tar.gz
| Download URL | ovos_scriptconv_g2p_plugin-0.0.1.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
704d21cfe64bf9666b176350d2267caa9e3b26ed620e4eda4db691b37f26e8a8
|
|
BLAKE2b-256 checksum How to use checksums |
07f76dcc8ba907527714b1d74d3e51f7f059a1974d03a7f19a107db33e3e654b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / ovos_scriptconv_g2p_plugin-0.0.1-py3-none-any.whl
| Download URL | ovos_scriptconv_g2p_plugin-0.0.1-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4908178246fddb019672164d1d6bbe7b0afdf0af00c016d17e6ae8c4698dfc44
|
|
BLAKE2b-256 checksum How to use checksums |
74ac2996505419b0d72f108a37b0a7558ec0b5927892ca6a51515724dbd18800
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|