mini-bart-g2p
is a seq2seq model based on the
BART architecture
.
We spruce down the number of layers and transformer heads in the original BART architecture to ensure that we can reliably train the model for the grapheme to phoneme conversion task.
Intended Uses
The input is expected to contain English words consisting of Latin letters and certain punctuation symbols.
The model has been trained to take as input a single word at a time and
will return unexpected results when fed multiple words as a single input
.
The
HuggingFace tokenizer
provided is configured to normalize the words into lowercase and separates the letters by space under the hood, so while using the model you may provide the words normally without separation between letters.
The model provides output in the form of phonemes along with their corresponding stress numbers. It is also capable of generating phonemes for words that may be hyphenated or have apostrophes present.
How to Use
from transformers import pipeline
pipe = pipeline(task="text2text-generation", model="cisco-ai/mini-bart-g2p")
text = "hello world"# DO NOT DO ```pipe(text)``` as this will produce unexpected results.
pipe(text.split())
# [{'translation_text': 'HH EH1 L OW0'}, {'translation_text': 'W ER1 L D'}]
text = "co-workers coworkers hunter's hunter"
pipe(text.split())
# [{'translation_text': 'K OW1 W ER1 K ER0 Z'}, {'translation_text': 'K OW1 W ER1 K ER0 Z'}, {'translation_text': 'HH AH1 N T ER0 Z'}, {'translation_text': 'HH AH1 N T ER0'}]
The model has some limitations in it's current form which we list for full transparency.
The
mini-bart-g2p
model is trained to only work on the English language.
The model does not produce consistent behavior when non-apostrophe punctuation symbols are part of the input word.
We recommend stripping the words of all non-essential punctuation symbols before running it through the pipeline.
text = "world world!"
pipe(text.split())
# [{'translation_text': 'W ER1 L D'}, {'translation_text': 'W ER1 L D F'}]
mini-bart-g2p huggingface.co is an AI model on huggingface.co that provides mini-bart-g2p's model effect (), which can be used instantly with this cisco-ai mini-bart-g2p model. huggingface.co supports a free trial of the mini-bart-g2p model, and also provides paid use of the mini-bart-g2p. Support call mini-bart-g2p model through api, including Node.js, Python, http.
mini-bart-g2p huggingface.co is an online trial and call api platform, which integrates mini-bart-g2p's modeling effects, including api services, and provides a free online trial of mini-bart-g2p, you can try mini-bart-g2p online for free by clicking the link below.
cisco-ai mini-bart-g2p online free url in huggingface.co:
mini-bart-g2p is an open source model from GitHub that offers a free installation service, and any user can find mini-bart-g2p on GitHub to install. At the same time, huggingface.co provides the effect of mini-bart-g2p install, users can directly use mini-bart-g2p installed effect in huggingface.co for debugging and trial. It also supports api for free installation.