NeuML/ljspeech-jets-onnx简介
发布时间:2026-05-17 01:05:54
文章来源:www.cxwl.com
访问次数:8
ESPnet JETS Text-to-Speech (TTS) Model for ONNX
imdanboy/jets exported to ONNX. This model is an ONNX export using the espnet_onnx library.
Usage with txtai
txtai has a built in Text to Speech (TTS) pipeline that makes using this model easy.
import soundfile as sf
from txtai.pipeline import TextToSpeech
# Build pipeline
tts = TextToSpeech("NeuML/ljspeech-jets-onnx")
# Generate speech
speech = tts("Say something here")
# Write to file
sf.write("out.wav", speech, 22050)
Usage with ONNX

This model can also be run directly with ONNX provided the input text is tokenized. Tokenization can be done with ttstokenizer.
Note that the txtai pipeline has additional functionality such as batching large inputs together that would need to be duplicated with this method.
import onnxruntime
import soundfile as sf
import yaml
from ttstokenizer import TTSTokenizer
# This example assumes the files have been downloaded locally
with open("ljspeech-jets-onnx/config.yaml", "r", encoding="utf-8") as f:
config = yaml.safe_load(f)
# Create model
model = onnxruntime.InferenceSession(
"ljspeech-jets-onnx/model.onnx",
providers=["CPUExecutionProvider"]
)
# Create tokenizer
tokenizer = TTSTokenizer(config["token"]["list"])
# Tokenize inputs
inputs = tokenizer("Say something here")
# Generate speech
outputs = model.run(None, {"text": inputs})
# Write to file
sf.write("out.wav", outputs[0], 22050)
How to export
More information on how to export ESPnet models to ONNX can be found here.
标签:漫画下载,pdf漫画下载,跨境电商,媒体,独立站,百度文库,站联,影音网站,PanDownload,其它网站
关于文章《NeuML/ljspeech-jets-onnx简介》特别声明
《NeuML/ljspeech-jets-onnx简介》更新日期为:2026-05-17 01:05:54;目前浏览的小伙伴达到8,初夏导航所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系

