Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to NET8 #2689

Open
seba76 opened this issue Jan 18, 2025 · 6 comments
Open

Port to NET8 #2689

seba76 opened this issue Jan 18, 2025 · 6 comments
Labels
9. enhancement The behaviour is as specified, but we would like to modify or extend the spec.

Comments

@seba76
Copy link

seba76 commented Jan 18, 2025

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.

@Tkael
Copy link
Member

Tkael commented Jan 18, 2025

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

@Tkael
Copy link
Member

Tkael commented Jan 18, 2025

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

@Tkael
Copy link
Member

Tkael commented Jan 18, 2025

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.

@seba76
Copy link
Author

seba76 commented Jan 18, 2025

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.

@Tkael Tkael added the 9. enhancement The behaviour is as specified, but we would like to modify or extend the spec. label Jan 19, 2025
@Darkcyde13
Copy link

Darkcyde13 commented Jan 20, 2025

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.

@Tkael
Copy link
Member

Tkael commented Jan 21, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
9. enhancement The behaviour is as specified, but we would like to modify or extend the spec.
Projects
None yet
Development

No branches or pull requests

3 participants