ovos-scriptconv-g2p-plugin 0.0.1a2__tar.gz → 0.0.2a2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ovos_scriptconv_g2p_plugin-0.0.2a2/PKG-INFO +49 -0
- ovos_scriptconv_g2p_plugin-0.0.2a2/README.md +35 -0
- {ovos_scriptconv_g2p_plugin-0.0.1a2 → ovos_scriptconv_g2p_plugin-0.0.2a2}/ovos_scriptconv_g2p_plugin/__init__.py +2 -2
- {ovos_scriptconv_g2p_plugin-0.0.1a2 → ovos_scriptconv_g2p_plugin-0.0.2a2}/ovos_scriptconv_g2p_plugin/version.py +1 -1
- ovos_scriptconv_g2p_plugin-0.0.2a2/ovos_scriptconv_g2p_plugin.egg-info/PKG-INFO +49 -0
- ovos_scriptconv_g2p_plugin-0.0.2a2/ovos_scriptconv_g2p_plugin.egg-info/requires.txt +2 -0
- {ovos_scriptconv_g2p_plugin-0.0.1a2 → ovos_scriptconv_g2p_plugin-0.0.2a2}/pyproject.toml +1 -1
- ovos_scriptconv_g2p_plugin-0.0.1a2/PKG-INFO +0 -96
- ovos_scriptconv_g2p_plugin-0.0.1a2/README.md +0 -82
- ovos_scriptconv_g2p_plugin-0.0.1a2/ovos_scriptconv_g2p_plugin.egg-info/PKG-INFO +0 -96
- ovos_scriptconv_g2p_plugin-0.0.1a2/ovos_scriptconv_g2p_plugin.egg-info/requires.txt +0 -2
- {ovos_scriptconv_g2p_plugin-0.0.1a2 → ovos_scriptconv_g2p_plugin-0.0.2a2}/LICENSE +0 -0
- {ovos_scriptconv_g2p_plugin-0.0.1a2 → ovos_scriptconv_g2p_plugin-0.0.2a2}/ovos_scriptconv_g2p_plugin.egg-info/SOURCES.txt +0 -0
- {ovos_scriptconv_g2p_plugin-0.0.1a2 → ovos_scriptconv_g2p_plugin-0.0.2a2}/ovos_scriptconv_g2p_plugin.egg-info/dependency_links.txt +0 -0
- {ovos_scriptconv_g2p_plugin-0.0.1a2 → ovos_scriptconv_g2p_plugin-0.0.2a2}/ovos_scriptconv_g2p_plugin.egg-info/entry_points.txt +0 -0
- {ovos_scriptconv_g2p_plugin-0.0.1a2 → ovos_scriptconv_g2p_plugin-0.0.2a2}/ovos_scriptconv_g2p_plugin.egg-info/top_level.txt +0 -0
- {ovos_scriptconv_g2p_plugin-0.0.1a2 → ovos_scriptconv_g2p_plugin-0.0.2a2}/setup.cfg +0 -0
- {ovos_scriptconv_g2p_plugin-0.0.1a2 → ovos_scriptconv_g2p_plugin-0.0.2a2}/test/test_plugin.py +0 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ovos-scriptconv-g2p-plugin
|
|
3
|
+
Version: 0.0.2a2
|
|
4
|
+
Summary: OPM G2P plugin over scriptconv: 45 phonemizers behind one config switch
|
|
5
|
+
Author-email: jarbasai <jarbasai@mailfence.com>
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/TigreGotico/ovos-scriptconv-g2p-plugin
|
|
8
|
+
Keywords: ovos,plugin,g2p,phonemizer,ipa,scriptconv
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Requires-Dist: ovos-plugin-manager<3.0.0,>=2.2.0
|
|
12
|
+
Requires-Dist: scriptconv<1.0.0,>=0.0.4a19
|
|
13
|
+
Dynamic: license-file
|
|
14
|
+
|
|
15
|
+
# ovos-scriptconv-g2p-plugin
|
|
16
|
+
|
|
17
|
+
An OVOS Plugin Manager (OPM) [Grapheme2Phoneme](https://github.com/OpenVoiceOS/ovos-plugin-manager)
|
|
18
|
+
plugin. It is a thin adapter over the phonemizer registry of
|
|
19
|
+
[scriptconv](https://github.com/TigreGotico/scriptconv): every phonemizer backend in its registry behind
|
|
20
|
+
one API, with the output of each backend converted to IPA. The configuration
|
|
21
|
+
selects the backend.
|
|
22
|
+
|
|
23
|
+
## Install
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pip install ovos-scriptconv-g2p-plugin
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Each phonemizer backend is an optional scriptconv extra, for example
|
|
30
|
+
`pip install scriptconv[espeak]`.
|
|
31
|
+
|
|
32
|
+
## Quickstart
|
|
33
|
+
|
|
34
|
+
```python
|
|
35
|
+
from ovos_plugin_manager.g2p import OVOSG2PFactory
|
|
36
|
+
|
|
37
|
+
config = {"g2p": {"module": "ovos-scriptconv-g2p-plugin",
|
|
38
|
+
"ovos-scriptconv-g2p-plugin": {"phonemizer": "espeak"}}}
|
|
39
|
+
g2p = OVOSG2PFactory.create(config)
|
|
40
|
+
print(g2p.get_ipa("hello", "en-us"))
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Documentation
|
|
44
|
+
|
|
45
|
+
| Page | Read it for |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| [docs/index.md](docs/index.md) | what the plugin does, how it selects a backend, related projects |
|
|
48
|
+
| [docs/install.md](docs/install.md) | the dependencies and the backend extras |
|
|
49
|
+
| [docs/configuration.md](docs/configuration.md) | the configuration keys and a usage example |
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# ovos-scriptconv-g2p-plugin
|
|
2
|
+
|
|
3
|
+
An OVOS Plugin Manager (OPM) [Grapheme2Phoneme](https://github.com/OpenVoiceOS/ovos-plugin-manager)
|
|
4
|
+
plugin. It is a thin adapter over the phonemizer registry of
|
|
5
|
+
[scriptconv](https://github.com/TigreGotico/scriptconv): every phonemizer backend in its registry behind
|
|
6
|
+
one API, with the output of each backend converted to IPA. The configuration
|
|
7
|
+
selects the backend.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pip install ovos-scriptconv-g2p-plugin
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Each phonemizer backend is an optional scriptconv extra, for example
|
|
16
|
+
`pip install scriptconv[espeak]`.
|
|
17
|
+
|
|
18
|
+
## Quickstart
|
|
19
|
+
|
|
20
|
+
```python
|
|
21
|
+
from ovos_plugin_manager.g2p import OVOSG2PFactory
|
|
22
|
+
|
|
23
|
+
config = {"g2p": {"module": "ovos-scriptconv-g2p-plugin",
|
|
24
|
+
"ovos-scriptconv-g2p-plugin": {"phonemizer": "espeak"}}}
|
|
25
|
+
g2p = OVOSG2PFactory.create(config)
|
|
26
|
+
print(g2p.get_ipa("hello", "en-us"))
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Documentation
|
|
30
|
+
|
|
31
|
+
| Page | Read it for |
|
|
32
|
+
| --- | --- |
|
|
33
|
+
| [docs/index.md](docs/index.md) | what the plugin does, how it selects a backend, related projects |
|
|
34
|
+
| [docs/install.md](docs/install.md) | the dependencies and the backend extras |
|
|
35
|
+
| [docs/configuration.md](docs/configuration.md) | the configuration keys and a usage example |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""OPM Grapheme2Phoneme plugin backed by scriptconv's phonemizer registry.
|
|
2
2
|
|
|
3
|
-
scriptconv (https://github.com/TigreGotico/scriptconv) ships
|
|
3
|
+
scriptconv (https://github.com/TigreGotico/scriptconv) ships many phonemizer
|
|
4
4
|
backends behind a single registry and normalizes every one of them to IPA
|
|
5
5
|
output on request (``Alphabet.IPA``) - including backends that natively emit
|
|
6
6
|
ARPABET/X-SAMPA/etc, since notation conversion is exactly what scriptconv is
|
|
@@ -100,7 +100,7 @@ class ScriptconvG2PPlugin(Grapheme2PhonemePlugin):
|
|
|
100
100
|
def available_languages(self) -> Set[str]:
|
|
101
101
|
"""Languages supported by the configured phonemizer.
|
|
102
102
|
|
|
103
|
-
scriptconv's
|
|
103
|
+
scriptconv's backends expose language coverage inconsistently
|
|
104
104
|
(some declare a ``*_LANGS`` list, some a ``supported_langs()``
|
|
105
105
|
classmethod, some validate lazily per-call with no static list at
|
|
106
106
|
all) so this is best-effort:
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ovos-scriptconv-g2p-plugin
|
|
3
|
+
Version: 0.0.2a2
|
|
4
|
+
Summary: OPM G2P plugin over scriptconv: 45 phonemizers behind one config switch
|
|
5
|
+
Author-email: jarbasai <jarbasai@mailfence.com>
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/TigreGotico/ovos-scriptconv-g2p-plugin
|
|
8
|
+
Keywords: ovos,plugin,g2p,phonemizer,ipa,scriptconv
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Requires-Dist: ovos-plugin-manager<3.0.0,>=2.2.0
|
|
12
|
+
Requires-Dist: scriptconv<1.0.0,>=0.0.4a19
|
|
13
|
+
Dynamic: license-file
|
|
14
|
+
|
|
15
|
+
# ovos-scriptconv-g2p-plugin
|
|
16
|
+
|
|
17
|
+
An OVOS Plugin Manager (OPM) [Grapheme2Phoneme](https://github.com/OpenVoiceOS/ovos-plugin-manager)
|
|
18
|
+
plugin. It is a thin adapter over the phonemizer registry of
|
|
19
|
+
[scriptconv](https://github.com/TigreGotico/scriptconv): every phonemizer backend in its registry behind
|
|
20
|
+
one API, with the output of each backend converted to IPA. The configuration
|
|
21
|
+
selects the backend.
|
|
22
|
+
|
|
23
|
+
## Install
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pip install ovos-scriptconv-g2p-plugin
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Each phonemizer backend is an optional scriptconv extra, for example
|
|
30
|
+
`pip install scriptconv[espeak]`.
|
|
31
|
+
|
|
32
|
+
## Quickstart
|
|
33
|
+
|
|
34
|
+
```python
|
|
35
|
+
from ovos_plugin_manager.g2p import OVOSG2PFactory
|
|
36
|
+
|
|
37
|
+
config = {"g2p": {"module": "ovos-scriptconv-g2p-plugin",
|
|
38
|
+
"ovos-scriptconv-g2p-plugin": {"phonemizer": "espeak"}}}
|
|
39
|
+
g2p = OVOSG2PFactory.create(config)
|
|
40
|
+
print(g2p.get_ipa("hello", "en-us"))
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Documentation
|
|
44
|
+
|
|
45
|
+
| Page | Read it for |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| [docs/index.md](docs/index.md) | what the plugin does, how it selects a backend, related projects |
|
|
48
|
+
| [docs/install.md](docs/install.md) | the dependencies and the backend extras |
|
|
49
|
+
| [docs/configuration.md](docs/configuration.md) | the configuration keys and a usage example |
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: ovos-scriptconv-g2p-plugin
|
|
3
|
-
Version: 0.0.1a2
|
|
4
|
-
Summary: OPM G2P plugin over scriptconv: 45 phonemizers behind one config switch
|
|
5
|
-
Author-email: jarbasai <jarbasai@mailfence.com>
|
|
6
|
-
License: Apache-2.0
|
|
7
|
-
Project-URL: Homepage, https://github.com/TigreGotico/ovos-scriptconv-g2p-plugin
|
|
8
|
-
Keywords: ovos,plugin,g2p,phonemizer,ipa,scriptconv
|
|
9
|
-
Description-Content-Type: text/markdown
|
|
10
|
-
License-File: LICENSE
|
|
11
|
-
Requires-Dist: ovos-plugin-manager<3.0.0,>=2.1.0
|
|
12
|
-
Requires-Dist: scriptconv<1.0.0,>=0.0.4a19
|
|
13
|
-
Dynamic: license-file
|
|
14
|
-
|
|
15
|
-
# ovos-scriptconv-g2p-plugin
|
|
16
|
-
|
|
17
|
-
An OVOS Plugin Manager (OPM) [Grapheme2Phoneme](https://github.com/OpenVoiceOS/ovos-plugin-manager) plugin.
|
|
18
|
-
|
|
19
|
-
This plugin does not phonemize text itself. It is a thin adapter over
|
|
20
|
-
[scriptconv](https://github.com/TigreGotico/scriptconv)'s phonemizer
|
|
21
|
-
registry, which bundles 45 phonemizer backends behind one API and converts
|
|
22
|
-
every one of them to IPA on request - including backends that natively
|
|
23
|
-
emit ARPABET, X-SAMPA, or another notation, since notation conversion is
|
|
24
|
-
scriptconv's whole reason to exist.
|
|
25
|
-
|
|
26
|
-
Which backend runs is a matter of config, nothing else. Point `phonemizer`
|
|
27
|
-
at any [`scriptconv.phonemizers.Phonemizer`](https://github.com/TigreGotico/scriptconv)
|
|
28
|
-
registry name and this plugin uses it. Leave it unset and scriptconv's own
|
|
29
|
-
per-language `LANG_DEFAULTS`/fallback chain (explicit default ->
|
|
30
|
-
[orthography2ipa](https://github.com/TigreGotico/orthography2ipa) -> espeak)
|
|
31
|
-
picks a backend per word, same as calling `scriptconv.phonemizers.phonemize()`
|
|
32
|
-
directly.
|
|
33
|
-
|
|
34
|
-
Benchmarked and compared against the other G2P plugins in the
|
|
35
|
-
[ovos-plugin-arena](https://github.com/TigreGotico/ovos-plugin-arena).
|
|
36
|
-
|
|
37
|
-
## Install
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
pip install ovos-scriptconv-g2p-plugin
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
`scriptconv` and `ovos-plugin-manager` are the only hard dependencies.
|
|
44
|
-
Individual phonemizer backends are optional - scriptconv lazy-imports them,
|
|
45
|
-
and installing this plugin does **not** pull in any of the 45 backing
|
|
46
|
-
packages. If you configure a backend whose package isn't installed, you get
|
|
47
|
-
a clear `ImportError` naming the pip extra to install, e.g.:
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
pip install scriptconv[espeak] # espeak backend
|
|
51
|
-
pip install scriptconv[o2i] # orthography2ipa backend
|
|
52
|
-
pip install scriptconv[pt-phonemizers] # tugaphone backend
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
See scriptconv's `pyproject.toml` for the full extras list - one per
|
|
56
|
-
backend or language family.
|
|
57
|
-
|
|
58
|
-
## Configuration
|
|
59
|
-
|
|
60
|
-
```json
|
|
61
|
-
"g2p": {
|
|
62
|
-
"module": "ovos-scriptconv-g2p-plugin",
|
|
63
|
-
"ovos-scriptconv-g2p-plugin": {
|
|
64
|
-
"phonemizer": "espeak",
|
|
65
|
-
"lang": "en-us"
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
- `phonemizer` (optional): registry name of the scriptconv phonemizer to
|
|
71
|
-
use, e.g. `"espeak"`, `"orthography2ipa"`, `"tugaphone"`. Omit it to let
|
|
72
|
-
scriptconv pick the default backend per language.
|
|
73
|
-
- `lang` (optional): default language used when a caller doesn't pass one
|
|
74
|
-
explicitly.
|
|
75
|
-
- any other key is forwarded as a keyword argument to the underlying
|
|
76
|
-
scriptconv phonemizer constructor (`model`, `normalizer`, ...).
|
|
77
|
-
|
|
78
|
-
## Usage
|
|
79
|
-
|
|
80
|
-
```python
|
|
81
|
-
from ovos_plugin_manager.g2p import OVOSG2PFactory
|
|
82
|
-
|
|
83
|
-
config = {"g2p": {"module": "ovos-scriptconv-g2p-plugin",
|
|
84
|
-
"ovos-scriptconv-g2p-plugin": {"phonemizer": "espeak"}}}
|
|
85
|
-
g2p = OVOSG2PFactory.create(config)
|
|
86
|
-
print(g2p.get_ipa("hello", "en-us"))
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
## Links
|
|
90
|
-
|
|
91
|
-
- [scriptconv](https://github.com/TigreGotico/scriptconv) - the phonemizer
|
|
92
|
-
registry and notation converter this plugin wraps
|
|
93
|
-
- [ovos-plugin-manager](https://github.com/OpenVoiceOS/ovos-plugin-manager) -
|
|
94
|
-
defines the `Grapheme2PhonemePlugin` contract this plugin implements
|
|
95
|
-
- [ovos-plugin-arena](https://github.com/TigreGotico/ovos-plugin-arena) -
|
|
96
|
-
benchmarks this plugin against other G2P engines
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
# ovos-scriptconv-g2p-plugin
|
|
2
|
-
|
|
3
|
-
An OVOS Plugin Manager (OPM) [Grapheme2Phoneme](https://github.com/OpenVoiceOS/ovos-plugin-manager) plugin.
|
|
4
|
-
|
|
5
|
-
This plugin does not phonemize text itself. It is a thin adapter over
|
|
6
|
-
[scriptconv](https://github.com/TigreGotico/scriptconv)'s phonemizer
|
|
7
|
-
registry, which bundles 45 phonemizer backends behind one API and converts
|
|
8
|
-
every one of them to IPA on request - including backends that natively
|
|
9
|
-
emit ARPABET, X-SAMPA, or another notation, since notation conversion is
|
|
10
|
-
scriptconv's whole reason to exist.
|
|
11
|
-
|
|
12
|
-
Which backend runs is a matter of config, nothing else. Point `phonemizer`
|
|
13
|
-
at any [`scriptconv.phonemizers.Phonemizer`](https://github.com/TigreGotico/scriptconv)
|
|
14
|
-
registry name and this plugin uses it. Leave it unset and scriptconv's own
|
|
15
|
-
per-language `LANG_DEFAULTS`/fallback chain (explicit default ->
|
|
16
|
-
[orthography2ipa](https://github.com/TigreGotico/orthography2ipa) -> espeak)
|
|
17
|
-
picks a backend per word, same as calling `scriptconv.phonemizers.phonemize()`
|
|
18
|
-
directly.
|
|
19
|
-
|
|
20
|
-
Benchmarked and compared against the other G2P plugins in the
|
|
21
|
-
[ovos-plugin-arena](https://github.com/TigreGotico/ovos-plugin-arena).
|
|
22
|
-
|
|
23
|
-
## Install
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
pip install ovos-scriptconv-g2p-plugin
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
`scriptconv` and `ovos-plugin-manager` are the only hard dependencies.
|
|
30
|
-
Individual phonemizer backends are optional - scriptconv lazy-imports them,
|
|
31
|
-
and installing this plugin does **not** pull in any of the 45 backing
|
|
32
|
-
packages. If you configure a backend whose package isn't installed, you get
|
|
33
|
-
a clear `ImportError` naming the pip extra to install, e.g.:
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
pip install scriptconv[espeak] # espeak backend
|
|
37
|
-
pip install scriptconv[o2i] # orthography2ipa backend
|
|
38
|
-
pip install scriptconv[pt-phonemizers] # tugaphone backend
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
See scriptconv's `pyproject.toml` for the full extras list - one per
|
|
42
|
-
backend or language family.
|
|
43
|
-
|
|
44
|
-
## Configuration
|
|
45
|
-
|
|
46
|
-
```json
|
|
47
|
-
"g2p": {
|
|
48
|
-
"module": "ovos-scriptconv-g2p-plugin",
|
|
49
|
-
"ovos-scriptconv-g2p-plugin": {
|
|
50
|
-
"phonemizer": "espeak",
|
|
51
|
-
"lang": "en-us"
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
- `phonemizer` (optional): registry name of the scriptconv phonemizer to
|
|
57
|
-
use, e.g. `"espeak"`, `"orthography2ipa"`, `"tugaphone"`. Omit it to let
|
|
58
|
-
scriptconv pick the default backend per language.
|
|
59
|
-
- `lang` (optional): default language used when a caller doesn't pass one
|
|
60
|
-
explicitly.
|
|
61
|
-
- any other key is forwarded as a keyword argument to the underlying
|
|
62
|
-
scriptconv phonemizer constructor (`model`, `normalizer`, ...).
|
|
63
|
-
|
|
64
|
-
## Usage
|
|
65
|
-
|
|
66
|
-
```python
|
|
67
|
-
from ovos_plugin_manager.g2p import OVOSG2PFactory
|
|
68
|
-
|
|
69
|
-
config = {"g2p": {"module": "ovos-scriptconv-g2p-plugin",
|
|
70
|
-
"ovos-scriptconv-g2p-plugin": {"phonemizer": "espeak"}}}
|
|
71
|
-
g2p = OVOSG2PFactory.create(config)
|
|
72
|
-
print(g2p.get_ipa("hello", "en-us"))
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
## Links
|
|
76
|
-
|
|
77
|
-
- [scriptconv](https://github.com/TigreGotico/scriptconv) - the phonemizer
|
|
78
|
-
registry and notation converter this plugin wraps
|
|
79
|
-
- [ovos-plugin-manager](https://github.com/OpenVoiceOS/ovos-plugin-manager) -
|
|
80
|
-
defines the `Grapheme2PhonemePlugin` contract this plugin implements
|
|
81
|
-
- [ovos-plugin-arena](https://github.com/TigreGotico/ovos-plugin-arena) -
|
|
82
|
-
benchmarks this plugin against other G2P engines
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: ovos-scriptconv-g2p-plugin
|
|
3
|
-
Version: 0.0.1a2
|
|
4
|
-
Summary: OPM G2P plugin over scriptconv: 45 phonemizers behind one config switch
|
|
5
|
-
Author-email: jarbasai <jarbasai@mailfence.com>
|
|
6
|
-
License: Apache-2.0
|
|
7
|
-
Project-URL: Homepage, https://github.com/TigreGotico/ovos-scriptconv-g2p-plugin
|
|
8
|
-
Keywords: ovos,plugin,g2p,phonemizer,ipa,scriptconv
|
|
9
|
-
Description-Content-Type: text/markdown
|
|
10
|
-
License-File: LICENSE
|
|
11
|
-
Requires-Dist: ovos-plugin-manager<3.0.0,>=2.1.0
|
|
12
|
-
Requires-Dist: scriptconv<1.0.0,>=0.0.4a19
|
|
13
|
-
Dynamic: license-file
|
|
14
|
-
|
|
15
|
-
# ovos-scriptconv-g2p-plugin
|
|
16
|
-
|
|
17
|
-
An OVOS Plugin Manager (OPM) [Grapheme2Phoneme](https://github.com/OpenVoiceOS/ovos-plugin-manager) plugin.
|
|
18
|
-
|
|
19
|
-
This plugin does not phonemize text itself. It is a thin adapter over
|
|
20
|
-
[scriptconv](https://github.com/TigreGotico/scriptconv)'s phonemizer
|
|
21
|
-
registry, which bundles 45 phonemizer backends behind one API and converts
|
|
22
|
-
every one of them to IPA on request - including backends that natively
|
|
23
|
-
emit ARPABET, X-SAMPA, or another notation, since notation conversion is
|
|
24
|
-
scriptconv's whole reason to exist.
|
|
25
|
-
|
|
26
|
-
Which backend runs is a matter of config, nothing else. Point `phonemizer`
|
|
27
|
-
at any [`scriptconv.phonemizers.Phonemizer`](https://github.com/TigreGotico/scriptconv)
|
|
28
|
-
registry name and this plugin uses it. Leave it unset and scriptconv's own
|
|
29
|
-
per-language `LANG_DEFAULTS`/fallback chain (explicit default ->
|
|
30
|
-
[orthography2ipa](https://github.com/TigreGotico/orthography2ipa) -> espeak)
|
|
31
|
-
picks a backend per word, same as calling `scriptconv.phonemizers.phonemize()`
|
|
32
|
-
directly.
|
|
33
|
-
|
|
34
|
-
Benchmarked and compared against the other G2P plugins in the
|
|
35
|
-
[ovos-plugin-arena](https://github.com/TigreGotico/ovos-plugin-arena).
|
|
36
|
-
|
|
37
|
-
## Install
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
pip install ovos-scriptconv-g2p-plugin
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
`scriptconv` and `ovos-plugin-manager` are the only hard dependencies.
|
|
44
|
-
Individual phonemizer backends are optional - scriptconv lazy-imports them,
|
|
45
|
-
and installing this plugin does **not** pull in any of the 45 backing
|
|
46
|
-
packages. If you configure a backend whose package isn't installed, you get
|
|
47
|
-
a clear `ImportError` naming the pip extra to install, e.g.:
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
pip install scriptconv[espeak] # espeak backend
|
|
51
|
-
pip install scriptconv[o2i] # orthography2ipa backend
|
|
52
|
-
pip install scriptconv[pt-phonemizers] # tugaphone backend
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
See scriptconv's `pyproject.toml` for the full extras list - one per
|
|
56
|
-
backend or language family.
|
|
57
|
-
|
|
58
|
-
## Configuration
|
|
59
|
-
|
|
60
|
-
```json
|
|
61
|
-
"g2p": {
|
|
62
|
-
"module": "ovos-scriptconv-g2p-plugin",
|
|
63
|
-
"ovos-scriptconv-g2p-plugin": {
|
|
64
|
-
"phonemizer": "espeak",
|
|
65
|
-
"lang": "en-us"
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
- `phonemizer` (optional): registry name of the scriptconv phonemizer to
|
|
71
|
-
use, e.g. `"espeak"`, `"orthography2ipa"`, `"tugaphone"`. Omit it to let
|
|
72
|
-
scriptconv pick the default backend per language.
|
|
73
|
-
- `lang` (optional): default language used when a caller doesn't pass one
|
|
74
|
-
explicitly.
|
|
75
|
-
- any other key is forwarded as a keyword argument to the underlying
|
|
76
|
-
scriptconv phonemizer constructor (`model`, `normalizer`, ...).
|
|
77
|
-
|
|
78
|
-
## Usage
|
|
79
|
-
|
|
80
|
-
```python
|
|
81
|
-
from ovos_plugin_manager.g2p import OVOSG2PFactory
|
|
82
|
-
|
|
83
|
-
config = {"g2p": {"module": "ovos-scriptconv-g2p-plugin",
|
|
84
|
-
"ovos-scriptconv-g2p-plugin": {"phonemizer": "espeak"}}}
|
|
85
|
-
g2p = OVOSG2PFactory.create(config)
|
|
86
|
-
print(g2p.get_ipa("hello", "en-us"))
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
## Links
|
|
90
|
-
|
|
91
|
-
- [scriptconv](https://github.com/TigreGotico/scriptconv) - the phonemizer
|
|
92
|
-
registry and notation converter this plugin wraps
|
|
93
|
-
- [ovos-plugin-manager](https://github.com/OpenVoiceOS/ovos-plugin-manager) -
|
|
94
|
-
defines the `Grapheme2PhonemePlugin` contract this plugin implements
|
|
95
|
-
- [ovos-plugin-arena](https://github.com/TigreGotico/ovos-plugin-arena) -
|
|
96
|
-
benchmarks this plugin against other G2P engines
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ovos_scriptconv_g2p_plugin-0.0.1a2 → ovos_scriptconv_g2p_plugin-0.0.2a2}/test/test_plugin.py
RENAMED
|
File without changes
|