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)
- sherpa_onnx.OnlineRecognizer( TypeError: OnlineRecognizer() takes no arguments HOT 12
- speaker-identification.py的speaker-file参数具体是指? HOT 3
- Crash After Package Name Changed HOT 7
- This library cannot reconcile with the react-native onnxuruntime official library: unresolved OrtGetApiBase symbol HOT 17
- how to solve the channel problem and bit rate problem? HOT 2
- ANR On Android HOT 3
- 这边项目也支持语音唤醒吗? HOT 12
- Cannot instantiate Java OnlineRecognizer on Windows HOT 3
- Requred File? HOT 1
- Issue with sampling rate requirement for online_websocket_client_decode_file.py HOT 2
- whisper model recognition is unstable and error
- 在SherpaOnnxKws(Android)运行过程中发现的一个问题 HOT 4
- 热词影响onnx端点识别问题 HOT 5
- 单词写错需要修改 HOT 2
- 麻烦问下endpoint识别与vad识别有什么区别吗? HOT 5
- transcription inconsistency in different runs HOT 3
- export 3d speaker campplus sv model to onnx error
- Whisper onnxruntime exception on Android HOT 18
- 设置keywords后,例如小新小新这样的识别就很高,如果是“学习管家”这样的就基本很难识别到,老哥指导下怎么优化? HOT 17
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.