speechbrain / soundchoice-g2p

huggingface.co
Total runs: 659
24-hour runs: 0
7-day runs: 0
30-day runs: -383
Model's Last Updated: July 16 2024
text-generation

Introduction of soundchoice-g2p

Model Details of soundchoice-g2p

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)

Given below is the expected output

>>> phonemes
['T', 'UW', ' ', 'B', 'IY', ' ', 'AO', 'R', ' ', 'N', 'AA', 'T', ' ', 'T', 'UW', ' ', 'B', 'IY', ' ', 'DH', 'AE', 'T', ' ', 'IH', 'Z', ' ', 'DH', 'AH', ' ', 'K', 'W', 'EH', 'S', 'CH', 'AH', 'N']

To perform G2P conversion on a batch of text, pass an array of strings to the interface:

items = [
    "All's Well That Ends Well",
    "The Merchant of Venice",
    "The Two Gentlemen of Verona",
    "The Comedy of Errors"
]
transcriptions = g2p(items)

Given below is the expected output:

>>> transcriptions
[['AO', 'L', 'Z', ' ', 'W', 'EH', 'L', ' ', 'DH', 'AE', 'T', ' ', 'EH', 'N', 'D', 'Z', ' ', 'W', 'EH', 'L'], ['DH', 'AH', ' ', 'M', 'ER', 'CH', 'AH', 'N', 'T', ' ', 'AH', 'V', ' ', 'V', 'EH', 'N', 'AH', 'S'], ['DH', 'AH', ' ', 'T', 'UW', ' ', 'JH', 'EH', 'N', 'T', 'AH', 'L', 'M', 'IH', 'N', ' ', 'AH', 'V', ' ', 'V', 'ER', 'OW', 'N', 'AH'], ['DH', 'AH', ' ', 'K', 'AA', 'M', 'AH', 'D', 'IY', ' ', 'AH', 'V', ' ', 'EH', 'R', 'ER', 'Z']]
Inference on GPU

To perform inference on the GPU, add run_opts={"device":"cuda"} when calling the from_hparams method.

Limitations

The SpeechBrain team does not provide any warranty on the performance achieved by this model when used on other datasets.

Training

The model was trained with SpeechBrain (aa018540). To train it from scratch follows these steps:

  1. Clone SpeechBrain:
git clone https://github.com/speechbrain/speechbrain/
  1. Install it:
cd speechbrain
pip install -r requirements.txt
pip install -e .
  1. 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}
}

About SpeechBrain

Runs of speechbrain soundchoice-g2p on huggingface.co

659
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
-383
30-day runs

More Information About soundchoice-g2p huggingface.co Model

More soundchoice-g2p license Visit here:

https://choosealicense.com/licenses/apache-2.0

soundchoice-g2p huggingface.co

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.

speechbrain soundchoice-g2p online free

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:

https://huggingface.co/speechbrain/soundchoice-g2p

soundchoice-g2p install

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.

soundchoice-g2p install url in huggingface.co:

https://huggingface.co/speechbrain/soundchoice-g2p

Url of soundchoice-g2p

soundchoice-g2p huggingface.co Url

Provider of soundchoice-g2p huggingface.co

speechbrain
ORGANIZATIONS

Other API from speechbrain

huggingface.co

Total runs: 3.2K
Run Growth: 1.8K
Growth Rate: 55.19%
Updated:February 26 2024