├── .gitignore ├── LICENSE.md ├── README.md ├── build.gradle ├── examples ├── .gitignore ├── README.md ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── ai │ │ └── olami │ │ └── android │ │ └── example │ │ ├── Config.java │ │ ├── MainActivity.java │ │ ├── SpeechInputActivity.java │ │ ├── TextInputNLIAnalysisActivity.java │ │ └── TextInputWordSegmentationActivity.java │ └── res │ ├── layout │ ├── activity_main.xml │ ├── activity_speech_input.xml │ ├── activity_text_input_nli_analysis.xml │ ├── activity_text_input_word_segmentation.xml │ └── configuration_setting.xml │ ├── menu │ └── menu.xml │ ├── mipmap-hdpi │ ├── ic_launcher.png │ ├── ic_launcher_round.png │ └── microphone.png │ ├── mipmap-mdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-xhdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-xxhdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-xxxhdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── values-en │ └── strings.xml │ ├── values-zh-rTW │ └── strings.xml │ └── values │ ├── colors.xml │ ├── strings.xml │ └── styles.xml ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── lib ├── .gitignore ├── CMakeLists.txt ├── build.gradle ├── libs │ └── olami-java-client-1.5.1.jar ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── cpp │ ├── native-lib.cpp │ └── speex │ │ ├── CMakeLists.txt │ │ ├── include │ │ └── speex │ │ │ ├── speex.h │ │ │ ├── speex_bits.h │ │ │ ├── speex_callbacks.h │ │ │ ├── speex_config_types.h │ │ │ ├── speex_config_types.h.bak │ │ │ ├── speex_header.h │ │ │ ├── speex_stereo.h │ │ │ └── speex_types.h │ │ ├── libspeex │ │ ├── _kiss_fft_guts.h │ │ ├── arch.h │ │ ├── bfin.h │ │ ├── bits.c │ │ ├── cb_search.c │ │ ├── cb_search.h │ │ ├── cb_search_arm4.h │ │ ├── cb_search_bfin.h │ │ ├── cb_search_sse.h │ │ ├── exc_10_16_table.c │ │ ├── exc_10_32_table.c │ │ ├── exc_20_32_table.c │ │ ├── exc_5_256_table.c │ │ ├── exc_5_64_table.c │ │ ├── exc_8_128_table.c │ │ ├── fftwrap.h │ │ ├── filters.c │ │ ├── filters.h │ │ ├── filters_arm4.h │ │ ├── filters_bfin.h │ │ ├── filters_sse.h │ │ ├── fixed_arm4.h │ │ ├── fixed_arm5e.h │ │ ├── fixed_bfin.h │ │ ├── fixed_debug.h │ │ ├── fixed_generic.h │ │ ├── gain_table.c │ │ ├── gain_table_lbr.c │ │ ├── hexc_10_32_table.c │ │ ├── hexc_table.c │ │ ├── high_lsp_tables.c │ │ ├── kiss_fft.c │ │ ├── kiss_fft.h │ │ ├── kiss_fftr.c │ │ ├── kiss_fftr.h │ │ ├── lpc.c │ │ ├── lpc.h │ │ ├── lpc_bfin.h │ │ ├── lsp.c │ │ ├── lsp.h │ │ ├── lsp_bfin.h │ │ ├── lsp_tables_nb.c │ │ ├── ltp.c │ │ ├── ltp.h │ │ ├── ltp_arm4.h │ │ ├── ltp_bfin.h │ │ ├── ltp_sse.h │ │ ├── math_approx.h │ │ ├── misc_bfin.h │ │ ├── modes.c │ │ ├── modes.h │ │ ├── modes_wb.c │ │ ├── nb_celp.c │ │ ├── nb_celp.h │ │ ├── os_support.h │ │ ├── quant_lsp.c │ │ ├── quant_lsp.h │ │ ├── quant_lsp_bfin.h │ │ ├── sb_celp.c │ │ ├── sb_celp.h │ │ ├── smallft.c │ │ ├── smallft.h │ │ ├── speex.c │ │ ├── speex_callbacks.c │ │ ├── speex_header.c │ │ ├── stack_alloc.h │ │ ├── stereo.c │ │ ├── testenc.c │ │ ├── testenc_uwb.c │ │ ├── testenc_wb.c │ │ ├── vbr.c │ │ ├── vbr.h │ │ ├── vorbis_psy.c │ │ ├── vorbis_psy.h │ │ ├── vq.c │ │ ├── vq.h │ │ ├── vq_arm4.h │ │ ├── vq_bfin.h │ │ ├── vq_sse.h │ │ └── window.c │ │ └── speex_jni.cpp │ └── java │ └── ai │ └── olami │ └── android │ ├── AudioRecordManager.java │ ├── IKeepRecordingSpeechRecognizerListener.java │ ├── IRecorderSpeechRecognizerListener.java │ ├── KeepRecordingSpeechRecognizer.java │ ├── RecorderSpeechRecognizer.java │ ├── SpeechRecognizerBase.java │ ├── VoiceVolume.java │ └── jni │ └── Codec.java ├── olami-apk-test-key └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | 15 | # Gradle files 16 | .gradle/ 17 | .idea/ 18 | build/ 19 | 20 | # Local configuration file (sdk path, etc) 21 | local.properties 22 | 23 | # Proguard folder generated by Eclipse 24 | proguard/ 25 | 26 | # Log Files 27 | *.log 28 | 29 | # Android Studio 30 | .classpath 31 | .project 32 | .settings/ 33 | *.iml 34 | 35 | # Android Studio Navigation editor temp files 36 | .navigation/ 37 | .externalNativeBuild/ 38 | 39 | # Android Studio captures folder 40 | captures/ 41 | 42 | # Mac 43 | .DS_Store -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OLAMI Android Client SDK 2 | 3 | This is a repository that contains Android SDK and code examples for using OLAMI HTTP APIs, an offering within **OLAMI Open AI**. 4 | 5 | OLAMI website and documentation: [http://olami.ai](http://olami.ai) 6 | 7 | - [简体中文在线说明文档](http://cn.olami.ai/wiki/?mp=sdk&content=sdk/android/reference.html) 8 | 9 | - [繁體中文線上說明文件](http://tw.olami.ai/wiki/?mp=sdk&content=sdk/android/reference.html) 10 | 11 | * * * 12 | 13 | ### OLAMI NLP modeling (OSL design) examples 14 | 15 | See Repository : [olami-osl-examples](https://github.com/olami-developers/olami-osl-examples) 16 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | mavenCentral() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:2.3.3' 10 | classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3' 11 | classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1' 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | jcenter() 18 | mavenCentral() 19 | } 20 | } 21 | 22 | task clean(type: Delete) { 23 | delete rootProject.buildDir 24 | delete 'bin' 25 | } 26 | -------------------------------------------------------------------------------- /examples/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- 1 | # OLAMI Android Client SDK 2 | 3 | This is a repository that contains Android SDK and code examples for using OLAMI HTTP APIs, an offering within **OLAMI Open AI**. 4 | 5 | OLAMI website and documentation: [http://olami.ai](http://olami.ai) 6 | 7 | - [简体中文在线说明文档](http://cn.olami.ai/wiki/?mp=sdk&content=sdk/android/examples/reference.html) 8 | 9 | - [繁體中文線上說明文件](http://tw.olami.ai/wiki/?mp=sdk&content=sdk/android/examples/reference.html) 10 | -------------------------------------------------------------------------------- /examples/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 25 5 | buildToolsVersion "25.0.3" 6 | 7 | defaultConfig { 8 | applicationId "ai.olami.android.sample" 9 | minSdkVersion 17 10 | targetSdkVersion 25 11 | versionCode 1 12 | versionName "20190612" 13 | 14 | archivesBaseName = "olami-android-client-examples" 15 | 16 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 17 | } 18 | 19 | signingConfigs { 20 | sign { 21 | storeFile file('../olami-apk-test-key') 22 | storePassword 'http://olami.ai' 23 | keyAlias 'olami-apk-test-key' 24 | keyPassword 'olami.ai' 25 | } 26 | } 27 | 28 | buildTypes { 29 | release { 30 | minifyEnabled false 31 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 32 | signingConfig signingConfigs.sign 33 | } 34 | } 35 | 36 | lintOptions { 37 | abortOnError false 38 | } 39 | 40 | applicationVariants.all { variant -> 41 | variant.outputs.each { output -> 42 | def outputFile = output.outputFile 43 | if (outputFile != null && outputFile.name.endsWith('.apk')) { 44 | def fileName = "${archivesBaseName}.apk" 45 | output.outputFile = new File(outputFile.parent, fileName) 46 | } 47 | } 48 | } 49 | } 50 | 51 | dependencies { 52 | compile fileTree(dir: 'libs', include: ['*.jar']) 53 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 54 | exclude group: 'com.android.support', module: 'support-annotations' 55 | }) 56 | 57 | compile 'com.android.support:appcompat-v7:25.3.1' 58 | compile 'com.android.support.constraint:constraint-layout:1.0.2' 59 | 60 | compile project(':lib') 61 | 62 | testCompile 'junit:junit:4.12' 63 | } 64 | 65 | // Copy output files to '/bin' after build -------------- 66 | task copyOutputFiles(type: Copy) { 67 | from 'build/outputs/apk' 68 | into "../bin" 69 | include '*.apk' 70 | } 71 | 72 | build.finalizedBy(copyOutputFiles) 73 | // ------------------------------------------------------ -------------------------------------------------------------------------------- /examples/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in C:\Android\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /examples/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 28 | 29 | 32 | 33 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /examples/src/main/java/ai/olami/android/example/Config.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017, VIA Technologies, Inc. & OLAMI Team. 3 | 4 | http://olami.ai 5 | 6 | Licensed under the Apache License, Version 2.0 (the "License"); 7 | you may not use this file except in compliance with the License. 8 | You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, software 13 | distributed under the License is distributed on an "AS IS" BASIS, 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | See the License for the specific language governing permissions and 16 | limitations under the License. 17 | */ 18 | 19 | package ai.olami.android.example; 20 | 21 | import ai.olami.cloudService.APIConfiguration; 22 | 23 | public class Config { 24 | 25 | // * Replace your APP KEY with this variable. 26 | private static String mAppKey = "*****your-app-key*****"; 27 | public static void setAppKey(String appKey) { 28 | mAppKey = appKey; 29 | } 30 | public static String getAppKey() { 31 | return mAppKey; 32 | } 33 | 34 | // * Replace your APP SECRET with this variable. 35 | private static String mAppSecret = "*****your-app-secret*****"; 36 | public static void setAppSecret(String appSecret) { 37 | mAppSecret = appSecret; 38 | } 39 | public static String getAppSecret() { 40 | return mAppSecret; 41 | } 42 | 43 | // * Replace the localize option you want with this variable. 44 | // * - Use LOCALIZE_OPTION_SIMPLIFIED_CHINESE for China 45 | // * - Use LOCALIZE_OPTION_TRADITIONAL_CHINESE for Taiwan 46 | private static int mLocalizeOption = APIConfiguration.LOCALIZE_OPTION_SIMPLIFIED_CHINESE; 47 | // private static int mLocalizeOption = APIConfiguration.LOCALIZE_OPTION_TRADITIONAL_CHINESE; 48 | public static void setLocalizeOption(int localizeOption) { 49 | mLocalizeOption = localizeOption; 50 | } 51 | public static int getLocalizeOption() { 52 | return mLocalizeOption; 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /examples/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /examples/src/main/res/layout/activity_speech_input.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 24 | 25 |