当前位置: 首页 > article >正文

C# 调用 VITS,推理模型 将文字转wav音频调试 -数字人分支

Microsoft.ML.OnnxRuntime.OnnxRuntimeException: [ErrorCode:InvalidArgument] Input name: 'input_name' is not in the metadata
   在 Microsoft.ML.OnnxRuntime.InferenceSession.LookupInputMetadata(String nodeName) 位置 D:\a\_work\1\s\csharp\src\Microsoft.ML.OnnxRuntime\InferenceSession.shared.cs:行号 862
   在 Microsoft.ML.OnnxRuntime.InferenceSession.LookupUtf8Names[T](IReadOnlyCollection`1 values, NameExtractor`1 nameExtractor, MetadataLookup metaLookup) 位置 D:\a\_work\1\s\csharp\src\Microsoft.ML.OnnxRuntime\InferenceSession.shared.cs:行号 920
   在 Microsoft.ML.OnnxRuntime.InferenceSession.Run(IReadOnlyCollection`1 inputs, IReadOnlyCollection`1 outputNames, RunOptions options) 位置 D:\a\_work\1\s\csharp\src\Microsoft.ML.OnnxRuntime\InferenceSession.shared.cs:行号 250
   在 Microsoft.ML.OnnxRuntime.InferenceSession.Run(IReadOnlyCollection`1 inputs) 位置 D:\a\_work\1\s\csharp\src\Microsoft.ML.OnnxRuntime\InferenceSession.shared.cs:行号 224
   在 CyberWin.Trade.AGILoader.Form1.btn_启动_Click(Object sender, EventArgs e) 位置 D:\MyWork\aiwlzc\CyberWin.Trade.AGILoader\CyberWin.Trade.AGILoader\Form1.cs:行号 37
   在 System.Windows.Forms.Control.OnClick(EventArgs e)

 VITS(Variational Inference with adversarial learning for end-to-end Text-to-Speech)是一种结合变分推理(variational inference)、标准化流(normalizing flows)和对抗训练的高表现力语音合成模型。VITS通过隐变量而非频谱串联起来语音合成中的声学模型和声码器,在隐变量上进行随机建模并利用随机时长预测器,提高了合成语音的多样性,输入

模型下载

vits — sherpa 1.3 documentation

python 运行

cd /path/to/sherpa-onnx

python3 ./python-api-examples/offline-tts-play.py \
 --vits-model=./vits-melo-tts-zh_en/model.onnx \
 --vits-lexicon=./vits-melo-tts-zh_en/lexicon.txt \
 --vits-tokens=./vits-melo-tts-zh_en/tokens.txt \
 --vits-dict-dir=./vits-melo-tts-zh_en/dict \
 --output-filename=./zh-en-3.wav \
 "它也支持繁体字. 我相信你們一定聽過愛迪生說過的這句話Genius is one percent inspiration and ninety-nine percent perspiration. "

C++ 命令

 cd /path/to/sherpa-onnx

./build/bin/sherpa-onnx-offline-tts \
  --vits-model=./vits-piper-en_US-glados/en_US-glados.onnx\
  --vits-tokens=./vits-piper-en_US-glados/tokens.txt \
  --vits-data-dir=./vits-piper-en_US-glados/espeak-ng-data \
  --output-filename=./glados-liliana.wav \
  "liliana, the most beautiful and lovely assistant of our team!"

./build/bin/sherpa-onnx-offline-tts \
  --vits-model=./vits-piper-en_US-glados/en_US-glados.onnx\
  --vits-tokens=./vits-piper-en_US-glados/tokens.txt \
  --vits-data-dir=./vits-piper-en_US-glados/espeak-ng-data \
  --output-filename=./glados-code.wav \
  "Talk is cheap. Show me the code."

./build/bin/sherpa-onnx-offline-tts \
  --vits-model=./vits-piper-en_US-glados/en_US-glados.onnx\
  --vits-tokens=./vits-piper-en_US-glados/tokens.txt \
  --vits-data-dir=./vits-piper-en_US-glados/espeak-ng-data \
  --output-filename=./glados-men.wav \
   "Today as always, men fall into two groups: slaves and free men. Whoever does not have two-thirds of his day for himself, is a slave, whatever he may be: a statesman, a businessman, an official, or a scholar."


http://www.kler.cn/a/596839.html

相关文章:

  • 电力和冷却管理:如何让数据中心“高效降温”同时节能增效
  • 第三十一篇 数据仓库(DW)与商业智能(BI)架构设计与实践指南
  • 3.22日竞蓝全扫盘
  • #include <hello.h> 与 #include “hello.h“的区别
  • RDMA栈架构
  • 并发和并行、同步和异步、进程和线程的关系
  • RK3568开发笔记-egtouch触摸屏ubuntu系统屏幕校准
  • postgresql 对 lz4 压缩算法的支持
  • 2维压缩感知SL0重构实现算法
  • DFS刷题
  • 树莓派5的供电与启动
  • 强大的AI网站推荐(第三集)—— AskO3
  • MyBatis-Plus 的加载及初始化
  • FastAPI WebSocket 无法获取真实 IP 错误记录
  • 蓝桥杯 劲舞团
  • Springboot之RequestAttributes学习笔记
  • 【深度学习入门_机器学习理论】梯度提升决策树(GBDT)
  • 【算法学习之路】13.BFS
  • 【go】如何处理可选配置
  • CSS 中@media查询的工作原理,如何利用它实现不同设备的样式适配