SoundChoice: Grapheme-to-Phoneme Models with Semantic Disambiguation
This repository provides all the necessary tools to perform English grapheme-to-phoneme conversion with a pretrained SoundChoice G2P model using SpeechBrain. It is trained on LibriG2P training data derived from
LibriSpeech Alignments
and
Google Wikipedia
Install SpeechBrain
First of all, please install SpeechBrain with the following command (local installation):
pip install speechbrain
pip install transformers
Please notice that we encourage you to read our tutorials and learn more about
SpeechBrain
.
Perform G2P Conversion
Please follow the example below to perform grapheme-to-phoneme conversion with a high-level wrapper.
from speechbrain.inference.text import GraphemeToPhoneme
g2p = GraphemeToPhoneme.from_hparams("speechbrain/soundchoice-g2p", savedir="pretrained_models/soundchoice-g2p")
text = "To be or not to be, that is the question"
phonemes = g2p(text)
cd speechbrain
pip install -r requirements.txt
pip install -e .
Run Training:
cd recipes/LibriSpeech/G2P
python train.py hparams/hparams_g2p_rnn.yaml --data_folder=your_data_folder
Adjust hyperparameters as needed by passing additional arguments.
Citing SpeechBrain
Please, cite SpeechBrain if you use it for your research or business.
@misc{speechbrain,
title={{SpeechBrain}: A General-Purpose Speech Toolkit},
author={Mirco Ravanelli and Titouan Parcollet and Peter Plantinga and Aku Rouhe and Samuele Cornell and Loren Lugosch and Cem Subakan and Nauman Dawalatabad and Abdelwahab Heba and Jianyuan Zhong and Ju-Chieh Chou and Sung-Lin Yeh and Szu-Wei Fu and Chien-Feng Liao and Elena Rastorgueva and François Grondin and William Aris and Hwidong Na and Yan Gao and Renato De Mori and Yoshua Bengio},
year={2021},
eprint={2106.04624},
archivePrefix={arXiv},
primaryClass={eess.AS},
note={arXiv:2106.04624}
}
Also please cite the SoundChoice G2P paper on which this pretrained model is based:
@misc{ploujnikov2022soundchoice,
title={SoundChoice: Grapheme-to-Phoneme Models with Semantic Disambiguation},
author={Artem Ploujnikov and Mirco Ravanelli},
year={2022},
eprint={2207.13703},
archivePrefix={arXiv},
primaryClass={cs.SD}
}
soundchoice-g2p huggingface.co is an AI model on huggingface.co that provides soundchoice-g2p's model effect (), which can be used instantly with this speechbrain soundchoice-g2p model. huggingface.co supports a free trial of the soundchoice-g2p model, and also provides paid use of the soundchoice-g2p. Support call soundchoice-g2p model through api, including Node.js, Python, http.
soundchoice-g2p huggingface.co is an online trial and call api platform, which integrates soundchoice-g2p's modeling effects, including api services, and provides a free online trial of soundchoice-g2p, you can try soundchoice-g2p online for free by clicking the link below.
speechbrain soundchoice-g2p online free url in huggingface.co:
soundchoice-g2p is an open source model from GitHub that offers a free installation service, and any user can find soundchoice-g2p on GitHub to install. At the same time, huggingface.co provides the effect of soundchoice-g2p install, users can directly use soundchoice-g2p installed effect in huggingface.co for debugging and trial. It also supports api for free installation.