Skip to content

Grapheme Phone Alignment submodule for the tensor2tensor tensorflow package

License

Notifications You must be signed in to change notification settings

OlivierDehaene/GPA4.0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GPA 4.0

GPA4.0, or gpa is a submodule developed for the Tensor2Tensor library. It does Grapheme-to-Phoneme (G2P) conversion and Grapheme-Phoneme-Alignement using the Transformer model. Transformer is a sequence-to-sequence model that was successfully applied to numerous tasks, including Neural Machine Translation [1]. G2P is a task that was solved in the past using LSTM RNN based architectures [2] [3]. We build on these results and propose a new G2P and semi-supervised GPAlignement tool. Find out more.

Results

Data set WER PER
CMU 20.8667% 4.5933%
FR 3.1831% 0.8889%
BR 2.7672% 0.5485%
ES 0.3784% 0.0744%

Quick Start

# Clone the repository
git clone https://github.com/OlivierDehaene/GPA4.0

# Install the gpa package and its dependencies
cd GPA4.0
pip install -e .

# Train
DATA_DIR=$HOME/gpa_data
TRAIN_DIR=$HOME/gpa_checkpoints

gpa-train # a simple t2t-trainer wrapper with gpa default settings
  --data_dir=$DATA_DIR \
  --output_dir=$TRAIN_DIR

# Decode 

DECODE_FILE=./decode_this.txt
echo "Hello" >> $DECODE_FILE
echo "world" >> $DECODE_FILE

gpa-decoder 
  --model_dir=$TRAIN_DIR \
  --decode_from_file=$DECODE_FILE \
  --decode_to_file=phonology_gpmatch.csv \
  --data_dir=$DATA_DIR
  
# See the phonology translation and the grapheme-phoneme alignement
cat phonology_gpmatch.csv

About

Grapheme Phone Alignment submodule for the tensor2tensor tensorflow package

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages