Have the specifications of the Speech Translator changed?
Hi, I use Azure cognitive speech translator. How should we get the string before it's translated?
Until the other day, the text of the recognized language (the language before translation) was stored in the e.Result->Text. But I tried it today with same code, this buffer no longer contained characters. Have the specifications of the Speech Translator changed?
void SpeechTranslation( AzureCognitiveSpeech* pAzureCognitiveSpeech )
{
TranslationRecognizer->Recognizing.Connect( [&pAzureCognitiveSpeech]( const TranslationRecognitionEventArgs& e )
{
// e.Result->Text will contain a string of recognized language
OutputDebugString( e.Result->Text.c_str() );
for( const auto& it : e.Result->Translations )
{
// e.Result->Text will contain a string of translated language
OutputDebugString( it.second->Text.c_str() );
}
});
...