Skip to content

Commit de31329

Browse files
Merge pull request #229242 from alexeyo26/alexeyo/lid-in-batch
[CogSvc] Speech. LID in batch transcription.
2 parents c24f14a + 8d3fb93 commit de31329

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

articles/cognitive-services/Speech-Service/language-identification.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,9 @@ speechRecognizer.recognizeOnceAsync((result: SpeechSDK.SpeechRecognitionResult)
496496

497497
### Using Speech-to-text custom models
498498

499+
> [!NOTE]
500+
> Language detection with custom models can be used in OnLine transcription only. Batch transcription supports language detection for base models.
501+
499502
::: zone pivot="programming-language-csharp"
500503
This sample shows how to use language detection with a custom endpoint. If the detected language is `en-US`, then the default model is used. If the detected language is `fr-FR`, then the custom model endpoint is used. For more information, see [Deploy a Custom Speech model](how-to-custom-speech-deploy-model.md).
501504

@@ -584,6 +587,35 @@ var autoDetectSourceLanguageConfig = SpeechSDK.AutoDetectSourceLanguageConfig.fr
584587
585588
::: zone-end
586589
590+
### Using Speech-to-text batch transcription
591+
592+
To identify languages in [Batch transcription](batch-transcription.md), you need to use `languageIdentification` property in the body of your [transcription REST request](https://eastus.dev.cognitive.microsoft.com/docs/services/speech-to-text-api-v3-1/operations/Transcriptions_Create). The example in this section shows the usage of `languageIdentification` property with four candidate languages.
593+
594+
> [!WARNING]
595+
> Batch transcription supports language identification for base models only. If both language identification and custom model usage are specified in the transcription request, the service will automatically fall back to the base models for the specified candidate languages. This may result in unexpected recognition results.
596+
>
597+
> If your scenario requires both language identification and custom models, use [OnLine transcription](#using-speech-to-text-custom-models).
598+
599+
```json
600+
{
601+
<...>
602+
603+
"properties": {
604+
<...>
605+
606+
"languageIdentification": {
607+
"candidateLocales": [
608+
"en-US",
609+
"ja-JP",
610+
"zh-CN",
611+
"hi-IN"
612+
]
613+
},
614+
<...>
615+
}
616+
}
617+
```
618+
587619
## Speech translation
588620
589621
You use Speech translation when you need to identify the language in an audio source and then translate it to another language. For more information, see [Speech translation overview](speech-translation.md).

0 commit comments

Comments
 (0)