This model is used for formatting raw asr text output from spoken text to written text (Eg. date, number, id, ...). It also supports formatting "out of vocab" by using external vocabulary.
Some of examples:
input : tám giờ chín phút ngày mười tám tháng năm năm hai nghìn không trăm hai mươi hai
output : 8h9 18/5/2022
input : mã số quy đê tê tê đê hai tám chéo hai không không ba
output : mã số qdttd28/2003
input : thể tích tám mét khối trọng lượng năm mươi ki lô gam
output : thể tích 8 m3 trọng lượng 50 kg
input : ngày hai tám tháng tư cô vít bùng phát ở sờ cốt lờn chiếm tám mươi phần trăm là biến chủng đen ta và bê ta
ex_vocab : ['scotland', 'covid', 'delta', 'beta']
output : 28/4 covid bùng phát ở scotland chiếm 80 % là biến chủng delta và beta
import torch
import model_handling
from data_handling import DataCollatorForNormSeq2Seq
from model_handling import EncoderDecoderSpokenNorm
import os
os.environ["CUDA_VISIBLE_DEVICES"] = ""
Init tokenizer and model
tokenizer = model_handling.init_tokenizer()
model = EncoderDecoderSpokenNorm.from_pretrained('nguyenvulebinh/spoken-norm', cache_dir=model_handling.cache_dir)
data_collator = DataCollatorForNormSeq2Seq(tokenizer)
Infer sample
bias_list = ['scotland', 'covid', 'delta', 'beta']
input_str = 'ngày hai tám tháng tư cô vít bùng phát ở sờ cốt lờn chiếm tám mươi phần trăm là biến chủng đen ta và bê ta'
Runs of nguyenvulebinh spoken-norm on huggingface.co
2
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs
More Information About spoken-norm huggingface.co Model
spoken-norm huggingface.co
spoken-norm huggingface.co is an AI model on huggingface.co that provides spoken-norm's model effect (), which can be used instantly with this nguyenvulebinh spoken-norm model. huggingface.co supports a free trial of the spoken-norm model, and also provides paid use of the spoken-norm. Support call spoken-norm model through api, including Node.js, Python, http.
spoken-norm huggingface.co is an online trial and call api platform, which integrates spoken-norm's modeling effects, including api services, and provides a free online trial of spoken-norm, you can try spoken-norm online for free by clicking the link below.
nguyenvulebinh spoken-norm online free url in huggingface.co:
spoken-norm is an open source model from GitHub that offers a free installation service, and any user can find spoken-norm on GitHub to install. At the same time, huggingface.co provides the effect of spoken-norm install, users can directly use spoken-norm installed effect in huggingface.co for debugging and trial. It also supports api for free installation.