Multilingual voice information in dotnet SDK

DWinkler 51 Reputation points
2024-09-24T12:12:09.9266667+00:00

I installed the latest version of the speech sdk

<PackageReference Include="Microsoft.CognitiveServices.Speech" Version="1.40.0" />

When pulling the voices using the sdk, var voices = await synthesizer.GetVoicesAsync(); i do not get any information on the languages that are supported by the "multilingual" voices.

Is there a way to get information about which voice supports which languages, apart from the main language?

Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
1,793 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sina Salam 12,651 Reputation points
    2024-09-24T15:19:48.91+00:00

    Hello DWinkler,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that you would like to get information on the languages that are supported by the "multilingual" voices.

    You can use the Azure Speech SDK https://learn.microsoft.com/en-us/azure/ai-services/speech-service/language-support to query the available voices and their supported languages.

    Also, you can use the sample code below to fetch the list of voices and their supported languages using the REST API.

    using System;
    using System.Net.Http;
    using System.Threading.Tasks;
    class Program
    {
        static async Task Main(string[] args)
        {
            var subscriptionKey = "YourSubscriptionKey";
            var region = "YourRegion";
            var endpoint = $"https://{region}.tts.speech.microsoft.com/cognitiveservices/voices/list";
            using (var client = new HttpClient())
            {
                client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", subscriptionKey);
                var response = await client.GetAsync(endpoint);
                var content = await response.Content.ReadAsStringAsync();
                Console.WriteLine(content);
            }
        }
    }
    

    I hope this is helpful! Do not hesitate to let me know if you have any other questions.

    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.