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

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."

相关文章:

  • Leetcode 刷题笔记1 图论part04
  • [思考记录]两则:宏观视角、理想化
  • #echarts#折线图#饼图
  • @JsonSerialize注解
  • 机器臂运动控制算法工程师面试
  • LVGL常用功能备忘
  • STM32基础教程——定时器
  • 天梯赛 L2-013 红色警报
  • 2025海外华文新媒体高级人才研修班在广西南宁举办
  • Java实体类(Javabean)-编程规范
  • 自动学习和优化过程,实现更加精准的预测和决策的智慧交通开源了
  • 神聖的綫性代數速成例題13. 非齊次方程組解的性質、非齊次方程組解的討論
  • python:music21 构建 LSTM+GAN 模型生成爵士风格音乐
  • [笔记] TinyWebServer编译及demo运行过程
  • 什么是PHP伪协议
  • 详细解释计算机系统中的大小端
  • Unity摄像机基本操作详解:移动、旋转与缩放
  • qt实现一个简单http服务器和客户端
  • 前端(vue)学习笔记(CLASS 5):自定义指令插槽路由
  • 熔断降级(Sentinel解决)
  • 国家能源局通报上月投诉情况:赤峰有群众反映电费异常增高,已退费
  • 中国科学院院士张泽民已任重庆医科大学校长
  • 庄语乐︱宋代历史是被“塑造”出来的吗?
  • 金融创新破局记:中小微企业转型背后的金融力量
  • 人社部:就业政策储备充足,将会根据形势变化及时推出
  • 李勇已任内蒙古乌兰察布市委副书记,曾在中央编办任职