diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 9824752..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,13 +0,0 @@ -## [project-title] Changelog - - -# x.y.z (yyyy-mm-dd) - -*Features* -* ... - -*Bug Fixes* -* ... - -*Breaking Changes* -* ... diff --git a/README.md b/README.md index 677a51e..81b5f03 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,18 @@ This project hosts the **samples** for the Cognitive Services Speech Devices SDK ## Features -This repository hosts samples that help you to get started with several features of the Speech Devices SDK. Please note the Speech Devices SDK only works with the specific devices. At this point, it only works with [Roobo dev kits](http://ddk.roobo.com/). +This repository hosts samples that help you to get started with several features of the Speech Devices SDK. Please note the Speech Devices SDK only works with the specific devices. At this point, it only works with [Roobo dev kits](http://ddk.roobo.com/) and [Azure Kinect DK](https://azure.microsoft.com/en-us/services/kinect-dk/). ## Getting Started -Currently only samples for Android devices are provided in this repository. Check out the [sample code walkthrough](https://github.com/Azure-Samples/Cognitive-Services-Speech-Devices-SDK/blob/master/Samples/Android/Speech%20Devices%20SDK%20Starter%20App/Sample_Code_Walkthrough.md) for more details. More OS support will be added later. +Check out the [sample code walkthrough](https://github.com/Azure-Samples/Cognitive-Services-Speech-Devices-SDK/blob/master/Samples/Android/Speech%20Devices%20SDK%20Starter%20App/Sample_Code_Walkthrough.md) for details on the sample code. -Also here's how you can [get the Speech Devices SDK](https://aka.ms/sdsdk-get), and [get started with the Speech Devices SDK](https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/speech-devices-sdk-qsg). +Here's how you can [get the Speech Devices SDK](https://aka.ms/sdsdk-get). + +The following quickstarts demonstrate how to use sample applications. + +* [Android](https://docs.microsoft.com/en-us/azure/cognitive-services/Speech-Service/speech-devices-sdk-android-quickstart) +* [Linux](https://docs.microsoft.com/en-us/azure/cognitive-services/Speech-Service/speech-devices-sdk-linux-quickstart) +* [Windows](https://docs.microsoft.com/en-us/azure/cognitive-services/Speech-Service/speech-devices-sdk-windows-quickstart) Cognitive Services Speech Devices SDK supports customized wake words for key word spotting. Check out this guide to [create a customized wake words](https://aka.ms/sdsdk-kws) for your device. diff --git a/Samples/Android/Speech Devices SDK Starter App/CHANGELOG.md b/Samples/Android/Speech Devices SDK Starter App/CHANGELOG.md deleted file mode 100644 index 9824752..0000000 --- a/Samples/Android/Speech Devices SDK Starter App/CHANGELOG.md +++ /dev/null @@ -1,13 +0,0 @@ -## [project-title] Changelog - - -# x.y.z (yyyy-mm-dd) - -*Features* -* ... - -*Bug Fixes* -* ... - -*Breaking Changes* -* ... diff --git a/Samples/Android/Speech Devices SDK Starter App/README.md b/Samples/Android/Speech Devices SDK Starter App/README.md deleted file mode 100644 index 677a51e..0000000 --- a/Samples/Android/Speech Devices SDK Starter App/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Samples Repository for the Cognitive Services Speech Devices SDK - -This project hosts the **samples** for the Cognitive Services Speech Devices SDK. - -## Features - -This repository hosts samples that help you to get started with several features of the Speech Devices SDK. Please note the Speech Devices SDK only works with the specific devices. At this point, it only works with [Roobo dev kits](http://ddk.roobo.com/). - -## Getting Started - -Currently only samples for Android devices are provided in this repository. Check out the [sample code walkthrough](https://github.com/Azure-Samples/Cognitive-Services-Speech-Devices-SDK/blob/master/Samples/Android/Speech%20Devices%20SDK%20Starter%20App/Sample_Code_Walkthrough.md) for more details. More OS support will be added later. - -Also here's how you can [get the Speech Devices SDK](https://aka.ms/sdsdk-get), and [get started with the Speech Devices SDK](https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/speech-devices-sdk-qsg). - -Cognitive Services Speech Devices SDK supports customized wake words for key word spotting. Check out this guide to [create a customized wake words](https://aka.ms/sdsdk-kws) for your device. diff --git a/Samples/Android/Speech Devices SDK Starter App/example/app/build.gradle b/Samples/Android/Speech Devices SDK Starter App/example/app/build.gradle index 1b99257..17a17ab 100644 --- a/Samples/Android/Speech Devices SDK Starter App/example/app/build.gradle +++ b/Samples/Android/Speech Devices SDK Starter App/example/app/build.gradle @@ -9,7 +9,7 @@ android { } defaultConfig { - applicationId "com.microsoft.coginitiveservices.speech.samples.sdsdkstarterapp" + applicationId "com.microsoft.cognitiveservices.speech.samples.sdsdkstarterapp" minSdkVersion 22 targetSdkVersion 27 versionCode 1 @@ -40,4 +40,4 @@ dependencies { androidTestImplementation 'com.android.support.test:runner:1.0.1' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' implementation files('src/main/jniLibs/com.microsoft.cognitiveservices.speech.jar') - } +} diff --git a/Samples/Android/Speech Devices SDK Starter App/example/app/src/androidTest/java/com/microsoft/cognitiveservices/speech/samples/sdsdkstarterapp/ExampleInstrumentedTest.java b/Samples/Android/Speech Devices SDK Starter App/example/app/src/androidTest/java/com/microsoft/cognitiveservices/speech/samples/sdsdkstarterapp/ExampleInstrumentedTest.java index 8ef90b3..cdb5118 100644 --- a/Samples/Android/Speech Devices SDK Starter App/example/app/src/androidTest/java/com/microsoft/cognitiveservices/speech/samples/sdsdkstarterapp/ExampleInstrumentedTest.java +++ b/Samples/Android/Speech Devices SDK Starter App/example/app/src/androidTest/java/com/microsoft/cognitiveservices/speech/samples/sdsdkstarterapp/ExampleInstrumentedTest.java @@ -28,13 +28,13 @@ public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); - assertEquals("com.microsoft.coginitiveservices.speech.samples.sdsdkstarterapp", appContext.getPackageName()); + assertEquals("com.microsoft.cognitiveservices.speech.samples.sdsdkstarterapp", appContext.getPackageName()); } @Test public void runSpeechSDKtests() { loadTestProperties("/data/local/tmp/tests/test-java-unittests.properties"); - //tests.runner.Runner.mainRunner("tests.unit.AllUnitTests"); + tests.runner.Runner.mainRunner("tests.unit.AllUnitTests"); } @SuppressWarnings("deprecation") diff --git a/Samples/Android/Speech Devices SDK Starter App/example/app/src/main/AndroidManifest.xml b/Samples/Android/Speech Devices SDK Starter App/example/app/src/main/AndroidManifest.xml index 2d68ec3..2e05f29 100644 --- a/Samples/Android/Speech Devices SDK Starter App/example/app/src/main/AndroidManifest.xml +++ b/Samples/Android/Speech Devices SDK Starter App/example/app/src/main/AndroidManifest.xml @@ -5,7 +5,6 @@ - + @@ -24,14 +27,9 @@ - - \ No newline at end of file diff --git a/Samples/Android/Speech Devices SDK Starter App/example/app/src/main/java/com/microsoft/cognitiveservices/speech/samples/sdsdkstarterapp/conversation.java b/Samples/Android/Speech Devices SDK Starter App/example/app/src/main/java/com/microsoft/cognitiveservices/speech/samples/sdsdkstarterapp/Conversation.java similarity index 89% rename from Samples/Android/Speech Devices SDK Starter App/example/app/src/main/java/com/microsoft/cognitiveservices/speech/samples/sdsdkstarterapp/conversation.java rename to Samples/Android/Speech Devices SDK Starter App/example/app/src/main/java/com/microsoft/cognitiveservices/speech/samples/sdsdkstarterapp/Conversation.java index a0fe638..cdf69d9 100644 --- a/Samples/Android/Speech Devices SDK Starter App/example/app/src/main/java/com/microsoft/cognitiveservices/speech/samples/sdsdkstarterapp/conversation.java +++ b/Samples/Android/Speech Devices SDK Starter App/example/app/src/main/java/com/microsoft/cognitiveservices/speech/samples/sdsdkstarterapp/Conversation.java @@ -12,6 +12,7 @@ import android.util.Pair; import android.view.Menu; import android.view.MenuItem; +import android.view.WindowManager; import android.widget.ListView; import android.widget.TextView; @@ -27,6 +28,7 @@ import java.io.IOException; import java.io.InputStream; import java.math.BigInteger; +import java.net.URI; import java.util.ArrayList; import java.util.Calendar; import java.util.Collections; @@ -37,10 +39,10 @@ import java.util.concurrent.Executors; import java.util.concurrent.Future; -public class conversation extends AppCompatActivity { +public class Conversation extends AppCompatActivity { private HashMap signatureMap = new HashMap<>(); private HashMap colorMap = new HashMap<>(); - private TextView IntermediateTextView; + private TextView intermediateTextView; private static final String CTSKey = ""; private static final String CTSRegion="";// Region may be "centralus" or "eastasia" private SpeechConfig speechConfig = null; @@ -91,7 +93,7 @@ public boolean onOptionsItemSelected(MenuItem item) Log.i(logTag, "Participants enrollment"); String[] keyArray = signatureMap.keySet().toArray(new String[signatureMap.size()]); - colorMap.put("?", getColor()); + colorMap.put("Guest", getColor()); for (int i = 1; i <= signatureMap.size(); i++) { while (colorMap.size() < i + 1) @@ -129,8 +131,8 @@ protected void onCreate(Bundle savedInstanceState) super.onCreate(savedInstanceState); setContentView(R.layout.activity_conversation); Toolbar toolbar = findViewById(R.id.CTStoolbar); - IntermediateTextView = findViewById(R.id.IntermediateView); - IntermediateTextView.setMovementMethod(new ScrollingMovementMethod()); + intermediateTextView = findViewById(R.id.IntermediateView); + intermediateTextView.setMovementMethod(new ScrollingMovementMethod()); setSupportActionBar(toolbar); Properties prop = new Properties(); InputStream participantIs = null; @@ -151,7 +153,7 @@ protected void onCreate(Bundle savedInstanceState) // check if we have a valid endpoint /////////////////////////////////////////////////// if (CTSRegion.startsWith("<") || CTSRegion.endsWith(">")) { - appendTextLine( "Error: Replace CTSRegion with your speech subscription key's service region and re-compile!", true); + appendTextLine( "Error: Replace CTSRegion with your actual speech subscription key's service region and re-compile!", true); return; } @@ -159,8 +161,8 @@ protected void onCreate(Bundle savedInstanceState) { // example/participants.properties is for storing participants' voice signatures, please push the file under folder /video on DDK device. participantIs = new FileInputStream("/video/participants.properties"); - prop.load(participantIs); - participantList = prop.getProperty("PARTICIPANTSLIST"); + prop.load(participantIs); + participantList = prop.getProperty("PARTICIPANTSLIST"); } catch (Exception io) { @@ -181,7 +183,7 @@ protected void onCreate(Bundle savedInstanceState) if (participantList.length() == 0) { Log.i(logTag, "Please put participants file in /video/participants.properties"); - appendTextLine("Please save the participants' voice signatures in file-participants.properties, and push the file under folder /video", true); + appendTextLine("Please save the participants' voice signatures in file named participants.properties, and push the file under folder /video", true); } else { @@ -196,9 +198,10 @@ protected void onCreate(Bundle savedInstanceState) } } - } + getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); + } - private void eventHandler(ConversationTranscriptionEventArgs e) + private void recognizingEventHandler(ConversationTranscriptionEventArgs e) { final String text = e.getResult().getText(); final String speakerId = e.getResult().getUserId().equals("Unidentified") ? "..." : e.getResult().getUserId(); @@ -216,9 +219,9 @@ private void eventHandler(ConversationTranscriptionEventArgs e) { if (transcriptions.containsKey(key)) { - if (transcriptions.get(key).getResult().getReason() == ResultReason.RecognizingSpeech) + if (transcriptions.get(key).getResult().getReason() == ResultReason.RecognizedSpeech) { - Log.e(logTag, "Two utterances occur at the same time. Offset: " + offset + "; text: " + text); + Log.e(logTag, "Two utterances occurred at the same time. Offset: " + offset + "; text: " + text); } } transcriptions.put(key, e); @@ -232,7 +235,7 @@ private void startRecognizeMeeting(ConversationTranscriber t) { t.sessionStarted.addEventListener((o, e) -> Log.i(logTag, "Session started event. Start recognition")); - t.recognizing.addEventListener((o, e) -> eventHandler(e)); + t.recognizing.addEventListener((o, e) -> recognizingEventHandler(e)); t.recognized.addEventListener((o, e) -> { final String text = e.getResult().getText(); @@ -244,7 +247,7 @@ private void startRecognizeMeeting(ConversationTranscriber t) if (!text.isEmpty() && !speakerId.equals("$ref$")) { - final SpeakerData data = new SpeakerData(speakerId, colorMap.get(speakerId.equals("Guest") ? "?" : speakerId)); + final SpeakerData data = new SpeakerData(speakerId, colorMap.get(speakerId)); final Transcription transcription = new Transcription(text, data, offset); runOnUiThread(() -> { @@ -336,23 +339,23 @@ private void setRecognizedText() private void appendTextLine(final String s, final Boolean erase) { - conversation.this.runOnUiThread(() -> { + Conversation.this.runOnUiThread(() -> { if (erase) { - IntermediateTextView.setText(s); + intermediateTextView.setText(s); } else { - String txt = IntermediateTextView.getText().toString(); - IntermediateTextView.setText(String.format("%s\n%s", txt, s)); + String txt = intermediateTextView.getText().toString(); + intermediateTextView.setText(String.format("%s\n%s", txt, s)); } - final Layout layout = IntermediateTextView.getLayout(); + final Layout layout = intermediateTextView.getLayout(); if (layout != null) { - int scrollDelta = layout.getLineBottom(IntermediateTextView.getLineCount() - 1) - -IntermediateTextView.getScrollY() -IntermediateTextView.getHeight(); + int scrollDelta = layout.getLineBottom(intermediateTextView.getLineCount() - 1) + -intermediateTextView.getScrollY() -intermediateTextView.getHeight(); if (scrollDelta > 0) - IntermediateTextView.scrollBy(0, scrollDelta); + intermediateTextView.scrollBy(0, scrollDelta); } }); } @@ -385,6 +388,6 @@ private interface OnTaskCompletedListener private void displayException(Exception ex) { - IntermediateTextView.setText(String.format("%s\n%s", ex.getMessage(), TextUtils.join("\n", ex.getStackTrace()))); + intermediateTextView.setText(String.format("%s\n%s", ex.getMessage(), TextUtils.join("\n", ex.getStackTrace()))); } } diff --git a/Samples/Android/Speech Devices SDK Starter App/example/app/src/main/java/com/microsoft/cognitiveservices/speech/samples/sdsdkstarterapp/LanguageCode.java b/Samples/Android/Speech Devices SDK Starter App/example/app/src/main/java/com/microsoft/cognitiveservices/speech/samples/sdsdkstarterapp/LanguageCode.java index 108be61..aa76faf 100644 --- a/Samples/Android/Speech Devices SDK Starter App/example/app/src/main/java/com/microsoft/cognitiveservices/speech/samples/sdsdkstarterapp/LanguageCode.java +++ b/Samples/Android/Speech Devices SDK Starter App/example/app/src/main/java/com/microsoft/cognitiveservices/speech/samples/sdsdkstarterapp/LanguageCode.java @@ -1,7 +1,7 @@ package com.microsoft.cognitiveservices.speech.samples.sdsdkstarterapp; import java.util.HashMap; - +import java.util.Map; public class LanguageCode { private static HashMap mapRecolanguageCode = new HashMap(){ diff --git a/Samples/Android/Speech Devices SDK Starter App/example/app/src/main/java/com/microsoft/cognitiveservices/speech/samples/sdsdkstarterapp/listLanguage.java b/Samples/Android/Speech Devices SDK Starter App/example/app/src/main/java/com/microsoft/cognitiveservices/speech/samples/sdsdkstarterapp/ListLanguage.java similarity index 98% rename from Samples/Android/Speech Devices SDK Starter App/example/app/src/main/java/com/microsoft/cognitiveservices/speech/samples/sdsdkstarterapp/listLanguage.java rename to Samples/Android/Speech Devices SDK Starter App/example/app/src/main/java/com/microsoft/cognitiveservices/speech/samples/sdsdkstarterapp/ListLanguage.java index ab57a9d..086dbc3 100644 --- a/Samples/Android/Speech Devices SDK Starter App/example/app/src/main/java/com/microsoft/cognitiveservices/speech/samples/sdsdkstarterapp/listLanguage.java +++ b/Samples/Android/Speech Devices SDK Starter App/example/app/src/main/java/com/microsoft/cognitiveservices/speech/samples/sdsdkstarterapp/ListLanguage.java @@ -14,7 +14,7 @@ import static com.microsoft.cognitiveservices.speech.samples.sdsdkstarterapp.MainActivity.SELECT_RECOGNIZE_LANGUAGE_REQUEST; import static com.microsoft.cognitiveservices.speech.samples.sdsdkstarterapp.MainActivity.SELECT_TRANSLATE_LANGUAGE_REQUEST; -public class listLanguage extends AppCompatActivity { +public class ListLanguage extends AppCompatActivity { private ListView listViewlanguage; private final String[] recolanguage = {"English (United States)","German (Germany)","Chinese (Mandarin, simplified)","English (India)","Spanish (Spain)","French (France)","Italian (Italy)","Portuguese (Brazil)" ,"Russian (Russia)"}; private final String[] tranlanguage = {"Afrikaans", "Arabic", "Bangla", "Bosnian (Latin)", "Bulgarian", "Cantonese (Traditional)", "Catalan", "Chinese Simplified", "Chinese Traditional", "Croatian", "Czech", "Danish", "Dutch", "English", "Estonian", "Fijian", "Filipino", "Finnish", "French", "German", "Greek", "Haitian Creole", "Hebrew", "Hindi", "Hmong Daw", "Hungarian", "Indonesian", "Italian", "Japanese", "Kiswahili", "Klingon", "Klingon (plqaD)", "Korean", "Latvian", "Lithuanian", "Malagasy", "Malay", "Maltese", "Norwegian", "Persian", "Polish", "Portuguese", "Queretaro Otomi", "Romanian", "Russian", "Samoan", "Serbian (Cyrillic)", "Serbian (Latin)", "Slovak", "Slovenian", "Spanish", "Swedish", "Tahitian", "Tamil", "Thai", "Tongan", "Turkish", "Ukrainian", "Urdu", "Vietnamese", "Welsh", "Yucatec Maya"}; @@ -57,7 +57,6 @@ public void onItemClick(AdapterView parent, final View view, setResult(RESULT_OK, sendIntent); finish(); } - }); } } diff --git a/Samples/Android/Speech Devices SDK Starter App/example/app/src/main/java/com/microsoft/cognitiveservices/speech/samples/sdsdkstarterapp/MainActivity.java b/Samples/Android/Speech Devices SDK Starter App/example/app/src/main/java/com/microsoft/cognitiveservices/speech/samples/sdsdkstarterapp/MainActivity.java index 08453bf..72316af 100644 --- a/Samples/Android/Speech Devices SDK Starter App/example/app/src/main/java/com/microsoft/cognitiveservices/speech/samples/sdsdkstarterapp/MainActivity.java +++ b/Samples/Android/Speech Devices SDK Starter App/example/app/src/main/java/com/microsoft/cognitiveservices/speech/samples/sdsdkstarterapp/MainActivity.java @@ -78,8 +78,8 @@ public class MainActivity extends AppCompatActivity { private TextView translateLanguageTextView; private Toolbar mainToolbar; private final HashMap intentIdMap = new HashMap<>(); - private static String languageRecognition = "en-US"; - private static String translateLanguage = "zh-Hans"; + private static String LanguageRecognition = "en-US"; + private static String TranslateLanguage = "zh-Hans"; static final int SELECT_RECOGNIZE_LANGUAGE_REQUEST = 0; static final int SELECT_TRANSLATE_LANGUAGE_REQUEST = 1; @@ -101,7 +101,7 @@ public static SpeechConfig getSpeechConfig() { // PMA parameters speechConfig.setProperty("DeviceGeometry", DeviceGeometry); speechConfig.setProperty("SelectedGeometry", SelectedGeometry); - speechConfig.setSpeechRecognitionLanguage(languageRecognition); + speechConfig.setSpeechRecognitionLanguage(LanguageRecognition); return speechConfig; } @@ -112,13 +112,13 @@ public boolean onCreateOptionsMenu(Menu menu){ public boolean onOptionsItemSelected(MenuItem item){ switch(item.getItemId()){ case R.id.RecoLanguage : { - Intent selectLanguageIntent = new Intent(this,listLanguage.class); + Intent selectLanguageIntent = new Intent(this,ListLanguage.class); selectLanguageIntent.putExtra("RecognizeOrTranslate", SELECT_RECOGNIZE_LANGUAGE_REQUEST); startActivityForResult(selectLanguageIntent, SELECT_RECOGNIZE_LANGUAGE_REQUEST); return true; } case R.id.TranLanguage :{ - Intent selectLanguageIntent = new Intent(this, listLanguage.class); + Intent selectLanguageIntent = new Intent(this, ListLanguage.class); selectLanguageIntent.putExtra("RecognizeOrTranslate", SELECT_TRANSLATE_LANGUAGE_REQUEST); startActivityForResult(selectLanguageIntent, SELECT_TRANSLATE_LANGUAGE_REQUEST); return true; @@ -153,7 +153,7 @@ protected void onCreate(Bundle savedInstanceState) { // check if we have a valid key /////////////////////////////////////////////////// if (SpeechSubscriptionKey.startsWith("<") || SpeechSubscriptionKey.endsWith(">")) { - recognizedTextView.setText( "Error: Replace SpeechSubscriptionKey with your actual speech subscription key and re-compile!"); + recognizedTextView.setText( "Error: Replace SpeechSubscriptionKey with your actual speech subscription key and re-compile!"); return; } /////////////////////////////////////////////////// @@ -186,7 +186,7 @@ protected void onCreate(Bundle savedInstanceState) { try { - Log.i(logTag, languageRecognition); + Log.i(logTag, LanguageRecognition); final SpeechRecognizer reco = new SpeechRecognizer(this.getSpeechConfig(), this.getAudioConfig()); reco.recognizing.addEventListener((o, speechRecognitionResultEventArgs) -> { @@ -398,7 +398,7 @@ public void onClick(View view) { final SpeechConfig speechIntentConfig = SpeechConfig.fromSubscription(LuisSubscriptionKey, LuisRegion); speechIntentConfig.setProperty("DeviceGeometry", DeviceGeometry); speechIntentConfig.setProperty("SelectedGeometry", SelectedGeometry); - speechIntentConfig.setSpeechRecognitionLanguage(languageRecognition); + speechIntentConfig.setSpeechRecognitionLanguage(LanguageRecognition); IntentRecognizer reco = new IntentRecognizer(speechIntentConfig, getAudioConfig()); LanguageUnderstandingModel intentModel = LanguageUnderstandingModel.fromAppId(LuisAppId); @@ -483,7 +483,7 @@ public void onClick(View view) { content.add(""); try { final SpeechConfig intentSpeechConfig = SpeechConfig.fromSubscription(LuisSubscriptionKey, LuisRegion); - intentSpeechConfig.setSpeechRecognitionLanguage(languageRecognition); + intentSpeechConfig.setSpeechRecognitionLanguage(LanguageRecognition); intentSpeechConfig.setProperty("DeviceGeometry", DeviceGeometry); intentSpeechConfig.setProperty("SelectedGeometry", SelectedGeometry); reco = new IntentRecognizer(intentSpeechConfig, getAudioConfig()); @@ -561,7 +561,7 @@ public void onClick(View view) { /////////////////////////////////////////////////// ctsButton.setOnClickListener(view ->{ if(!checkSystemTime()) return; - Intent meetingIntent = new Intent(this, conversation.class); + Intent meetingIntent = new Intent(this, Conversation.class); startActivity(meetingIntent); }); @@ -604,9 +604,9 @@ public void onClick(final View view) { try { content.clear(); final SpeechTranslationConfig translationSpeechConfig = SpeechTranslationConfig.fromSubscription(SpeechSubscriptionKey, SpeechRegion); - translationSpeechConfig.addTargetLanguage(languageRecognition); - translationSpeechConfig.addTargetLanguage(translateLanguage); - translationSpeechConfig.setSpeechRecognitionLanguage(languageRecognition); + translationSpeechConfig.addTargetLanguage(LanguageRecognition); + translationSpeechConfig.addTargetLanguage(TranslateLanguage); + translationSpeechConfig.setSpeechRecognitionLanguage(LanguageRecognition); translationSpeechConfig.setProperty("DeviceGeometry", DeviceGeometry); translationSpeechConfig.setProperty("SelectedGeometry", SelectedGeometry); reco = new TranslationRecognizer(translationSpeechConfig, getAudioConfig()); @@ -712,14 +712,14 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == SELECT_RECOGNIZE_LANGUAGE_REQUEST) { if (resultCode == RESULT_OK) { String language = data.getStringExtra("language"); - languageRecognition = getCode(0,language); + LanguageRecognition = getCode(0,language); recognizeLanguageTextView.setText(language); } } if (requestCode == SELECT_TRANSLATE_LANGUAGE_REQUEST) { if (resultCode == RESULT_OK) { String language = data.getStringExtra("language"); - translateLanguage = getCode(1,language); + TranslateLanguage = getCode(1,language); translateLanguageTextView.setText(language); } } diff --git a/Samples/Android/Speech Devices SDK Starter App/example/app/src/main/res/values/styles.xml b/Samples/Android/Speech Devices SDK Starter App/example/app/src/main/res/values/styles.xml index ece794b..121c3d2 100644 --- a/Samples/Android/Speech Devices SDK Starter App/example/app/src/main/res/values/styles.xml +++ b/Samples/Android/Speech Devices SDK Starter App/example/app/src/main/res/values/styles.xml @@ -25,4 +25,5 @@