Git Product home page Git Product logo

speechsuper-sdk-android-kotlin-demo's Introduction

SpeechSuper Android Kotlin Demo

This demo provides an example of how to integrate the SpeechSuper Android Kotlin SDK into your Android app for pronunciation assessment. Follow these steps to get started:

Step 1: Configure Your Keys

  1. Open the file app/src/main/java/com/example/demo_for_android_kotlin/MainActivity.kt.
  2. Insert your appKey and secretKey into the following lines:
   private val appKey = "Insert your appKey here"
   private val secretKey = "Insert your secretKey here"

Step 2: Customize Your Inputs

  1. Open the file app/src/main/java/com/example/demo_for_android_kotlin/TestActivity.kt.
  2. Modify the input parameters according to your needs in the following code block:
      val requestObj = JSONObject()
      requestObj.put("coreType", coreType)
      requestObj.put("refText", refText)
    
       SkegnManager.getInstance(this).startSkegn(requestObj, object: SkegnManager.CallbackResult{
            override fun run(response: String){
                setResult(response)
           }
       });

Step 3: Run the Application

  1. Run the application on your device or emulator.
  2. Click on the item on the screen to navigate to the evaluation screen.

Step 4: Start and Stop Evaluation

  1. On the evaluation screen, click the "START EVAL" button to begin recording and evaluation.
  2. Click the "STOP EVAL" button to stop recording and await the results.

Additional Tips:

1. build.gradle Configuration

Ensure that your build.gradle file includes NDK and sourceSets configurations as follows:

android {
    ...
    defaultConfig {
        ...

        ndk {
            abiFilters "armeabi", "armeabi-v7a", "arm64-v8a", "x86"
        }
    }
    ...
    sourceSets {
        main {
            jniLibs.srcDirs = ['libs']
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs')
   ...
}

2. proguard-rules.pro Configuration

...
-keep class com.speechsuper.** { *; }
-keepclasseswithmembernames class * {
    native <methods>;
}

speechsuper-sdk-android-kotlin-demo's People

Contributors

chelseadong avatar speechsuper avatar

Watchers

 avatar  avatar

Forkers

sksabbir420

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.