Hello.
So i am trying to create a speech Synthesis Dll to use with unity. this is the code for the dll. its just to test its working and will add functions to it when its works.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Text;
using System.Speech.Synthesis;
using System.Speech.AudioFormat;
namespace WindowsFormsApplication4
{
public partial class Form1
{
SpeechSynthesizer synth;
public Form1()
{
synth = new SpeechSynthesizer();
synth.SelectVoiceByHints(VoiceGender.Female);
synth.Speak("123456789");
}
}
}
this is a class library project using c#. i have referenced the (.net speech.Synthesis). the dll is build as a 3.5.net framework
after building the dll i have placed it in the plugins folder and called it in a c# script in unity
i was getting a internal compiler error until i placed the speech Synthesis Dll that is referanced in my dll in the plugins folder along with the dll i have created
I am running into the same issue, but what could be the case is that the Microsoft.Win32.RegistryKey class in the shipped Mono mscorlib is not fully compatible with the Microsoft version.
Having a look with ILSpy in the System.Speech dll it shows the method in which the null reference occurs tries to obtain the non-public ‘hkey’ field of the passed RegistryKey instance using reflection. This field is not available in the mscorlib shipped with Unity.
If anybody got it working, I would be pleased to know.