Update README.md
Browse files
README.md
CHANGED
|
@@ -146,6 +146,27 @@ language:
|
|
| 146 |
|
| 147 |
## G2P+ Phonemizer
|
| 148 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 149 |
```
|
| 150 |
@misc{goriely2025ipachildesg2pfeaturerich,
|
| 151 |
title={IPA-CHILDES & G2P+: Feature-Rich Resources for Cross-Lingual Phonology and Phonemic Language Modeling},
|
|
|
|
| 146 |
|
| 147 |
## G2P+ Phonemizer
|
| 148 |
|
| 149 |
+
We use G2P+ to phonemize Universal Dependencies. Here is an example usage:
|
| 150 |
+
|
| 151 |
+
|
| 152 |
+
```
|
| 153 |
+
# Install required packages
|
| 154 |
+
!apt-get install -y espeak-ng
|
| 155 |
+
!pip install phonemizer g2p-plus
|
| 156 |
+
# Set the environment variable from Python
|
| 157 |
+
import os
|
| 158 |
+
os.environ["PHONEMIZER_ESPEAK_LIBRARY"] = "/usr/lib/x86_64-linux-gnu/libespeak-ng.so.1"
|
| 159 |
+
|
| 160 |
+
# Now run your transcription
|
| 161 |
+
from g2p_plus import transcribe_utterances
|
| 162 |
+
|
| 163 |
+
lines = ['hello there!', 'nice to meet you.']
|
| 164 |
+
phonemized = transcribe_utterances(lines, "phonemizer", "en-gb", keep_word_boundaries=True)
|
| 165 |
+
print(phonemized)
|
| 166 |
+
```
|
| 167 |
+
|
| 168 |
+
|
| 169 |
+
|
| 170 |
```
|
| 171 |
@misc{goriely2025ipachildesg2pfeaturerich,
|
| 172 |
title={IPA-CHILDES & G2P+: Feature-Rich Resources for Cross-Lingual Phonology and Phonemic Language Modeling},
|