Skip to content

Offline Automatic Speech Recognition for Android 2.2+ using Sphinx (specifically PocketSphinx)

Notifications You must be signed in to change notification settings

cesine/AndroidPocketSphinx

 
 

Repository files navigation

About

This currently a demo of the Sphinx (specifically PocketSphinx) Automatic Speech Recognition system which runs on any Android Device 2.2 or higher. The Sphinx service is actually running on the Android, so internet connection or server connnection is needed.

TODOs 


 TODO currently this demo can only demo the PocketSphinx speech recognizer, it doesn't make it available for other  developers to call, or for the user to use generally.
 
 TODO implement service.SpeechRecognizerViaFilePocketSphinx so that developers can pass a file to the speech recognizer and get back an array of array of hypotheses for utterances in the audio
 
 TODO implement service.SpeechRecognizerViaRecorderSphinx so that users can do speech recognition offline, without a network connection (the default speech recognizer provided by com.google.android.voicesearch has to be online and only accepts short utterances. it cannot be used eyes-free). 
 
 
  
History of this Demo:
  	Created by David Huggins-Daines <dhuggins@cs.cmu.edu> sourceforge:dhdfu and other contributors at the cmusphinx project
  	Turned into a very user friendly Demo app and apk with very little dependencies by Aasish Pappu sourceforge: aasishp , github aasish
	Infrastructure laid out for eyes-free offline speech recognition by github: cesine
 	Eyes-free offline speech recognition implemented by: maybe someone who knows pocketsphinx... ;)

The original source of the Android PocketSphinx Demo was started by the folks at cmusphinx updates and improvements of the Demo should ultimately appear there. 

How to contribute

* Contributors needed:

** Service to annotate utterances in audio using the srt format or the WebVTT format to be compatible with future ASR recognition services provided eg Google Listen or in the YouTube Captioning API http://www.youtube.com/watch?v=tua3DdacgOo&feature=player_embedded

*** Potential directions: 
 1. Java Sound API
 2. LIUM tools (already used with Sphinx) 
    http://liumtools.univ-lemans.fr//index.php?option=com_content&task=blogcategory&id=32&Itemid=60
 3. Praat Phonetic toolkit Port to Android (allows for complex phonetic analysis (more than just silence detection) of utterance final features.  

** Turning the RecognizerTask and PocketSphinxAndroidDemo code into a SpeechRecognizer to allow it to register for the RecognizerIntent so that it can be used outside the demo

How to setup this project on your machine

Do the following steps to setup your environment in Eclipse, to run the Demo.

1. Install latest Android SDK.
http://developer.android.com/sdk/installing.html

2. Install ADT plugin from Eclipse (follow the steps from the link above you).

3. Check out the source code from the repo.

4. Create new android project from the eclipse and point it to the location of the checked out source.

5. Connect your device and make sure you have enabled USB-debugging on your device (Settings->Manage Applications->Development->USB Debugging)

6. Then install necessary drivers for the target device on your PC / Mac  with the help of instructions in the following link.
http://developer.android.com/sdk/win-usb.html

7. Clone the project from GitHub 
 $cd Downloads
 $git clone git@github.com:cesine/AndroidPocketSphinx.git

8. Import the project into Eclipse
 	 File > Import > Existing Projects into Workspace

9. Build the project
	 Project > Build Project

10. Run on the Android
	 Run > Run

The app will prompt you to download some things.

If you need help you can click on your device's Menu button, there is a Help menu with some instructions on how to test the Speech Recognition.

Currently it works great, not always accurate but at least fully functional. 

About

Offline Automatic Speech Recognition for Android 2.2+ using Sphinx (specifically PocketSphinx)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%