Comments (6)
Could you post any errors if it does not work for you?
from sherpa-onnx.
i added nuget package to uwp gui app, while running the app and click on syntisizye it thorws an error
System.Runtime.InteropServices.SEHException: 'External component has thrown an exception.'
using Windows.UI.Xaml.Controls;
using SherpaOnnx;
using Windows.Storage.Pickers;
using Windows.Storage;
using System;
namespace TEST
{
public sealed partial class MainPage : Page
{
private OfflineTtsConfig config;
public MainPage()
{
this.InitializeComponent();
config = new OfflineTtsConfig();
}
private async void ModelBrowseButton_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
{
FileOpenPicker picker = new FileOpenPicker();
picker.FileTypeFilter.Add(".onnx");
StorageFile file = await picker.PickSingleFileAsync();
if (file != null)
{
ModelTextBox.Text = file.Path;
}
}
private void SynthesizeButton_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e)
{
config.Model.Vits.Model = ModelTextBox.Text;
config.Model.Vits.Lexicon = LexiconTextBox.Text;
config.Model.Vits.Tokens = TokensTextBox.Text;
config.Model.Vits.DataDir = DataDirTextBox.Text;
config.Model.Debug = DebugCheckBox.IsChecked == true ? 1 : 0;
config.Model.Provider = "cpu";
float speed = 1.0f / config.Model.Vits.LengthScale;
int sid = int.Parse(SpeakerIdTextBox.Text);
OfflineTts tts = new OfflineTts(config);
OfflineTtsGeneratedAudio audio = tts.Generate(TextTextBox.Text, speed, sid);
bool ok = audio.SaveToWaveFile(OutputFilenameTextBox.Text);
if (ok)
{
ResultTextBlock.Text = $"Audio saved to {OutputFilenameTextBox.Text}";
}
else
{
ResultTextBlock.Text = $"Failed to save audio to {OutputFilenameTextBox.Text}";
}
}
}
}
from sherpa-onnx.
could you give more error logs?
from sherpa-onnx.
Name | Value | Type | |
---|---|---|---|
▶ | $exception | {"External component has thrown an exception."} | System.Runtime.InteropServices.SEHException |
Name | Value | Type | |
---|---|---|---|
speed | 1 | float | |
sid | 2 | int | |
tts | null | SherpaOnnx.OfflineTts | |
audio | null | SherpaOnnx.OfflineTtsGeneratedAudio | |
ok | false | bool |
Name | Value | Type | |
---|---|---|---|
◢ | TargetSite | {IntPtr SherpaOnnxCreateOfflineTts(SherpaOnnx.OfflineTtsConfig ByRef)} | System.Reflection.MethodBase {System.Reflection.RuntimeMethodInfo} |
Attributes | Private | Static | HideBySig | PinvokeImpl | System.Reflection.MethodAttributes | |
CallingConvention | Standard | System.Reflection.CallingConventions | |
ContainsGenericParameters | false | bool | |
CustomAttributes | Method System.Reflection.MemberInfo.get_CustomAttributes cannot be called in this context. | System.Collections.Generic.IEnumerable<System.Reflection.CustomAttributeData> | |
▶ DeclaringType | {Name = "OfflineTts" FullName = "SherpaOnnx.OfflineTts"} | System.Type {System.RuntimeType} | |
IsAbstract | false | bool | |
IsAssembly | false | bool | |
IsConstructedGenericMethod | Method System.Reflection.MethodBase.get_IsConstructedGenericMethod cannot be called in this context. | bool |
from sherpa-onnx.
tts | null | SherpaOnnx.OfflineTts
Could you find out why tts
is null
?
from sherpa-onnx.
By the way, are you able to run our provided examples on your system?
from sherpa-onnx.
Related Issues (20)
- 是否可以提供对java的JNI包对同个人动态追加声纹音频的接口?
- Using the WSL2 runtime in Windows 11 prompts an issue with no input/output device found HOT 5
- ONNX models on an ARM embedded platform? HOT 13
- Please add example for node using onnx-nemo-streaming HOT 3
- TTS:调用模型出错 HOT 10
- 官方可否release一个win版的Restful的API server HOT 1
- SenseVoice Unknown language: en HOT 3
- keyword-spotter-from-microphone可以提供调试信息吗?急需帮助,求大佬帮忙。在线等。谢谢!!! HOT 15
- Error when build debug mode on Windows
- Segfault on Windows when using whisper c api example HOT 3
- kws bug,max-active-paths的值设置为大于1时说一遍关键词,关键词会被识别到两次 HOT 2
- C的API没有keyword spotting,能加下吗? HOT 1
- 请问可以在c-api-examples里提供一个keyword spotting的例子吗? HOT 3
- [FR][TTS][Android]Fibo split HOT 7
- [Help wanted] Add various language bindings for online punctuation models
- Call KWS and ASR HOT 5
- Python library deletions HOT 3
- kws 长时间不唤醒之后的第一次唤醒不响应,需要第二次才会唤醒成功,请看看是什么问题呢? 中英文都有同样问题。有没有参数可以设置 HOT 1
- attention_dims does not exist in the metadata HOT 1
- 关键词识别模型加载时间需要30秒!如何优化 ? Keyword spotter model loading time takes 30 seconds! How to optimize? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sherpa-onnx.