Phonemizer¶
The phonemizer allows simple phonemisation of words and texts in many languages. It is based on four backends: espeak, espeak-mbrola, festival and segments.
Phonemizer is available as an Apptainer container on Apocrita.
Usage¶
Calling python
after loading the phonemize
module will invoke the
installed version of Python inside the container.
To run the default installed version of phonemizer, simply load the
phonemize
module:
$ module load phonemize
$ phonemize --version
phonemizer-VERSION
available backends: espeak-ng, espeak-mbrola, festival, segments
For full usage documentation, run phonemize --help
.
Example jobs¶
Serial jobs¶
Here is an example job running running on 1 core and 1GB memory:
#!/bin/bash
#$ -cwd
#$ -j y
#$ -pe smp 1
#$ -l h_rt=1:0:0
#$ -l h_vmem=1G
module load phonemize
# Phonemize phrase using English (GB) dialect within the espeak backend engine
echo 'The quick brown fox jumps over the lazy dog' | phonemize -l en-gb -b espeak
Here is an output this job will produce:
ðə kwɪk bɹaʊn fɒks dʒʌmps əʊvə ðə leɪzi dɒɡ
Here is an example job running running Python on 1 core and 1GB memory:
#!/bin/bash
#$ -cwd
#$ -j y
#$ -pe smp 1
#$ -l h_rt=1:0:0
#$ -l h_vmem=1G
module load phonemize
python -c "from phonemizer import phonemize; \
print(phonemize(['line1', 'line2']))"
Here is an output this job will produce:
['laɪn wʌn ', 'laɪn tuː ']