Giter VIP home page Giter VIP logo

pocketsphinx-android-demo's Introduction

pocketsphinx-android-demo's People

Contributors

cesine avatar mbait avatar nshmyrev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pocketsphinx-android-demo's Issues

Assets in doInBackground throw NullPointerException

Hey, I can't explain what's happening.. Does somebody know?

12-03 20:55:39.334 10097 10111 E AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
12-03 20:55:39.334 10097 10111 E AndroidRuntime: Process: com.fa.ve, PID: 10097
12-03 20:55:39.334 10097 10111 E AndroidRuntime: java.lang.RuntimeException: An error occurred while executing doInBackground()
12-03 20:55:39.334 10097 10111 E AndroidRuntime: at android.os.AsyncTask$3.done(AsyncTask.java:309)
12-03 20:55:39.334 10097 10111 E AndroidRuntime: at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
12-03 20:55:39.334 10097 10111 E AndroidRuntime: at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
12-03 20:55:39.334 10097 10111 E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:242)
12-03 20:55:39.334 10097 10111 E AndroidRuntime: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
12-03 20:55:39.334 10097 10111 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
12-03 20:55:39.334 10097 10111 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
12-03 20:55:39.334 10097 10111 E AndroidRuntime: at java.lang.Thread.run(Thread.java:818)
12-03 20:55:39.334 10097 10111 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
12-03 20:55:39.334 10097 10111 E AndroidRuntime: at edu.cmu.pocketsphinx.Assets.syncAssets(Assets.java:256)
12-03 20:55:39.334 10097 10111 E AndroidRuntime: at com.fa.ve.MainActivity$5.doInBackground(MainActivity.java:303)
12-03 20:55:39.334 10097 10111 E AndroidRuntime: at com.fa.ve.MainActivity$5.doInBackground(MainActivity.java:298)
12-03 20:55:39.334 10097 10111 E AndroidRuntime: at android.os.AsyncTask$2.call(AsyncTask.java:295)
12-03 20:55:39.334 10097 10111 E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:237)
12-03 20:55:39.334 10097 10111 E AndroidRuntime: ... 4 more
12-03 20:55:39.344 20496 21573 W ActivityManager: Force finishing activity com.fa.ve/.MainActivity
1

Support for simple ARPA LM files?

I was trying to create my own simple language model using the Web-based lmtool service. I upload a file containing two sentences (<20 unique words)

After the model is generated, I downloaded the .tgz file, copied the 1234.lm file into app/src/main/assets/sync and also added an entry in assets.lst. I register it using:

    File languageModel = new File(assetsDir, "1234.lm");
    recognizer.addNgramSearch(CUSTOM_SEARCH, languageModel);

From the logs, I can see that my language model file is recognized on startup.

However, I never get any result in onPartialResult nor in onResult.

Should I be able to use the .lm files generated by the web service?

PocketSphinx Android doesn't run when exported

I'm using PocketSphinx Android in my app. It runs as expected when i'm debugging using eclipse. However, when i export to apk it using eclipse, the voice recognizer doesn't run. I'm not getting any error though.

Unable to build in Android Studio

Hello, I'm not able to build the app in Android studio. I've tried many versions of JDK, including ver 8, 11, 17 and different version of Gradle, including the latest, which was the only one successful, but then the App failed to start in the emulator.. Could you please help?

JDK 8, Gradle 4.1, Androind Gradle plugin 3.0.1 gives "cvc-complex-type.2.4.a: Invalid content was found starting with element 'base-extension'. One of '{layoutlib}' is expected."
JDK 11, Gradle 5.0, Androind Gradle plugin 3.2.1 gives the same.
JDK 17, Gradle 7.3, Androind Gradle plugin 4.2.2 gives "Unable to make field private final java.lang.String java.io.File.path accessible: module java.base does not "opens java.io" to unnamed module @1409eec6".

JDK 17, Gradle 8.2, Androind Gradle plugin 8.2.2 compiles successfully, but does not start in emulator saying: "PockectSpinxDemo keeps stopping".

image

I've spent the whole day unable to figure out what I'm doing wrong. Am I forced to use the latest Gradle plugin by Google?

Noise cancellation

The FAQ said "In sphinxbase/pocketsphinx/sphinxtrain it's 'remove_noise' option." How can Activate it?, Can I activate it from Android code or I should recompile pocketsphinx full library?

Missing mdef file after using adapted acoustic model

Thanks for taking you're time to read this.

I have a custom acoustic model/set of files I want to use instead of the demo files,
the demo application itself works "as is" if not tampered with.
I have more or less followed this guide to generate the acoustic model: https://cmusphinx.github.io/wiki/tutorialadapt/?s%5b%5d=acoustic
(Not with ease, although in the end successful)

I have added the the following files to the assets.lst and to the folder as well to use the sync script.

  • cmu07a.dic
  • en_us/README
  • en_us/feat.params
  • en_us/mdef
  • en_us/means
  • en_us/mixture_weights
  • en_us/noisedict
  • en_us/sendump
  • en_us/transition_matrices
  • en_us/variances
  • hub4.5000.DMP

I have created md5 files for each of them, and upon first run-time I could see all the files were moved over as expected.
A browse on the actual device confirms the existence of them as well.

I'm receiving the following error:

cmusphinx: ERROR: "acmod.c", line 79: Folder '/storage/emulated/0/Android/data/edu.cmu.sphinx.pocketsphinx/files/sync/en-us' does not contain acoustic model definition 'mdef'

So a missing mdef file if I'm not mistaken.

I'm not an expert in neither pocketsphinx or Android, but I do code, and this error makes me scratch my head.
Have I failed to see something obvious?

I'm working on a proof of concept learning tool for children, I would be sad to throw the towel in the ring before at least asking for help. So here goes... help :)

I need just hotword detection

Dear Sir,

I need just hotword detection and want to use SPHINX . I want to ensure that the app size increase due to addition of pocket sphinx should not be more than 5 MB. Is this possible.

I have reduced the 3 MB dict to 2 KB. The Major chunk is being used by the en-us-ptm folder . How can i reduce the size of the en-us-ptm folder. As i may not require such a huge acoustic model.

Please guide me

No function for controlling sound sensitivity

Hello !

Demo works great and this library is really helpful. I found no function for setting sensitivity of mic to hear a sound in *SpeechRecognizer.java *. Is it possible that you add a function for sound sensitivity to give better user experience.
Thanks!

Change threshold in android

Is there any way to change threshold exponent of keyphrase programmatically in android?
I have keyphrase.list with 5 words and corresponding 5 different thresholds. Is there any way a user can change the thresholds of each word programmatically?
Is it necessary to keep the keyphrase.list file in assets folder?

Library crashes on neutab g7 (Android 5.1)

Library is crashing when initializing the SpeechRecognizer with the following call:

recognizer = defaultSetup()
          .setAcousticModel(new File(assetsDir, "en-us-ptm"))
          .setDictionary(new File(assetsDir, "cmudict-en-us.dict"))
          // Use context-independent phonetic search, context-dependent is too slow for mobile
          .setBoolean("-allphone_ci", true)
          .getRecognizer();

No issues on any other device than the one above. Below is the stack trace:

Non-fatal Exception: java.lang.IllegalArgumentException
       at android.media.AudioRecord.<init>(AudioRecord.java:277)
       at android.media.AudioRecord.<init>(AudioRecord.java:233)
       at edu.cmu.pocketsphinx.SpeechRecognizer.<init>(SpeechRecognizer.java:82)
       at edu.cmu.pocketsphinx.SpeechRecognizerSetup.getRecognizer(SpeechRecognizerSetup.java:74)
       at com.willblaschko.android.alexalistens.MainActivity$SettingsFragment$6.doInBackground(MainActivity.java:261)
       at com.willblaschko.android.alexalistens.MainActivity$SettingsFragment$6.doInBackground(MainActivity.java:245)
       at android.os.AsyncTask$2.call(AsyncTask.java:292)
       at java.util.concurrent.FutureTask.run(FutureTask.java:237)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
       at java.lang.Thread.run(Thread.java:818)

Exception egtting on Redmi 3s (Android 6.01)

Hi,
I am trying this demo on my Redmi 3S which has Android 6.0.1
But getting below error.

java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:309)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.RuntimeException: Decoder_setKeyphrase returned -1
at edu.cmu.pocketsphinx.PocketSphinxJNI.Decoder_setKeyphrase(Native Method)
at edu.cmu.pocketsphinx.Decoder.setKeyphrase(Decoder.java:155)
at edu.cmu.pocketsphinx.SpeechRecognizer.addKeyphraseSearch(SpeechRecognizer.java:259)
at edu.cmu.pocketsphinx.demo.PocketSphinxActivity.setupRecognizer(PocketSphinxActivity.java:232)
at edu.cmu.pocketsphinx.demo.PocketSphinxActivity.access$000(PocketSphinxActivity.java:55)
at edu.cmu.pocketsphinx.demo.PocketSphinxActivity$1.doInBackground(PocketSphinxActivity.java:107)
at edu.cmu.pocketsphinx.demo.PocketSphinxActivity$1.doInBackground(PocketSphinxActivity.java:101)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
... 4 more

Any suggestions will be highly appreciated.

Thanks,
Vishwas

Not Compiling on Android Studio 1.5

Am having a very tough time using these package. The requirements are add Ndk path. I've done that. add Ask version. I've done that. make the gradle.build access the assets.xml I've done that and yet still am getting this error.

   Plugin with Id android.application not found.

What should I do. Its being 3 days now. Is the package outdated. Any Solutions.

Too many false positive

Hi,
I test on both Android mobile and watch (1.5 not 2.0 yet) and it works :) but too many false positive for hot key detection :( is there any way to improve that ? configuration or something maybe I miss

Here is what I use:

public static final String KEYPHRASE = "hey lisa";
public static final String KWS_SEARCH = "wakeup";
....
recognizer = SpeechRecognizerSetup.defaultSetup()
                .setAcousticModel(new File(assetsDir, "en-us-ptm"))
                .setDictionary(new File(assetsDir, "cmudict-en-us.dict"))
                .getRecognizer();
        recognizer.addListener(this);
        // Create keyword-activation search.
        recognizer.addKeyphraseSearch(KWS_SEARCH, KEYPHRASE);
        recognizer.startListening(KWS_SEARCH);

Thanks for your work !

Phonetic Recognition Accuracy

Hi,
the phonetic recognition does not seem to work on oneplus 3t and oneplus x.
The logcat output in https://gist.github.com/gwario/22441691717c683710c2538e222edef9 shows what's happening on the 3t when i start the demo app, navigate to the phonetic recognition and say 'this is a test' but all i get is 'SIL T P EH S Z AE TH SIL'.

oneplus 3t runs oxygenos 4.1.3/ android 7.1.1

Would be great if you could take a look at it...
If you need any further information, let me know.

regards.

asset Folder

Hi ....
i prepare a acoustic model for Urdu Speech.
Please tell me how i create asset folder ?
and which file are put in asset folder ?
one thing more what is .arr package library and where from i get this package ?

Difference between .gram and .dict?

Hi!

Great demo and amazing open source software!
Im struggling to put together the difference between a .gram and .dict files.

In the demo, we have multiple grammar files containing different subsets, all of which are included in the dict file. Why cant we simply use a dict alone?

Thanks very much

How to use Mandarin Language Model?

When I copy the Mandarin language model to this project and use my custom grammer file,there is a error in the IDE's Logcat.

error:


" FATAL: "fsg_lextree.c", line 718: #phones > 128; increase FSG_PNODE_CTXT_BVSZ and recompile"


the content of my grammer file:


#JSGF V1.0;

grammar digits;

= 1 ;

public = +;


How to solve this error? What can I do?
please help me,thanks!

Unable to build in Android Studio

I tried following these instructions, but they no longer worker work in the current version of Android Studio 4.1.1 on Ubuntu.

After selecting the option to start a new project from source control, using https://github.com/cmusphinx/pocketsphinx-android-demo as the URL, it seemed to create the project successfully. However, the "Build" panel shows the error:

Failed to find target with hash string 'android-26' in: /home/chris/Android/Sdk

Presumably, this means it's missing the required Android version. However, your instructions said:

"Once the project is set up, your IDE will update and download all dependencies automatically."

Searching for this error message shows this type of error is somewhat common. However, none of the suggested solutions work for me. I've just installed Android Studio, so I have no cache to clear. And the solution to install the dependency via the SDK Manager doesn't work because there's no reference to an SDK Manager anywhere in Android Studio.

Do you still support Android Studio, or has this been deprecated? How else can I build the demo on Linux?

crash on initialise

On my Fairphone 1 / Fairphone OS 1.3 / Android 4.2.2
Preparing the recogniser...
To start demo say...
Crash, application has stopped.

How to dynamically add wake-up words?

How to dynamically add wake-up words?Can you do this by modifying the wake-up words in the resource file?Are there libraries that generate wake-up word formats offline?

Library crashes on Samsung gt i9195 - Galaxy Mini (Android 6.0.1)

Crash below, it looks like it's failing to properly grab the external files dir.

Non-fatal Exception: java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
       at android.app.ContextImpl.getExternalFilesDir(ContextImpl.java:468)
       at android.content.ContextWrapper.getExternalFilesDir(ContextWrapper.java:219)
       at edu.cmu.pocketsphinx.Assets.<init>(Assets.java:95)
       at com.willblaschko.android.alexalistens.MainActivity$SettingsFragment$6.doInBackground(MainActivity.java:253)
       at com.willblaschko.android.alexalistens.MainActivity$SettingsFragment$6.doInBackground(MainActivity.java:245)
       at android.os.AsyncTask$2.call(AsyncTask.java:295)
       at java.util.concurrent.FutureTask.run(FutureTask.java:237)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
       at java.lang.Thread.run(Thread.java:818)

Not getting any results?

I am not getting the result of the speech jut getting these in logs I have kept logs in onBeginningOfSpeech() -- start
onEndOfSpeech() -- onEndOfSpeech
onPartialResult() -- hypothesis.getHypstr()
onResult() -- hypothesis.toString()

2019-11-13 13:49:26.328 9368-9368/com.example.speechnewtesting I/speech: Start
2019-11-13 13:49:28.345 9368-9368/com.example.speechnewtesting I/speech: onEndOfSpeech
2019-11-13 13:49:29.175 9368-9428/com.example.speechnewtesting I/cmusphinx: INFO: cmn_live.c(88): Update from <
2019-11-13 13:49:29.175 9368-9428/com.example.speechnewtesting I/cmusphinx: 24.89
2019-11-13 13:49:29.175 9368-9428/com.example.speechnewtesting I/cmusphinx: 2.29
2019-11-13 13:49:29.175 9368-9428/com.example.speechnewtesting I/cmusphinx: 2.00
2019-11-13 13:49:29.175 9368-9428/com.example.speechnewtesting I/cmusphinx: -0.65
2019-11-13 13:49:29.175 9368-9428/com.example.speechnewtesting I/cmusphinx: 1.18
2019-11-13 13:49:29.175 9368-9428/com.example.speechnewtesting I/cmusphinx: -6.65
2019-11-13 13:49:29.175 9368-9428/com.example.speechnewtesting I/cmusphinx: -0.44
2019-11-13 13:49:29.175 9368-9428/com.example.speechnewtesting I/cmusphinx: -2.71
2019-11-13 13:49:29.175 9368-9428/com.example.speechnewtesting I/cmusphinx: 0.67
2019-11-13 13:49:29.175 9368-9428/com.example.speechnewtesting I/cmusphinx: -1.32
2019-11-13 13:49:29.175 9368-9428/com.example.speechnewtesting I/cmusphinx: 1.08
2019-11-13 13:49:29.175 9368-9428/com.example.speechnewtesting I/cmusphinx: 3.38
2019-11-13 13:49:29.175 9368-9428/com.example.speechnewtesting I/cmusphinx: -0.04
2019-11-13 13:49:29.175 9368-9428/com.example.speechnewtesting I/cmusphinx: >
2019-11-13 13:49:29.175 9368-9428/com.example.speechnewtesting I/cmusphinx: INFO: cmn_live.c(105): Update to <
2019-11-13 13:49:29.175 9368-9428/com.example.speechnewtesting I/cmusphinx: 24.16
2019-11-13 13:49:29.175 9368-9428/com.example.speechnewtesting I/cmusphinx: 2.98
2019-11-13 13:49:29.175 9368-9428/com.example.speechnewtesting I/cmusphinx: 3.07
2019-11-13 13:49:29.175 9368-9428/com.example.speechnewtesting I/cmusphinx: -0.26
2019-11-13 13:49:29.175 9368-9428/com.example.speechnewtesting I/cmusphinx: 2.30
2019-11-13 13:49:29.175 9368-9428/com.example.speechnewtesting I/cmusphinx: -6.96
2019-11-13 13:49:29.175 9368-9428/com.example.speechnewtesting I/cmusphinx: -0.57
2019-11-13 13:49:29.175 9368-9428/com.example.speechnewtesting I/cmusphinx: -3.93
2019-11-13 13:49:29.175 9368-9428/com.example.speechnewtesting I/cmusphinx: -0.30
2019-11-13 13:49:29.175 9368-9428/com.example.speechnewtesting I/cmusphinx: -2.00
2019-11-13 13:49:29.176 9368-9428/com.example.speechnewtesting I/cmusphinx: 1.22
2019-11-13 13:49:29.176 9368-9428/com.example.speechnewtesting I/cmusphinx: 3.54
2019-11-13 13:49:29.176 9368-9428/com.example.speechnewtesting I/cmusphinx: 0.42
2019-11-13 13:49:29.176 9368-9428/com.example.speechnewtesting I/cmusphinx: >
2019-11-13 13:49:29.211 9368-9368/com.example.speechnewtesting I/speech: Start
2019-11-13 13:49:29.928 9368-9368/com.example.speechnewtesting I/speech: onEndOfSpeech

App crashing with exception :

exception :
' Caused by: java.lang.UnsatisfiedLinkError: com.android.tools.fd.runtime.IncrementalClassLoader$DelegateClassLoader'

java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:309)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.UnsatisfiedLinkError: com.android.tools.fd.runtime.IncrementalClassLoader$DelegateClassLoader[DexPathList[[dex file "/data/data/com.example.neeraj.speechbuzzer/files/instant-run/dex/slice-support-annotations-25.1.0_b02ac6e364c71fa0306bce48db25c7d4709a4bfe-classes.dex", dex file "/data/data/com.example.neeraj.speechbuzzer/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/com.example.neeraj.speechbuzzer/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/com.example.neeraj.speechbuzzer/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/com.example.neeraj.speechbuzzer/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/com.example.neeraj.speechbuzzer/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/com.example.neeraj.speechbuzzer/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/com.example.neeraj.speechbuzzer/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/com.example.neeraj.speechbuzzer/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/com.example.neeraj.speechbuzzer/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/com.example.neeraj.speechbuzzer/files/instant-run/dex/slice-slice_0-classes.dex", dex file "/data/data/com.example.neeraj.speechbuzzer/files/instant-run/dex/slice-pocketsphinx-android-5prealpha-nolib_0aa14585f0ac20d7c7b1b354e2474468dac5b9b9-classes.dex", dex file "/data/data/com.example.neeraj.speechbuzzer/files/instant-run/dex/slice-com.android.support-transition-25.1.0_bbbace6f3cf8fd2d5151fc5e1fe394d18ac2f4c2-classes.dex", dex file "/data/data/com.example.neeraj.speechbuzzer/files/instant-run/dex/slice-com.android.support-support-vector-drawable-25.1.0_fd21bbc33fcc0bb85e6b7374f5712378d5644230-classes.dex", dex file "/data/data/com.example.neeraj.speechbuzzer/files/instant-run/dex/slice-com.android.support-support-v4-25.1.0_80240033933550bbf421fa3e2ddabc8ca896d435-classes.dex", dex file "/data/data/com.example.neeraj.speechbuzzer/files/instant-run/dex/slice-com.android.support-support-media-compat-25.1.0_7bfb2a960a0efc0a37e45a0ca8fe83deebcef70d-classes.dex", dex file "/data/data/com.example.neeraj.speechbuzzer/files/instant-run/dex/slice-com.android.support-support-fragment-25.1.0_28ae5f6969d9fda82842bd2592883422d7289774-classes.dex", dex file "/data/data/com.example.neeraj.speechbuzzer/files/instant-run/dex/slice-com.android.support-support-core-utils-25.1.0_fd66325c44621f09143f90ab62cf5fa2e6158021-classes.dex", dex file "/data/data/com.example.neeraj.speechbuzzer/files/instant-run/dex/slice-com.android.support-support-core-ui-25.1.0_73300684736cbe337978fbf5a0c7eacdccab0a57-classes.dex", dex file "/data/data/com.example.neeraj.speechbuzzer/files/instant-run/dex/slice-com.android.support-support-compat-25.1.0_719df2e4f2546ac24e475703a1fe590a2eed218a-classes.dex", dex file "/data/data/com.example.neeraj.speechbuzzer/files/instant-run/dex/slice-com.android.support-recyclerview-v7-25.1.0_ec31a3d2c166f0ca725bb5e17f3baa44c56f83fa-classes.dex", dex file "/data/data/com.example.neeraj.speechbuzzer/files/instant-run/dex/slice-com.android.support-design-25.1.0_67e228634ae2ddcc7216e4244d06f61ecbe59171-classes.dex", dex file "/data/data/com.example.neeraj.speechbuzzer/files/instant-run/dex/slice-co

Encourage developers and users to run and test the standalone app on wearables

Since the release of the stable version of Android Wear 2.0 last week and my small additions to the project, this Pocketsphinx demo is available as a standalone app for wearables.

To support Pocketshinx and to extend the list of device classes it is running on, this news should be made visible and interested parties should be encouraged to use and test the demo on wearables.

What do you think, @mbait and @nshmyrev ?

Change language to Spanish

I am using pocketsphinx-android for keywords commands, but I want to use spanish words for the keywords and keyphrase.
How can I change the language?

Pausing the recognizer to do TTS

This demo is amazing, I been hacking together a proof of concept for the last 2 hours.

My issue is, I do "Oh might computer", the devices speaks this (TTS), and then automatically detects something for the next option (forecast etc)

I have a setOnUtteranceProgressListener and I tried setting a flag (disableDection). I tried stopping the recognizer because TTS, then when that's finished, starting it up again (seems to crash, or give up listening)

Any help would be great

Phonetic search demo issue

I am trying the phonetic search demo but it does not seem to recognize words. The keyphrase, digits and weather demos seem to work reasonably. To start the phonetic search demo, I say "phones" in the menu and then I say something simple like "hello world" but it outputs text such as "SIL T EH Y OW". Is there something I am doing wrong or is the model not setup properly or is this feature still in the works?

Can i turn off use of arm64. My application support armv7 only

When enable pocketsphinx-android-5prealpha-release in my project i got error starting my application

Fatal Exception: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.wonhada.test-1/base.apk"],nativeLibraryDirectories=[/data/app/com.wonhada.test-1/lib/arm64, /data/app/com.wonhada.test-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]] couldn't find "liblua.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:984)
at java.lang.System.loadLibrary(System.java:1530)
at com.ansca.corona.JavaToNativeShim.(JavaToNativeShim.java:115)
at com.ansca.corona.JavaToNativeShim.useJavaLuaErrorHandler(JavaToNativeShim.java:261)
at com.ansca.corona.CoronaEnvironment.setLuaErrorHandler(CoronaEnvironment.java:391)
at com.ansca.corona.CoronaEnvironment.(CoronaEnvironment.java:50)
at com.ansca.corona.CoronaEnvironment.addRuntimeListener(CoronaEnvironment.java:434)
at com.wonhada.test.CoronaApplication.onCreate(CoronaApplication.java:22)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1025)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5555)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1576)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:241)
at android.app.ActivityThread.main(ActivityThread.java:6281)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

I am using Corona SDK and they said
Looks like something is still trying to use arm64. While we are working on support for that, we only support armv7.
Rob

I use pocketsphinx-android-5prealpha-release.aar

Is it possible to recompile it to not use arm64?

Not precise dets noise as voice

I recently tried to make home automation, pocket-sphinx was used to trigger the google speech-text api.
I actually used word Jarvis to trigger the action, however it gets triggered even on noise. Is there any way to remove it.

Pocketsphinx blocks the mic during phonecall

As long as the pocketsphinx app is running(even in the background), I am not able to listen to the voice during any phonecall. The pocketsphinx blocks the mic for some reason. Please look into this.

Failed to init recognizer

Hi,
I compiled the sample project on android studio and tested it on Samsung Galaxy S4, I got this error :
failed to init recognizer,Java.io.FileNotFoundException:sync/assets.lst

Compile fails on recent default install of Android Studio

When importing a project from version control as described in https://cmusphinx.github.io/wiki/tutorialandroid/#building-and-running-from-android-studio I am prompted to select a gradle folder. This not described in the instructions so I select the gradle version installed with Android Studio (version 4.1)

After downloading some packages the build fails with error
error:Unable to find method 'org.gradle.api.artifacts.ProjectDependency.getProjectConfiguration()Lorg/gradle/api/artifacts/Configuration

I believe this is due to incompatibility between the android sdk/tools specified in app/build.gradle and the version of gradle. Using Gradle 3.5 allows the install to proceed succesfully

assets.xml not find

anybody can help when i am compiling pocketsphinx-android-demo i am facing assets.xml not find
my eyes are waiting for your reply ...........
android demo

Library crashes on Nexus Player

Logcat attached - start around line 3000 (and 5840), package is: com.willblaschko.android.alexalistens.

I don't seem to have a problem on many other devices, just the ones Google is testing with.

logcat.txt

I'll add more information if I get it.

How to recognize multiple keyphrases

The phrase text or Keyword is being triggered itself and onResult() being called with the previously spoken words itself. It is still happening in the sample as well. I am using this in Service.

Why Call runRecognizerSetup Twice?

I noticed in PocketSphinxActivity.java, the function runRecognizerSetup() is called on both onCreate() and onRequestPermissionsResult(). If I understand the code correctly, the onRequestPermissionsResult() will be called when the permission request result gets returned by the system. To me, it seems the recognizer is initialized twice.

Failed to initialize recorder. Microphone might be already in use...

I downloaded the demo, opened it with Android Studuo but when I tried to run it, I got the following error:

Error creating AudioRecord instance: initialization check failed.
Error code -20 when initializing native AudioRecord object.

and the phone says:
Failed to init recognizer java.io.IOException: Failed to initialize recorder. Microphone might be already in use.

On a hTC One S( Android 4.1.1 )

Build for Android 2.3 and below.

I just successfully tediously managed to compile a version and what did I get. Seriously speaking I got parsing error. Am using Android 2.3. Please is the app limited to only Android Api 22.

Keyword followed by dynamic word Search

The issue is similar to as mentioned in #13.

My issue is below:

Command: CALL ABCD
I have a command "CALL ABCD", where CALL is a pre-defined Keyword followed by a name of a contact i.e., "ABCD". In the addKeyword Search, I can only give "CALL" and the Hypothesis does not provide results spoken after the keyword "CALL".

I would like to understand in recognizing a two word command where the first word is defined and second word can be any. Currently, One possible solution I am looking at is JSGF file input where CALL followed by listing of as many names as possible. But, I am sure, that is not a right solution.

PS: I have seen the Sphinx4 tutorial and believe the LiveStreaming would be the right one. https://cmusphinx.github.io/wiki/tutorialsphinx4/ . I assume this would be a bigger one for android .

Edit 1:
The following verified format of jsgf file is not considered by PocketSphinx. (Ref: https://www.w3.org/TR/jsgf/ ) Any suggestions please?


grammar menu;
import <com.grammar.callwhom.caller>;
import <com.grammar.selectdial.selector>;

public <command> = <item> | <caller> | <selector> ;

<item> = close | stop | reply | play | play music | reject | ignore | answer | end | info | message | open | speed dial one | speed dial two | speed dial to | speed dial three | speed dial four | speed dial five | speed dial six | speed dial seven | speed dial eight | speed dial nine;

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.