How can we do language detection for audio url before performing speech to text of Cognitive services API?

Jeb Million 21 Reputation points
2021-07-19T08:40:21.393+00:00

Hello all,

I can use speech to text batch transcription api by providing single language as part of request body. I could also detect the audio language in prior for the audio files from my local directory and pass that to the request body.

But I want to detect the language from the audio url and pass that to the request body.

{
"contentUrls": [
"<URL to an audio file 1 to transcribe>"
],
"properties": {
"wordLevelTimestampsEnabled": true
},
"locale": [detected lang] ,
"model": {
"self": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.0/models/{id}"
},
"displayName": "Transcription of file using default model for en-US"
}

Is there any way to do the same?

Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
1,392 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,373 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ramr-msft 17,616 Reputation points
    2021-07-19T13:25:53.18+00:00

    @Jeb Million Thanks for the question. Language identification can be used to determine the language being spoken in audio that has been passed to the Speech SDK.

    Please follow the document for sample using C#.
    https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/how-to-automatic-language-detection?pivots=programming-language-csharp

    1 person found this answer helpful.