EDDI icon indicating copy to clipboard operation
EDDI copied to clipboard

Port to NET8

Open seba76 opened this issue 11 months ago • 8 comments

What happens now

Well suggestion for this came from my playing with available languages that I could select. I came a cross NaturalVoiceSAPIAdapter which enables additional voices in net8 sample app I had. When I tried it in current version of EDDI 4.1.0-b3 when running on Windows 11 those new languages where not visible. Quick test showed that that was due to Net Framework used in EDDI.

What I'd like to happen

I would suggest porting EDDI to net8 to give it more opportunity for future enhancements from framework updates. This is partly related to #2379.

How it can happen

You can check out my quick hack job in porting at net8 repo to see what is required to make it work. Basically what I did is:

  1. Switch to new .csproj style files using net8, target framework is set net8.0-windows10.0.26100.0
  2. Had to include code for CSCore, they have net8 port but it is not in NuGet yet
  3. Had to update to latest RestSharp, was getting serialization errors
  4. To compile solution I had to disable few tests, reason was missing PrivateType class from testing framework
  5. Publish doesn't copy all the files to output folder, so manual copy is needed

EDDI Version

Changes are done on development branch.

seba76 avatar Jan 18 '25 16:01 seba76

Net8 is not compatible with the current version of VoiceAttack. What was missing in the current framework that necessitated the switch to Net8?

Tkael avatar Jan 18 '25 18:01 Tkael

I've added #2690 with the solution that I've been considering to allow framework updates.

Tkael avatar Jan 18 '25 18:01 Tkael

Note: I should also note that ports which I've tested in Net8 have actually lost access to some older 32 bit voices as well.

Tkael avatar Jan 18 '25 18:01 Tkael

Net8 is not compatible with the current version of VoiceAttack. What was missing in the current framework that necessitated the switch to Net8?

I guess then this is the deal breaker for port to net8, I don't use VoiceAttack my self so didn't try that.

I don't know what was missing but the same piece of code when executes in 4.8 and in net8 return different voices. So this piece of code I used for testing

     
      using (SpeechSynthesizer synth = new SpeechSynthesizer())  
      {  

        // Output information about all of the installed voices.   
        Console.WriteLine("Installed voices -");  
        foreach (InstalledVoice voice in synth.GetInstalledVoices())  
        {  
          VoiceInfo info = voice.VoiceInfo;  
          string AudioFormats = "";  
          foreach (SpeechAudioFormatInfo fmt in info.SupportedAudioFormats)  
          {  
            AudioFormats += String.Format("{0}\n",  
            fmt.EncodingFormat.ToString());  
          }  

          Console.WriteLine(" Name:          " + info.Name);  
          Console.WriteLine(" Culture:       " + info.Culture);  
          Console.WriteLine(" Age:           " + info.Age);  
          Console.WriteLine(" Gender:        " + info.Gender);  
          Console.WriteLine(" Description:   " + info.Description);  
          Console.WriteLine(" ID:            " + info.Id);  
          Console.WriteLine(" Enabled:       " + voice.Enabled);  
          if (info.SupportedAudioFormats.Count != 0)  
          {  
            Console.WriteLine( " Audio formats: " + AudioFormats);  
          }  
          else  
          {  
            Console.WriteLine(" No supported audio formats found");  
          }  

          string AdditionalInfo = "";  
          foreach (string key in info.AdditionalInfo.Keys)  
          {  
            AdditionalInfo += String.Format("  {0}: {1}\n", key, info.AdditionalInfo[key]);  
          }  

          Console.WriteLine(" Additional Info - " + AdditionalInfo);  
          Console.WriteLine();  
        }  

	    // Configure the audio output.
        synth.SetOutputToDefaultAudioDevice();

        // Speak a string.
        synth.Speak("This example demonstrates a basic use of Speech Synthesizer");	  	  
	  }  
	  
      Console.WriteLine("Press any key to exit...");  
      Console.Read();  

In net8 would return following (I'll just write name) Name: Microsoft David Desktop .. Name: Microsoft Zira Desktop .. Name: Microsoft Aria .. Name: Microsoft Jenny .. Name: Microsoft Sonia .. Name: Microsoft Ana Online .. Name: Microsoft AndrewMultilingual Online .. Name: Microsoft Andrew Online ..

plus 10 more voices. While when I execute it in 4.8 I would get:

Name: Microsoft David Desktop .. Name: Microsoft Zira Desktop ..

which is the same I get in EDDI.

Feel free to close the issue since it won't work with VoiceAttack.

Note: I should also note that ports which I've tested in Net8 have actually lost access to some older 32 bit voices as well.

This is probably due to 64bit build of app I guess installation of 32bit runtime and building app as 32bit would fix that but I don't have 32bit specific voice to test this.

seba76 avatar Jan 18 '25 20:01 seba76

I may be misunderstanding the original issue here, but I'm using that NaturalVoiceSAPIAdapter to add several new MS Narrator voices to EDDI, and it works perfectly fine for me. I've not done anything special with my installation either.

Image

If I have misunderstood, then please forgive my intrusion on this topic.

Edit: Just wanted to add that I know another user has added MS Azure voices to EDDI using the same SAPI adapter.

Darkcyde13 avatar Jan 20 '25 23:01 Darkcyde13

Thanks @Darkcyde13 for the additional perspective.

@seba76 it sounds like there may be some issue that is specific to your PC. You might want to try combining EDDI + NaturalVoiceSAPIAdapter on a second PC to test this. If it still fails then I'd be curious about the exceptions recorded in eddi.log.

Tkael avatar Jan 21 '25 01:01 Tkael

I've attached log from EDDI but I don't see anything special in it, Elite was not running when I created this log. Will spin up VM to test what is going on with clean install and let you know my findings.

eddi_issue.zip

seba76 avatar Jan 21 '25 10:01 seba76

I figured out what was the problem. On clean install of Windows 11 24H2 with added Jenny as narrator voice I installed NaturalVoiceSAPIAdapter like this picture shows

Image

then I get this in EDDI

Image

Then I remembered that @Tkael mentiond 32bit so once I installed 32bit I got

Image

What I didn't realize was that EDDI was actually build as 32bit application and that is the reason it was not working.

Thanks @Darkcyde13 for the info without it i would never caught it. @Tkael you can close the issue in my opinion since it is not related to framework, although it might be good idea to port it to Net at some point.

seba76 avatar Jan 21 '25 11:01 seba76