Click here to Skip to main content
15,895,084 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I can't see the voices that are in my new Edge (e.g. Jessa, Priya) in my TTS program.

What I have tried:

C#
public static List<ISpeechObjectToken> globalVoicesObjectsList = new List<ISpeechObjectToken>();

private void FormMain_Load(object sender, EventArgs e)
{

    SpObjectTokenCategory otc = new SpObjectTokenCategory();

    otc.SetId("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech_OneCore\\Voices");

    ISpeechObjectTokens tokenEnum = otc.EnumerateTokens();

    foreach (SpeechLib.ISpeechObjectToken v in tokenEnum)
    {
        comboBoxVoice.Items.Add(v.GetDescription());
        globalVoicesObjectsList.Add(v);
    }

    SpObjectTokenCategory otc2 = new SpObjectTokenCategory();

    otc2.SetId("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\Voices");

    ISpeechObjectTokens tokenEnum2 = otc2.EnumerateTokens();

    foreach (SpeechLib.ISpeechObjectToken v in tokenEnum2)
    {
        string s = v.GetDescription(49);

        foreach (string s2 in comboBoxVoice.Items)
        {
            if (s == s2) goto nextVoice;
        }
        comboBoxVoice.Items.Add(s);
        globalVoicesObjectsList.Add(v);

    nextVoice:;
    }
Posted
Updated 17-Apr-20 7:54am
v2
Comments
Richard MacCutchan 13-Apr-20 4:25am    
Maybe you need to install them.
john1990_1 13-Apr-20 4:25am    
They work in the new Edge.
Richard MacCutchan 13-Apr-20 4:38am    
Well if they are not registered in the system you need to find out how edge does it.
john1990_1 13-Apr-20 7:14am    
It says in your link:
"It’s also worth noting that these voices have been exposed to developers through the JavaScript SpeechSynthesis API. This means that any web-based text to speech application can leverage them to create more configurable and human sounding experiences in the new version of Microsoft Edge!"
Can I add them to a not web based app (WinForms.NET C#)?

1 solution

The voice is generated by an Azure AI service. They are not "voice packs" you can download and install.

In order to use that speech, you have to use the Text to Speech | Microsoft Azure[^] service.
 
Share this answer
 
Comments
john1990_1 17-Apr-20 14:00pm    
So the voices work only when I'm connected to the internet and my texts get uploaded and the audios are downloaded? first 12 months for free and then payment based on letters and audio length?
Dave Kreskowiak 17-Apr-20 14:17pm    
Yep

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900