(function(){var el = document.createElement("script");el.src = "https://lf1-cdn-tos.bytegoofy.com/goofy/ttzz/push.js?0fd7cab5264a0de33b798f00c6b460fb0c1e12a69e1478bfe42a3cdd45db451bbc434964556b7d7129e9b750ed197d397efd7b0c6c715c1701396e1af40cec962b8d7c8c6655c9b00211740aa8a98e2e";el.id = "ttzz";var s = document.getElementsByTagName("script")[0];s.parentNode.insertBefore(el, s);})(window)

NeuML/ljspeech-jets-onnx

古风汉服美女图集


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.


NeuML/ljspeech-jets-onnx
收录说明:
1、本网页并非 NeuML/ljspeech-jets-onnx 官网网址页面,此页面内容编录于互联网,只作展示之用;
2、如果有与 NeuML/ljspeech-jets-onnx 相关业务事宜,请访问其网站并获取联系方式;
3、本站与 NeuML/ljspeech-jets-onnx 无任何关系,对于 NeuML/ljspeech-jets-onnx 网站中的信息,请用户谨慎辨识其真伪。
4、本站收录 NeuML/ljspeech-jets-onnx 时,此站内容访问正常,如遇跳转非法网站,有可能此网站被非法入侵或者已更换新网址,导致旧网址被非法使用,
5、如果你是网站站长或者负责人,不想被收录请邮件删除:i-hu#Foxmail.com (#换@)

前往AI网址导航
© 版权声明

相关文章