GithubHelp home page GithubHelp logo

isabella232 / pocketsphinx-android Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cmusphinx/pocketsphinx-android

0.0 0.0 0.0 163 KB

pocketsphinx build for Android

License: BSD 2-Clause "Simplified" License

Java 93.20% CMake 6.80%

pocketsphinx-android's Introduction

About

This project is a wrapper for Pocketsphinx for Android providing high-level interface for recognizing the microphone input.

Build

You will need SWIG, Gradle and Android NDK to build a distributable archive of pocketsphinx for Android. It is better to use recent versions.

You need to checkout sphinxbase, pocketsphinx and pocketsphinx-android and put them in the same folder.

Root folder
 \_pocketsphinx
 \_sphinxbase
 \_pocketsphinx-android

Older versions might be incompatible with the latest pocketsphinx-android, so you need to make sure you are using latest versions. You can use the following command to checkout from repository:

git clone https://github.com/cmusphinx/sphinxbase
git clone https://github.com/cmusphinx/pocketsphinx
git clone https://github.com/cmusphinx/pocketsphinx-android

After checkout you need to update the file 'local.properties' in the project root and define the following properties:

  • sdk.dir - path to Android SDK
  • ndk.dir - path to Android NDK
  • pocketsphinx.dir - path to pocketsphinx folder
  • sphinxbase.dir - path to sphinxbase folder

For example:

sdk.dir=/Users/User/Library/Android/sdk
ndk.dir=/Users/User/Library/Android/sdk/ndk-bundle
pocketsphinx.dir=/Users/user/pocketsphinx
sphinxbase.dir=/Users/user/sphinxbase

After everything is set, run ./gradlew build. It will create pocketsphinx-android-5prealpha-release.aar and pocketsphinx-android-5prealpha-debug.aar in build/output.

Using the library

Add bintray maven to your repositories

allprojects {
    repositories {
        maven {
            url  "https://dl.bintray.com"
        }
        jcenter()
        google()
    }
}

Add pocketsphinx-android to your dependencies

dependencies {
    implementation 'edu.cmu.pocketsphinx.android:pocketsphinx-android:5prealpha@aar'
}

Using the library locally

Library is distributed as android archive AAR. You can add it to your project as usual with Android Studio or directly in gradle

dependencies {
    compile (name:'pocketsphinx-android-debug', ext:'aar')
}

repositories {
    flatDir {
        dirs 'libs'
    }
}

For further information on usage please see the wiki page:

http://cmusphinx.sourceforge.net/wiki/tutorialandroid

pocketsphinx-android's People

Contributors

mbait avatar nshmyrev avatar cesine avatar diolor avatar kevinflynn avatar

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.