Windows 10 iot speech synthesis language change - c#

I recently installed Windows 10 IoT on my Raspberry Pi 2 following this tutorial, but it's not working.
foreach (var voice in SpeechSynthesizer.AllVoices)
{
Debug.WriteLine($"Name: {voice.DisplayName} Lang: {voice.Language} Type: {voice.Gender} Description : {voice.Description}");
}
On my first try, the above code showed "es-ES" language pack but, when trying to use the TTS it threw an exception:
Exception thrown: 'System.Runtime.InteropServices.COMException' in System.Private.CoreLib.ni.dll
So, I did a fresh install again, copied again the files but, this time shows this:
Exception thrown: 'System.InvalidOperationException' in System.Linq.dll.
Does somebody know how to properly install a new language pack on Windows 10 IoT core?

Thanks so much for your help, the solution was really easy, hope this helps somebody else. I did a fresh install again (using the flash image from Core Dashboard) and suddenly noticed that some old files were still there, even after the flash… So I did this:
I went to Partition Wizard and deleted the SD Card partition, then made a new Fat32 volume.
I reformatted the SD Card using Windows format storage tool and unticked the “Quick Format” option and selected default cluster. For a SD Card 8GB Class 10 took about 10 minutes.
Flashed again the W iot Core image.
Copied again Speech_OneCore\TTS\es-ES and System32\Speech_OneCore\Common\es-ES to my board and reboot.
Run again the code snippet to show available languages and it showed es-ES along en-US, I tested it with a TTS code and is talking in my mother tongue without problem.

Related

Why is my Unity IOS App crashing after uploading it to Xcode?

I've been a developer Unity iOS developer for a while now and I recently tried to test out my app on my phone. After building the project and uploading it to xCode so I can upload the app on my phone, the app was developed but crashes once I opened it. There are some warning logs but not sure which one is causing the crashing.
https://i.stack.imgur.com/FKY8e.jpg
https://i.stack.imgur.com/D4ryX.png
I also might think this is because I am not paying for the Apple developer program, yet before I was able to test it without paying for it.
Logs:
2020-03-28 14:11:21.207192-0700 TheSuccFinal[2733:973093] Error loading /var/containers/Bundle/Application/A8DD7379-FF01-4A00-AF26-77A546A87C8E/TheSuccFinal.app/Frameworks/UnityFramework.framework/UnityFramework: dlopen(/var/containers/Bundle/Application/A8DD7379-FF01-4A00-AF26-77A546A87C8E/TheSuccFinal.app/Frameworks/UnityFramework.framework/UnityFramework, 265): no suitable image found. Did find:
/var/containers/Bundle/Application/A8DD7379-FF01-4A00-AF26-77A546A87C8E/TheSuccFinal.app/Frameworks/UnityFramework.framework/UnityFramework: code signature invalid for '/var/containers/Bundle/Application/A8DD7379-FF01-4A00-AF26-77A546A87C8E/TheSuccFinal.app/Frameworks/UnityFramework.framework/UnityFramework'
/var/containers/Bundle/Application/A8DD7379-FF01-4A00-AF26-77A546A87C8E/TheSuccFinal.app/Frameworks/UnityFramework.framework/UnityFramework: stat() failed with errno=3
/private/var/containers/Bundle/Application/A8DD7379-FF01-4A00-AF26-77A546A87C8E/TheSuccFinal.app/Frameworks/UnityFramework.framework/UnityFramework: code signature invalid for '/private/var/containers/Bundle/Application/A8DD7379-FF01-4A00-AF26-77A546A87C8E/TheSuccFinal.app/Frameworks/UnityFramework.framework/UnityFramework'
2020-03-28 14:11:21.247919-0700 TheSuccFinal[2733:973093] Error loading /var/containers/Bundle/Application/A8DD7379-FF01-4A00-AF26-77A546A87C8E/TheSuccFinal.app/Frameworks/UnityFramework.framework/UnityFramework: dlopen(/var/containers/Bundle/Application/A8DD7379-FF01-4A00-AF26-77A546A87C8E/TheSuccFinal.app/Frameworks/UnityFramework.framework/UnityFramework, 265): no suitable image found. Did find:
/var/containers/Bundle/Application/A8DD7379-FF01-4A00-AF26-77A546A87C8E/TheSuccFinal.app/Frameworks/UnityFramework.framework/UnityFramework: code signature invalid for '/var/containers/Bundle/Application/A8DD7379-FF01-4A00-AF26-77A546A87C8E/TheSuccFinal.app/Frameworks/UnityFramework.framework/UnityFramework'
/private/var/containers/Bundle/Application/A8DD7379-FF01-4A00-AF26-77A546A87C8E/TheSuccFinal.app/Frameworks/UnityFramework.framework/UnityFramework: code signature invalid for '/private/var/containers/Bundle/Application/A8DD7379-FF01-4A00-AF26-77A546A87C8E/TheSuccFinal.app/Frameworks/UnityFramework
It is related to iOS 13.3.1 since recent releases from Apple iOS builder, personal (non-developer) Apple accounts cannot sign frameworks correctly, since Unity is a framework itself it is not signed when built.
You can check this unity forum discussion and this discussion in the flutter framework about the bug.
Apparently it is fixed in iOS 13.4, so check your XCode version, iOS target version and you should be good to go.

Windows UWP BLE DeviceInformation.CreateWatcher throws Property key syntax error

We have a Desktop Windows app using some UWP Bluetooth LE UWP functions. We start the watcher:
string BTLEDeviceWatcherAQSString = "(System.Devices.Aep.ProtocolId:=\"{bb7bb05e-5972-42b5-94fc-76eaa7084d49}\")";
string[] props = { "System.Devices.Aep.DeviceAddress", "System.Devices.Aep.IsConnected", "System.Devices.Aep.Bluetooth.Le.IsConnectable"};
watcher = DeviceInformation.CreateWatcher(BTLEDeviceWatcherAQSString, props, DeviceInformationKind.AssociationEndpoint);
It runs OK on most machines, just rarely we have an anonymized error log:
System.Exception: Element not found. Property key syntax error. A property key must either be specified as a canonical property name (preferred) or be of the form {fmtid} pid.
at Windows.Devices.Enumeration.DeviceInformation.CreateWatcher(String aqsFilter, IEnumerable`1 additionalProperties, DeviceInformationKind kind)
We run this code for Windows 10.0.15063 (i.e. 1703) or higher, so all properties should be available by doc.
What may cause this error? Some HW configuration or Windows 10 settings?
I have seen this exception in a windows WPF desktop application. The reason was that I had neglected to detect the revision of Windows 10 was greater than version 1703 AKA creators edition. Therefore anyone running the application on an earlier version of Windows 10 would see this error. Its unfortunate that the error is so obscure, a not supported error would be better.

Failed to add a WMAsfReader into the FilterGraph

Add a WMAsfReader caused Error,HRESULT was -2147024770.The code is as follow:
sourceFilter = (IBaseFilter) new WMAsfReader();
((IFileSourceFilter)sourceFilter).Load(fileSource, null);
hr = filterGraph.AddFilter(sourceFilter, "WM ASF Reader");
MessageBox.Show(hr.ToString());
When I run this code on Win10 with WMP,it works well;but it does not work on Win7 without WMP.But I can find the "WM Asf Reader" in the registry,qasf.dll as well.What is the problem?Thanks.
Error Image:
The error code -2147024770 is 0x8007007E ERROR_MOD_NOT_FOUND "The specified module could not be found."
Such error for a Windows core component might indicate that something is broken in your Windows (e.g. certain application installed and registered the same DLL and then it was deinstalled - resulting in broken registration of the original module). It might also be caused by Windows 7 N version having no Windows Media in the default configuration, you are supposed to add the feature by installing a Feature Pack.
but it does not work on Win7 without WMP...
...The Media Feature Pack for Windows 7 N or Windows 7 KN will install Media Player and related technologies on a computer running...
It is not only Windows Media Player missing in N editions, but also the underlying APIs, used by WM ASF Reader.

C# UWP MediaPlayer crash on emulator

I'm new to UWP, and i tried instantinate MediaPlayer class. On local machine it's work fine, but on mobile emulator throws next exception:
An exception of type 'System.Runtime.InteropServices.COMException'
occurred in project.exe but was not handled in user code
Additional information: ClassFactory cannot supply requested class
(Exception from HRESULT: 0x80040111 (CLASS_E_CLASSNOTAVAILABLE))
StackTrace:
at System.StubHelpers.StubHelpers.GetWinRTFactoryObject(IntPtr pCPCMD)
at Windows.Media.Playback.MediaPlayer..ctor()
at Project.Services.PlaybackServiceFactory.Create(PlayerArgument arg)
at Project.ViewModels.PlayerViewModel..ctor(PlayerArgument arg)
at Project.MainPage.d__3.MoveNext()
All uwp examples with MediaPlayer also crashes. Previously it worked fine, whats maybe wrong? I would be glad of any help, thank you.
UPD: Problem actual for 10.0.10586 emulator version
The MediaPlayer constructor is available from "Universal, introduced version 10.0.14393.0". So please run your project in 14393 emulator or grater.
You could dynamically detect features with API contracts (10 by 10)
The Universal Windows Platform (UWP) allows you to write your app once and target multiple device families, while also taking advantage of new APIs introduced on later versions of the OS as well as using unique APIs only present on certain device families.

it is possible to get the crash details of a application that triggers Microsoft Windows Error Reporting?

I have an application written in C#. This application is locking by windows, return something like: "The xxx application has stopped working".
Is it possible to get the reason for this crash? I tried using try{} catch{} throughout the application without success. It works on my computer, but not on my friend's computer.
Both computers have same configuration:
Windows seven 7 ultimate 32 bits
Processor:2.13ghz
memory ram: 2gb
UPDATE
Well, in the event log of computer of my friend I found some details of the crash:
Faulting application name: xxxx.exe, version: 1.0.0.0,time stamp:0x4eb5e63a
Fault Module Name:KERNELBASE.dll, version: 6.1.7600.16850, time stamp:0x4e21132b
Exception Code:0xe0434352
Identification of the process that failed: 0x26c
Start time of the faulting application: ...
Faulting application path: ... \xxx.exe
Path F module failures: C:\Windows\system32\KERNELBASE.dll
Report ID: xxxxx-yyyy-dddd-dddd-aaaaaa
UPDATE 2
Finally,I found the function that is causing the exception.
handling the function with try {} catch (Exception Err) {} I found some details of exception:
Err.Message:The device is not ready
Err.Source: mscorlib
how can I fix it?
"Works on my machine" is a very common problem with a myriad of causes. Generally the reason is that something is different between the two machines. Some easy things to rule out:
is your friend's computer a development machine, with Visual Studio installed?
does your application rely on a particular path (for example, a D: drive), a database, a service, a COM component, or something else that an install package should be including?
has your friend configured UAC differently from you? Does one of you sign on as the account Administrator, while the other uses another account that is in the Administrators group?
did you test a debug version on your friend's machine? debug versions usually aren't redistributable
did you test version x of the exe and version y of some class library, forgetting that you made a change to one of them yesterday?
do you and your friend have different versions of IE, Office, or some other component that may be used by the app? Do you have different IE settings (eg proxies?)
are the two computers both completely caught up on updates and service packs?
is the application trying to access some hardware (microphone, web cam) that is not on your friend's machine or is importantly different between the two machines?
The literal answer to your question is yes, you can sign up for something called Windows Error Reporting and get the reports that the dialog says it is collecting. However I sincerely doubt that you want them. You should have all the information you need to find the error right where you are. Concentrate on what is different (even if you think it's irrelevant) between the two machines.
Most likely it is a missing dependency. Double check to make sure that your program is installing all of the Dll's that it needs. I have run into similar problems usually with an .ocx file not being properly registered or not present.
As far as your question goes try using the MDbg.exe file from the .Net Framework SDK or Visual Studio. Microsoft also has other debugging tools available.

Categories

Resources