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)
- Flutter android offline speech recognition. HOT 1
- TeleSpeech-ASR1.0对方言支持的比较好,建议将这个模型添加到sherpa中使用 HOT 7
- 说话人识别可以不提前做声纹注册,实现直接识别吗? HOT 2
- shaerpa-onnx 在ios上报错:Precondition failed: encoder.int8.onnx does not exist! HOT 4
- ios上如何使用关键词预训练模型,是否有相关文档或者demo HOT 3
- TTS crashes with nnapi enabled (works with CPU) HOT 2
- vad-non-streaming-asr-paraformer in csharp can;t detect the last samples HOT 1
- How to disable logs for offline-paraformer-greedy-search-decoder.cc HOT 3
- [csharp] Chinese char output ???????? while using OfflinePunctuation HOT 3
- 【csharp】SherpaOfflinePunctuationAddPunct: Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Repeat 2 times: HOT 5
- [feature request] remember speed HOT 3
- [csharp] SpeakerEmbeddingExtractor cost memory 6G and keep growing, does it normal or has memory leak? HOT 8
- [csharp] SherpaOfflinePunctuationAddPunct. Unhandled exception. System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception HOT 2
- 安装Python Package CUDA版本失败 HOT 25
- whisper onnx convert to rknn HOT 6
- Hotwords encoding for phonemes HOT 5
- Getting end timestamp in result(s) HOT 2
- Runtime option to disable sherpa logs HOT 2
- Import Piper / VITS as iOS Custom System Voices for TTS using AVSpeechSynthesisProviderAudioUnit Extension in Swift HOT 1
- Convert new piper tts models. 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.