diff --git a/build.gradle b/build.gradle index b4d37b7..2baea4a 100644 --- a/build.gradle +++ b/build.gradle @@ -4,6 +4,6 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:2.1.0' + classpath 'com.android.tools.build:gradle:2.1.3' } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index c3dcd4d..edc160e 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Jun 29 15:42:06 PDT 2016 +#Mon Aug 29 21:22:14 PDT 2016 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip diff --git a/samples/SpeechRecoExample/AndroidManifest.xml b/samples/SpeechRecoExample/AndroidManifest.xml deleted file mode 100644 index 9ff8840..0000000 --- a/samples/SpeechRecoExample/AndroidManifest.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/SpeechRecoExample/build.gradle b/samples/SpeechRecoExample/build.gradle deleted file mode 100644 index 2f22379..0000000 --- a/samples/SpeechRecoExample/build.gradle +++ /dev/null @@ -1,49 +0,0 @@ -apply plugin: 'com.android.application' - -repositories { - maven { - name = 'Maven Central Repo' //optional name - url = 'http://repo1.maven.org/maven2/' - } -} -dependencies { - compile 'com.microsoft.projectoxford:speechrecognition:0.6.0' -} - -android { - compileSdkVersion 21 - buildToolsVersion '21.1.2' - - productFlavors { - x86 { - ndk { - abiFilter "x86" - } - } - arm { - ndk { - abiFilters "armeabi" - } - } - } - - sourceSets { - main { - manifest.srcFile 'AndroidManifest.xml' - java.srcDirs = ['src'] - resources.srcDirs = ['src'] - aidl.srcDirs = ['src'] - renderscript.srcDirs = ['src'] - res.srcDirs = ['res'] - assets.srcDirs = ['assets'] - jniLibs.srcDir '../../SpeechSDK/libs' - } - - debug.setRoot('build-types/debug') - release.setRoot('build-types/release') - } - - lintOptions { - abortOnError false - } -} diff --git a/samples/SpeechRecoExample/gradle.properties b/samples/SpeechRecoExample/gradle.properties deleted file mode 100644 index d72861d..0000000 --- a/samples/SpeechRecoExample/gradle.properties +++ /dev/null @@ -1 +0,0 @@ -android.useDeprecatedNdk=true \ No newline at end of file diff --git a/samples/SpeechRecoExample/libs/android-support-v4.jar b/samples/SpeechRecoExample/libs/android-support-v4.jar deleted file mode 100644 index 4ebdaa9..0000000 Binary files a/samples/SpeechRecoExample/libs/android-support-v4.jar and /dev/null differ diff --git a/samples/SpeechRecoExample/res/drawable-hdpi/ic_launcher.png b/samples/SpeechRecoExample/res/drawable-hdpi/ic_launcher.png deleted file mode 100644 index 288b665..0000000 Binary files a/samples/SpeechRecoExample/res/drawable-hdpi/ic_launcher.png and /dev/null differ diff --git a/samples/SpeechRecoExample/res/drawable-mdpi/ic_launcher.png b/samples/SpeechRecoExample/res/drawable-mdpi/ic_launcher.png deleted file mode 100644 index 6ae570b..0000000 Binary files a/samples/SpeechRecoExample/res/drawable-mdpi/ic_launcher.png and /dev/null differ diff --git a/samples/SpeechRecoExample/res/drawable-xhdpi/ic_launcher.png b/samples/SpeechRecoExample/res/drawable-xhdpi/ic_launcher.png deleted file mode 100644 index d4fb7cd..0000000 Binary files a/samples/SpeechRecoExample/res/drawable-xhdpi/ic_launcher.png and /dev/null differ diff --git a/samples/SpeechRecoExample/res/drawable-xxhdpi/ic_launcher.png b/samples/SpeechRecoExample/res/drawable-xxhdpi/ic_launcher.png deleted file mode 100644 index 85a6081..0000000 Binary files a/samples/SpeechRecoExample/res/drawable-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/samples/SpeechRecoExample/res/menu/main.xml b/samples/SpeechRecoExample/res/menu/main.xml deleted file mode 100644 index ce153eb..0000000 --- a/samples/SpeechRecoExample/res/menu/main.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - diff --git a/samples/SpeechRecoExample/res/values-v11/styles.xml b/samples/SpeechRecoExample/res/values-v11/styles.xml deleted file mode 100644 index 3c02242..0000000 --- a/samples/SpeechRecoExample/res/values-v11/styles.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/samples/SpeechRecoExample/res/values-v14/styles.xml b/samples/SpeechRecoExample/res/values-v14/styles.xml deleted file mode 100644 index a91fd03..0000000 --- a/samples/SpeechRecoExample/res/values-v14/styles.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/samples/SpeechRecoExample/res/values/strings.xml b/samples/SpeechRecoExample/res/values/strings.xml deleted file mode 100644 index a3f3ad7..0000000 --- a/samples/SpeechRecoExample/res/values/strings.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - Please_add_the_primary_subscription_key_here - Please_add_the_secondary_subscription_key_here - Subscription Key is Needed - Please put your subscription key to source file \"app/res/values/strings.xml\" to enable Face API calls. - - yourLuisAppID - yourLuisSubscriptionID - - Project Oxford Speech Recognition Sample - Settings - diff --git a/samples/SpeechRecoExample/res/values/styles.xml b/samples/SpeechRecoExample/res/values/styles.xml deleted file mode 100644 index 6ce89c7..0000000 --- a/samples/SpeechRecoExample/res/values/styles.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - diff --git a/samples/SpeechRecognitionExample/.gitignore b/samples/SpeechRecognitionExample/.gitignore new file mode 100644 index 0000000..c6cbe56 --- /dev/null +++ b/samples/SpeechRecognitionExample/.gitignore @@ -0,0 +1,8 @@ +*.iml +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures diff --git a/samples/SpeechRecognitionExample/app/.gitignore b/samples/SpeechRecognitionExample/app/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/samples/SpeechRecognitionExample/app/.gitignore @@ -0,0 +1 @@ +/build diff --git a/samples/SpeechRecognitionExample/app/build.gradle b/samples/SpeechRecognitionExample/app/build.gradle new file mode 100644 index 0000000..4461e16 --- /dev/null +++ b/samples/SpeechRecognitionExample/app/build.gradle @@ -0,0 +1,27 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 24 + buildToolsVersion "24.0.1" + + defaultConfig { + applicationId "com.microsoft.speechrecognitionexample" + minSdkVersion 16 + targetSdkVersion 24 + versionCode 1 + versionName "1.0" + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } +} + +dependencies { + compile fileTree(dir: 'libs', include: ['*.jar']) + testCompile 'junit:junit:4.12' + compile 'com.android.support:appcompat-v7:24.2.0' + compile 'com.microsoft.projectoxford:speechrecognition:0.6.0' +} diff --git a/samples/SpeechRecognitionExample/app/proguard-rules.pro b/samples/SpeechRecognitionExample/app/proguard-rules.pro new file mode 100644 index 0000000..f3fd649 --- /dev/null +++ b/samples/SpeechRecognitionExample/app/proguard-rules.pro @@ -0,0 +1,17 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in /Users/kabirkhan14/Library/Android/sdk/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} diff --git a/samples/SpeechRecognitionExample/app/src/androidTest/java/com/microsoft/speechrecognitionexample/ApplicationTest.java b/samples/SpeechRecognitionExample/app/src/androidTest/java/com/microsoft/speechrecognitionexample/ApplicationTest.java new file mode 100644 index 0000000..65373c2 --- /dev/null +++ b/samples/SpeechRecognitionExample/app/src/androidTest/java/com/microsoft/speechrecognitionexample/ApplicationTest.java @@ -0,0 +1,13 @@ +package com.microsoft.speechrecognitionexample; + +import android.app.Application; +import android.test.ApplicationTestCase; + +/** + * Testing Fundamentals + */ +public class ApplicationTest extends ApplicationTestCase { + public ApplicationTest() { + super(Application.class); + } +} \ No newline at end of file diff --git a/samples/SpeechRecognitionExample/app/src/main/AndroidManifest.xml b/samples/SpeechRecognitionExample/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..6633b24 --- /dev/null +++ b/samples/SpeechRecognitionExample/app/src/main/AndroidManifest.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/samples/SpeechRecoExample/assets/batman.wav b/samples/SpeechRecognitionExample/app/src/main/assets/batman.wav similarity index 100% rename from samples/SpeechRecoExample/assets/batman.wav rename to samples/SpeechRecognitionExample/app/src/main/assets/batman.wav diff --git a/samples/SpeechRecoExample/assets/whatstheweatherlike.wav b/samples/SpeechRecognitionExample/app/src/main/assets/whatstheweatherlike.wav similarity index 100% rename from samples/SpeechRecoExample/assets/whatstheweatherlike.wav rename to samples/SpeechRecognitionExample/app/src/main/assets/whatstheweatherlike.wav diff --git a/samples/SpeechRecoExample/src/com/microsoft/AzureIntelligentServicesExample/MainActivity.java b/samples/SpeechRecognitionExample/app/src/main/java/com/microsoft/speechrecognitionexample/MainActivity.java similarity index 86% rename from samples/SpeechRecoExample/src/com/microsoft/AzureIntelligentServicesExample/MainActivity.java rename to samples/SpeechRecognitionExample/app/src/main/java/com/microsoft/speechrecognitionexample/MainActivity.java index ddc344f..0cb98cd 100644 --- a/samples/SpeechRecoExample/src/com/microsoft/AzureIntelligentServicesExample/MainActivity.java +++ b/samples/SpeechRecognitionExample/app/src/main/java/com/microsoft/speechrecognitionexample/MainActivity.java @@ -30,7 +30,7 @@ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.microsoft.AzureIntelligentServicesExample; +package com.microsoft.speechrecognitionexample; import android.app.Activity; import android.app.AlertDialog; @@ -62,14 +62,14 @@ public class MainActivity extends Activity implements ISpeechRecognitionServerEv RadioGroup _radioGroup; Button _buttonSelectMode; Button _startButton; - + public enum FinalResponseStatus { NotReceived, OK, Timeout } - + /** * Gets the primary subscription key */ - public String getPrimaryKey() { - return this.getString(R.string.primaryKey); + public String getPrimaryKey() { + return this.getString(R.string.primaryKey); } /** @@ -80,7 +80,7 @@ public String getSecondaryKey() { } /** - * Gets the LUIS application identifier. + * Gets the LUIS application identifier. Need to create a model at luis.ai * @return The LUIS application identifier. */ private String getLuisAppId() { @@ -88,11 +88,11 @@ private String getLuisAppId() { } /** - * Gets the LUIS subscription identifier. - * @return The LUIS subscription identifier. + * Gets the LUIS primary key from your Azure Deployment of LUIS Cognitive Service + * @return The LUIS primary key from your Azure Deployment */ - private String getLuisSubscriptionID() { - return this.getString(R.string.luisSubscriptionID); + private String getLuisPrimaryKey() { + return this.getString(R.string.luisPrimaryKey); } /** @@ -102,8 +102,8 @@ private String getLuisSubscriptionID() { private Boolean getUseMicrophone() { int id = this._radioGroup.getCheckedRadioButtonId(); return id == R.id.micIntentRadioButton || - id == R.id.micDictationRadioButton || - id == (R.id.micRadioButton - 1); + id == R.id.micDictationRadioButton || + id == (R.id.micRadioButton - 1); } /** @@ -113,7 +113,7 @@ private Boolean getUseMicrophone() { private Boolean getWantIntent() { int id = this._radioGroup.getCheckedRadioButtonId(); return id == R.id.dataShortIntentRadioButton || - id == R.id.micIntentRadioButton; + id == R.id.micIntentRadioButton; } /** @@ -123,7 +123,7 @@ private Boolean getWantIntent() { private SpeechRecognitionMode getMode() { int id = this._radioGroup.getCheckedRadioButtonId(); if (id == R.id.micDictationRadioButton || - id == R.id.dataLongRadioButton) { + id == R.id.dataLongRadioButton) { return SpeechRecognitionMode.LongDictation; } @@ -171,7 +171,7 @@ protected void onCreate(Bundle savedInstanceState) { .setCancelable(false) .show(); } - + // setup the buttons final MainActivity This = this; this._startButton.setOnClickListener(new OnClickListener() { @@ -227,14 +227,14 @@ private void StartButton_Click(View arg0) { this.WriteLine("--- Start microphone dictation with Intent detection ----"); this.micClient = - SpeechRecognitionServiceFactory.createMicrophoneClientWithIntent( - this, - this.getDefaultLocale(), - this, - this.getPrimaryKey(), - this.getSecondaryKey(), - this.getLuisAppId(), - this.getLuisSubscriptionID()); + SpeechRecognitionServiceFactory.createMicrophoneClientWithIntent( + this, + this.getDefaultLocale(), + this, + this.getPrimaryKey(), + this.getSecondaryKey(), + this.getLuisAppId(), + this.getLuisPrimaryKey()); } else { @@ -255,14 +255,14 @@ private void StartButton_Click(View arg0) { if (null == this.dataClient) { if (this.getWantIntent()) { this.dataClient = - SpeechRecognitionServiceFactory.createDataClientWithIntent( - this, - this.getDefaultLocale(), - this, - this.getPrimaryKey(), - this.getSecondaryKey(), - this.getLuisAppId(), - this.getLuisSubscriptionID()); + SpeechRecognitionServiceFactory.createDataClientWithIntent( + this, + this.getDefaultLocale(), + this, + this.getPrimaryKey(), + this.getSecondaryKey(), + this.getLuisAppId(), + this.getLuisPrimaryKey()); } else { this.dataClient = SpeechRecognitionServiceFactory.createDataClient( @@ -309,9 +309,9 @@ private void SendAudioHelper(String filename) { } public void onFinalResponseReceived(final RecognitionResult response) { - boolean isFinalDicationMessage = this.getMode() == SpeechRecognitionMode.LongDictation && - (response.RecognitionStatus == RecognitionStatus.EndOfDictation || - response.RecognitionStatus == RecognitionStatus.DictationEndSilenceTimeout); + boolean isFinalDicationMessage = this.getMode() == SpeechRecognitionMode.LongDictation && + (response.RecognitionStatus == RecognitionStatus.EndOfDictation || + response.RecognitionStatus == RecognitionStatus.DictationEndSilenceTimeout); if (null != this.micClient && this.getUseMicrophone() && ((this.getMode() == SpeechRecognitionMode.ShortPhrase) || isFinalDicationMessage)) { // we got the final result, so it we can end the mic reco. No need to do this // for dataReco, since we already called endAudio() on it as soon as we were done @@ -328,28 +328,28 @@ public void onFinalResponseReceived(final RecognitionResult response) { this.WriteLine("********* Final n-BEST Results *********"); for (int i = 0; i < response.Results.length; i++) { this.WriteLine("[" + i + "]" + " Confidence=" + response.Results[i].Confidence + - " Text=\"" + response.Results[i].DisplayText + "\""); + " Text=\"" + response.Results[i].DisplayText + "\""); } this.WriteLine(); } - } + } /** - * Called when a final response is received and its intent is parsed - */ + * Called when a final response is received and its intent is parsed + */ public void onIntentReceived(final String payload) { this.WriteLine("--- Intent received by onIntentReceived() ---"); this.WriteLine(payload); this.WriteLine(); } - + public void onPartialResponseReceived(final String response) { this.WriteLine("--- Partial result received by onPartialResponseReceived() ---"); - this.WriteLine(response); + this.WriteLine(response); this.WriteLine(); } - + public void onError(final int errorCode, final String response) { this._startButton.setEnabled(true); this.WriteLine("--- Error received by onError() ---"); @@ -422,45 +422,45 @@ private void RadioButton_Click(RadioGroup rGroup, int checkedId) { } /* - * Speech recognition with data (for example from a file or audio source). + * Speech recognition with data (for example from a file or audio source). * The data is broken up into buffers and each buffer is sent to the Speech Recognition Service. * No modification is done to the buffers, so the user can apply their * own VAD (Voice Activation Detection) or Silence Detection - * + * * @param dataClient * @param recoMode * @param filename - */ + */ private class RecognitionTask extends AsyncTask { DataRecognitionClient dataClient; SpeechRecognitionMode recoMode; String filename; - + RecognitionTask(DataRecognitionClient dataClient, SpeechRecognitionMode recoMode, String filename) { this.dataClient = dataClient; this.recoMode = recoMode; this.filename = filename; } - + @Override protected Void doInBackground(Void... params) { - try { + try { // Note for wave files, we can just send data from the file right to the server. // In the case you are not an audio file in wave format, and instead you have just - // raw data (for example audio coming over bluetooth), then before sending up any - // audio data, you must first send up an SpeechAudioFormat descriptor to describe + // raw data (for example audio coming over bluetooth), then before sending up any + // audio data, you must first send up an SpeechAudioFormat descriptor to describe // the layout and format of your raw audio data via DataRecognitionClient's sendAudioFormat() method. // String filename = recoMode == SpeechRecognitionMode.ShortPhrase ? "whatstheweatherlike.wav" : "batman.wav"; InputStream fileStream = getAssets().open(filename); int bytesRead = 0; byte[] buffer = new byte[1024]; - + do { // Get Audio data to send into byte buffer. bytesRead = fileStream.read(buffer); if (bytesRead > -1) { - // Send of audio data to service. + // Send of audio data to service. dataClient.sendAudio(buffer, bytesRead); } } while (bytesRead > 0); @@ -468,10 +468,10 @@ protected Void doInBackground(Void... params) { } catch (Throwable throwable) { throwable.printStackTrace(); } - finally { + finally { dataClient.endAudio(); } - + return null; } } diff --git a/samples/SpeechRecognitionExample/app/src/main/jniLibs/armeabi/libandroid_platform.so b/samples/SpeechRecognitionExample/app/src/main/jniLibs/armeabi/libandroid_platform.so new file mode 100755 index 0000000..2efa2bb Binary files /dev/null and b/samples/SpeechRecognitionExample/app/src/main/jniLibs/armeabi/libandroid_platform.so differ diff --git a/samples/SpeechRecognitionExample/app/src/main/jniLibs/x86/libandroid_platform.so b/samples/SpeechRecognitionExample/app/src/main/jniLibs/x86/libandroid_platform.so new file mode 100755 index 0000000..aeeb733 Binary files /dev/null and b/samples/SpeechRecognitionExample/app/src/main/jniLibs/x86/libandroid_platform.so differ diff --git a/samples/SpeechRecoExample/res/layout/activity_main.xml b/samples/SpeechRecognitionExample/app/src/main/res/layout/activity_main.xml similarity index 100% rename from samples/SpeechRecoExample/res/layout/activity_main.xml rename to samples/SpeechRecognitionExample/app/src/main/res/layout/activity_main.xml diff --git a/samples/SpeechRecognitionExample/app/src/main/res/mipmap-hdpi/ic_launcher.png b/samples/SpeechRecognitionExample/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..cde69bc Binary files /dev/null and b/samples/SpeechRecognitionExample/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/samples/SpeechRecognitionExample/app/src/main/res/mipmap-mdpi/ic_launcher.png b/samples/SpeechRecognitionExample/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..c133a0c Binary files /dev/null and b/samples/SpeechRecognitionExample/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/samples/SpeechRecognitionExample/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/samples/SpeechRecognitionExample/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..bfa42f0 Binary files /dev/null and b/samples/SpeechRecognitionExample/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/samples/SpeechRecognitionExample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/samples/SpeechRecognitionExample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..324e72c Binary files /dev/null and b/samples/SpeechRecognitionExample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/samples/SpeechRecognitionExample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/samples/SpeechRecognitionExample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..aee44e1 Binary files /dev/null and b/samples/SpeechRecognitionExample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/samples/SpeechRecoExample/res/values-w820dp/dimens.xml b/samples/SpeechRecognitionExample/app/src/main/res/values-w820dp/dimens.xml similarity index 70% rename from samples/SpeechRecoExample/res/values-w820dp/dimens.xml rename to samples/SpeechRecognitionExample/app/src/main/res/values-w820dp/dimens.xml index f3e7020..63fc816 100644 --- a/samples/SpeechRecoExample/res/values-w820dp/dimens.xml +++ b/samples/SpeechRecognitionExample/app/src/main/res/values-w820dp/dimens.xml @@ -1,10 +1,6 @@ - - + would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). --> 64dp - diff --git a/samples/SpeechRecognitionExample/app/src/main/res/values/colors.xml b/samples/SpeechRecognitionExample/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..3ab3e9c --- /dev/null +++ b/samples/SpeechRecognitionExample/app/src/main/res/values/colors.xml @@ -0,0 +1,6 @@ + + + #3F51B5 + #303F9F + #FF4081 + diff --git a/samples/SpeechRecoExample/res/values/dimens.xml b/samples/SpeechRecognitionExample/app/src/main/res/values/dimens.xml similarity index 99% rename from samples/SpeechRecoExample/res/values/dimens.xml rename to samples/SpeechRecognitionExample/app/src/main/res/values/dimens.xml index 55c1e59..47c8224 100644 --- a/samples/SpeechRecoExample/res/values/dimens.xml +++ b/samples/SpeechRecognitionExample/app/src/main/res/values/dimens.xml @@ -1,7 +1,5 @@ - 16dp 16dp - diff --git a/samples/SpeechRecognitionExample/app/src/main/res/values/strings.xml b/samples/SpeechRecognitionExample/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..87a20ef --- /dev/null +++ b/samples/SpeechRecognitionExample/app/src/main/res/values/strings.xml @@ -0,0 +1,15 @@ + + + + +Please_add_the_primary_subscription_key_here +Please_add_the_secondary_subscription_key_here +Subscription Key is Needed +Please put your subscription key to source file \"app/res/values/strings.xml\" to enable Face API calls. + +yourLuisAppID +yourLuisPrimaryKey + +Project Oxford Speech Recognition Sample +Settings + diff --git a/samples/SpeechRecognitionExample/app/src/main/res/values/styles.xml b/samples/SpeechRecognitionExample/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..5885930 --- /dev/null +++ b/samples/SpeechRecognitionExample/app/src/main/res/values/styles.xml @@ -0,0 +1,11 @@ + + + + + + diff --git a/samples/SpeechRecognitionExample/app/src/test/java/com/microsoft/speechrecognitionexample/ExampleUnitTest.java b/samples/SpeechRecognitionExample/app/src/test/java/com/microsoft/speechrecognitionexample/ExampleUnitTest.java new file mode 100644 index 0000000..173b4c3 --- /dev/null +++ b/samples/SpeechRecognitionExample/app/src/test/java/com/microsoft/speechrecognitionexample/ExampleUnitTest.java @@ -0,0 +1,15 @@ +package com.microsoft.speechrecognitionexample; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * To work on unit tests, switch the Test Artifact in the Build Variants view. + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() throws Exception { + assertEquals(4, 2 + 2); + } +} \ No newline at end of file diff --git a/samples/SpeechRecognitionExample/build.gradle b/samples/SpeechRecognitionExample/build.gradle new file mode 100644 index 0000000..77ce66e --- /dev/null +++ b/samples/SpeechRecognitionExample/build.gradle @@ -0,0 +1,23 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + repositories { + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:2.1.3' + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + jcenter() + } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/samples/SpeechRecognitionExample/gradle.properties b/samples/SpeechRecognitionExample/gradle.properties new file mode 100644 index 0000000..1d3591c --- /dev/null +++ b/samples/SpeechRecognitionExample/gradle.properties @@ -0,0 +1,18 @@ +# Project-wide Gradle settings. + +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. + +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html + +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +# Default value: -Xmx10248m -XX:MaxPermSize=256m +# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 + +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true \ No newline at end of file diff --git a/samples/SpeechRecoExample/gradle/wrapper/gradle-wrapper.jar b/samples/SpeechRecognitionExample/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from samples/SpeechRecoExample/gradle/wrapper/gradle-wrapper.jar rename to samples/SpeechRecognitionExample/gradle/wrapper/gradle-wrapper.jar diff --git a/samples/SpeechRecoExample/gradle/wrapper/gradle-wrapper.properties b/samples/SpeechRecognitionExample/gradle/wrapper/gradle-wrapper.properties similarity index 79% rename from samples/SpeechRecoExample/gradle/wrapper/gradle-wrapper.properties rename to samples/SpeechRecognitionExample/gradle/wrapper/gradle-wrapper.properties index 122a0dc..a5139f1 100644 --- a/samples/SpeechRecoExample/gradle/wrapper/gradle-wrapper.properties +++ b/samples/SpeechRecognitionExample/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Dec 28 10:00:20 PST 2015 +#Mon Aug 29 21:26:58 PDT 2016 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip diff --git a/samples/SpeechRecoExample/gradlew b/samples/SpeechRecognitionExample/gradlew old mode 100644 new mode 100755 similarity index 100% rename from samples/SpeechRecoExample/gradlew rename to samples/SpeechRecognitionExample/gradlew diff --git a/samples/SpeechRecoExample/gradlew.bat b/samples/SpeechRecognitionExample/gradlew.bat similarity index 100% rename from samples/SpeechRecoExample/gradlew.bat rename to samples/SpeechRecognitionExample/gradlew.bat diff --git a/samples/SpeechRecognitionExample/settings.gradle b/samples/SpeechRecognitionExample/settings.gradle new file mode 100644 index 0000000..e7b4def --- /dev/null +++ b/samples/SpeechRecognitionExample/settings.gradle @@ -0,0 +1 @@ +include ':app'