Skip to content

Commit 463372d

Browse files
committed
breaking change notice
1 parent b0bb8c1 commit 463372d

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

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

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ For speech recognition, the initial latency is higher with language identificati
2626

2727
## Configuration options
2828

29+
> [!IMPORTANT]
30+
> You must make a code change when upgrading to the Speech SDK version 1.25 from earlier versions. With Speech SDK version 1.25, the
31+
`SpeechServiceConnection_SingleLanguageIdPriority` and `SpeechServiceConnection_ContinuousLanguageIdPriority` properties have
32+
been removed and replaced by a single property `SpeechServiceConnection_LanguageIdMode`. The Speech service will prioritize latency over accuracy for language identification.
33+
2934
Whether you use language identification with [speech-to-text](#speech-to-text) or with [speech translation](#speech-translation), there are some common concepts and configuration options.
3035

3136
- Define a list of [candidate languages](#candidate-languages) that you expect in the audio.
@@ -198,7 +203,7 @@ You use Speech-to-text recognition when you need to identify the language in an
198203

199204
::: zone pivot="programming-language-csharp"
200205

201-
See more examples of speech-to-text recognition with language identification on [GitHub](https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/master/samples/csharp/sharedcontent/console/translation_samples.cs).
206+
See more examples of speech-to-text recognition with language identification on [GitHub](https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/master/samples/csharp/sharedcontent/console/speech_recognition_with_language_id_samples.cs).
202207

203208
### [Recognize once](#tab/once)
204209

@@ -208,7 +213,7 @@ using Microsoft.CognitiveServices.Speech.Audio;
208213
209214
var speechConfig = SpeechConfig.FromSubscription("YourSubscriptionKey","YourServiceRegion");
210215
211-
// Set the LanguageIdMode (optional, default Continuous, either Continuous or AtStart is accepted)
216+
// Set the LanguageIdMode (Optional; Either Continuous or AtStart are accepted; Default AtStart)
212217
speechConfig.SetProperty(PropertyId.SpeechServiceConnection_LanguageIdMode, "Continuous");
213218
214219
var autoDetectSourceLanguageConfig =
@@ -241,7 +246,7 @@ var endpointUrl = new Uri(endpointString);
241246
242247
var config = SpeechConfig.FromEndpoint(endpointUrl, "YourSubscriptionKey");
243248
244-
// Set the LanguageIdMode (optional, default Continuous, either Continuous or AtStart is accepted)
249+
// Set the LanguageIdMode (Optional; Either Continuous or AtStart are accepted; Default AtStart)
245250
config.SetProperty(PropertyId.SpeechServiceConnection_LanguageIdMode, "Continuous");
246251
247252
var autoDetectSourceLanguageConfig = AutoDetectSourceLanguageConfig.FromLanguages(new string[] { "en-US", "de-DE", "zh-CN" });
@@ -331,7 +336,7 @@ using namespace Microsoft::CognitiveServices::Speech::Audio;
331336
332337
auto speechConfig = SpeechConfig::FromSubscription("YourSubscriptionKey","YourServiceRegion");
333338
334-
// Set the LanguageIdMode (optional, default Continuous, either Continuous or AtStart is accepted)
339+
// Set the LanguageIdMode (Optional; Either Continuous or AtStart are accepted; Default AtStart)
335340
speechConfig->SetProperty(PropertyId::SpeechServiceConnection_LanguageIdMode, "Continuous");
336341
337342
auto autoDetectSourceLanguageConfig =
@@ -609,7 +614,7 @@ public static async Task RecognizeOnceSpeechTranslationAsync()
609614
610615
var config = SpeechTranslationConfig.FromEndpoint(endpointUrl, "YourSubscriptionKey");
611616
612-
// Set the LanguageIdMode (optional, default Continuous, either Continuous or AtStart is accepted)
617+
// Set the LanguageIdMode (Optional; Either Continuous or AtStart are accepted; Default AtStart)
613618
speechTranslationConfig.SetProperty(PropertyId.SpeechServiceConnection_LanguageIdMode, "Continuous");
614619
615620
// Source language is required, but currently ignored.
@@ -669,7 +674,7 @@ public static async Task MultiLingualTranslation()
669674
config.AddTargetLanguage("de");
670675
config.AddTargetLanguage("fr");
671676
672-
// Set the LanguageIdMode (optional, default Continuous, either Continuous or AtStart is accepted)
677+
// Set the LanguageIdMode (Optional; Either Continuous or AtStart are accepted; Default AtStart)
673678
config.SetProperty(PropertyId.SpeechServiceConnection_LanguageIdMode, "Continuous");
674679
var autoDetectSourceLanguageConfig = AutoDetectSourceLanguageConfig.FromLanguages(new string[] { "en-US", "de-DE", "zh-CN" });
675680
@@ -769,7 +774,7 @@ auto region = "YourServiceRegion";
769774
auto endpointString = std::format("wss://{}.stt.speech.microsoft.com/speech/universal/v2", region);
770775
auto config = SpeechTranslationConfig::FromEndpoint(endpointString, "YourSubscriptionKey");
771776
772-
// Set the LanguageIdMode (optional, default Continuous, either Continuous or AtStart is accepted)
777+
// Set the LanguageIdMode (Optional; Either Continuous or AtStart are accepted; Default AtStart)
773778
config->SetProperty(PropertyId::SpeechServiceConnection_LanguageIdMode, "Continuous");
774779
auto autoDetectSourceLanguageConfig = AutoDetectSourceLanguageConfig::FromLanguages({ "en-US", "de-DE" });
775780
@@ -841,7 +846,7 @@ void MultiLingualTranslation()
841846
auto endpointString = std::format("wss://{}.stt.speech.microsoft.com/speech/universal/v2", region);
842847
auto config = SpeechTranslationConfig::FromEndpoint(endpointString, "YourSubscriptionKey");
843848
844-
// Set the LanguageIdMode (optional, default Continuous, either Continuous or AtStart is accepted)
849+
// Set the LanguageIdMode (Optional; Either Continuous or AtStart are accepted; Default AtStart)
845850
speechConfig->SetProperty(PropertyId::SpeechServiceConnection_LanguageIdMode, "Continuous");
846851
auto autoDetectSourceLanguageConfig = AutoDetectSourceLanguageConfig::FromLanguages({ "en-US", "de-DE", "zh-CN" });
847852
@@ -948,7 +953,7 @@ translation_config = speechsdk.translation.SpeechTranslationConfig(
948953
target_languages=('de', 'fr'))
949954
audio_config = speechsdk.audio.AudioConfig(filename=weatherfilename)
950955
951-
# Set the LanguageIdMode (optional, default Continuous, either Continuous or AtStart is accepted)
956+
# Set the LanguageIdMode (Optional; Either Continuous or AtStart are accepted; Default AtStart)
952957
translation_config.set_property(property_id=speechsdk.PropertyId.SpeechServiceConnection_LanguageIdMode, value='AtStart')
953958
954959
# Specify the AutoDetectSourceLanguageConfig, which defines the number of possible languages
@@ -1005,7 +1010,7 @@ translation_config = speechsdk.translation.SpeechTranslationConfig(
10051010
target_languages=('de', 'fr'))
10061011
audio_config = speechsdk.audio.AudioConfig(filename=weatherfilename)
10071012
1008-
# Set the LanguageIdMode (optional, default Continuous, either Continuous or AtStart is accepted)
1013+
# Set the LanguageIdMode (Optional; Either Continuous or AtStart are accepted; Default AtStart)
10091014
translation_config.set_property(property_id=speechsdk.PropertyId.SpeechServiceConnection_LanguageIdMode, value='Continuous')
10101015
10111016
# Specify the AutoDetectSourceLanguageConfig, which defines the number of possible languages

0 commit comments

Comments
 (0)