Transformer based model for Grapheme to Phoneme Conversion.
Instead of directly adding inputs to positional encodings, LayerNormalisation is done on inputs to improve diagonal attention which is a crucial factor in Grapheme to Phoneme task.
- Clone the repo
git clone https://github.com/Bheshaj-Kumar/Transformer-Grapheme-to-Phoneme-Conversion.git
- Install Following Packages
- tensorflow==2.3
- ruamel.yaml
- editdistance
- tqdm
- bunchify
python train_g2p.py --config_path /path/to/model_config.yaml --session_name "session_name" --data_dir /path/to/data -sv_file /path/to/source_vocab_file -tv_file /path/to/target_vocab_file
python train_g2p.py --config_path /path/to/model_config.yaml --session_name "session_name" --data_dir /path/to/data --eval -sv_file /path/to/source_vocab_file -tv_file /path/to/target_vocab_file
- This repo already contains the required CMU DICT data at their default paths. If you want to change data, change the path accordingly.