GithubHelp home page GithubHelp logo

alphacep / vosk-android-demo Goto Github PK

View Code? Open in Web Editor NEW
679.0 41.0 181.0 275 MB

Offline speech recognition for Android with Vosk library.

License: Apache License 2.0

Java 100.00%
android kaldi offline speech-recognition asr vosk

vosk-android-demo's Introduction

About

This demo implements offline speech recognition and speaker identification for mobile applications using Kaldi and Vosk libraries.

Check the releases for pre-built binaries.

Documentation

For documentation and instructions please visit the Vosk Website.

vosk-android-demo's People

Contributors

dark0ghost avatar nshmyrev avatar siddiqaa avatar tomlud123 avatar xeruf 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

vosk-android-demo's Issues

Accuracy and Performance Enhancement

Hi Nickolay,

I have been using Kaldi Android from the past few months. I used your demo as a reference and a baseline. My requirement is continuous speech recognition to convert speech to a text from any audio source. On average, I am getting accuracy at 30 to 50% when I capture audio from the microphone.

Can I increase accuracy to 90% and above?
Can you please guide me step by step to achieve that?
Can you please elaborate on what extra steps I need to execute to get high accuracy?
Does Kaldi Android offer a paid SDK with high accuracy?

Can I get your personal/official email if possible?

Memory leakage and wish the cancel() without keeping current PartialResult

Hi Nickolay,
I am now testing with a model. Sizes of AM, LM, and i-vector extractor are 19MB,11MB, and 9MB. There are 2 issues:

  1. The memory after loading and initialize the model is about 140MB, but it keeps increasing after each recording and recognizing. It could be up to 500MB. I used the Profiler for measuring. It similar to "#14", I think. But I did not find any solution.
  2. Is there any way to remove the current result when calling reconizer.cancel(). Because when people press a cancel button he/she wants to ignore or delete what that was spoken before.

ProGuard Rules

Kindly add the ProGuard rules. I want to use this sample code in my application.

memory leakage on Android?

Hi, I am testing this demo on Samsung S7 and S8. When I profile the app, I found the memory usage keeps increasing, for both microphone or file recognition. It seems to have memory leakage in the recognizer. Do you have a chance to take a look? Thanks a lot.

word lists for models for different languages

Is there a possibility to get the words.txt out of the provided models in the release section? or that you could upload it as well? (I'm interested in de words list for the alphacep-model-android-de-zamia-0.3.tar.gz)
Thanks in advance for your help!

Confusing licensing

At the top level of this project, the COPYING file says the project is licensed under Apache 2.0, but KaldiActivity.java has a copyright notice that contradicts this.

KaldiActivity.java states:

  • Copyright (c) 2019 Alpha Cephei Inc. All rights reserved.

I'm assuming that the project is intended to be licensed under Apache 2.0, so this is a request to fix or remove the copyright notice in KaldiActivity.java.

Question: KWS on Android and SK language

I am doing research into technical feasibility of an Android application and I came across this great open source effort (thanks for doing this!). I don't have much knowledge in this domain (but I have been doing Android development for the last 10 years - maybe I can also help). I have 4 questions:

  1. What would it take to add a new language? Can we somehow help you to add Slovak language? We can supply a larger set of recorded voice with text annotations (different people, gender, age). We also have some contacts to researchers on universities in Slovakia that may help.

  2. What we are searching for is "keyword spotting" which works offline on Android (iOS is also required), we don't need exact transcription but we need to quickly react to a set of keywords we will define. Is this a good fit for Kaldi on Android? Can we make a proof of concept and achieve good results with just this sample code? (by just searching for the keywords in the recognized text).
    The keywords are just 2-3 word groups, we just need to know if a specific keyword was said (e.g. "the wind started"), we don't need any more details or context.

  3. Can something like this be achieved on iOS? (Kaldi + KWS) How much would be the effort?

  4. Do I understand this correctly that this sample is running on "pure" Kaldi and it's Apache 2.0? I am a bit of lost on the differences compared to Kaldi (e.g. I see the fork on lookahead graph encoding)

Thank you!

Transfer model to sd card

Have a nice day
In the demo, the model is in apk. I have an idea to download on demand a zip to an sd card and put it there.
Then I want to do something like this

File sdPath = Environment.getExternalStorageDirectory();
sdPath = new File (sdPath.getAbsolutePath() + "/model-android/");

but it does not work.
How to make loadable models not stored in apk?
Thanks for the example.

闪退

我是一名语音识别好爱者,看了您的项目,想follow,编译成功了,但是运行时卡在couldn't find "libkaldi_jni.so",不知道这是怎么引起的,大神能抽空看看什么原因嘛

Could not read symbol table from file

It occurs when starting the demo app after providing the permission to record audio.

2019-11-13 23:15:17.907 13154-13154/? I/SELinux: SELinux: seapp_context_lookup: seinfo=untrusted, level=s0:c512,c768, pkgname=org.kaldi.demo 
2019-11-13 23:15:18.163 13154-13154/org.kaldi.demo I/zygote: no shared libraies, dex_files: 1
2019-11-13 23:15:18.621 13154-13179/org.kaldi.demo I/Assets: Skipping asset model-android/ivector/final.dubm: checksums are equal
2019-11-13 23:15:18.622 13154-13179/org.kaldi.demo I/Assets: Skipping asset model-android/ivector/splice.conf: checksums are equal
2019-11-13 23:15:18.623 13154-13179/org.kaldi.demo I/Assets: Skipping asset model-android/ivector/final.mat: checksums are equal
2019-11-13 23:15:18.623 13154-13180/org.kaldi.demo D/OpenGLRenderer: HWUI GL Pipeline
2019-11-13 23:15:18.624 13154-13179/org.kaldi.demo I/Assets: Skipping asset model-android/mfcc.conf: checksums are equal
2019-11-13 23:15:18.625 13154-13179/org.kaldi.demo I/Assets: Skipping asset model-android/HCLr.fst: checksums are equal
2019-11-13 23:15:18.626 13154-13179/org.kaldi.demo I/Assets: Skipping asset model-android/words.txt: checksums are equal
2019-11-13 23:15:18.627 13154-13179/org.kaldi.demo I/Assets: Skipping asset model-android/word_boundary.int: checksums are equal
2019-11-13 23:15:18.628 13154-13179/org.kaldi.demo I/Assets: Skipping asset model-android/ivector/global_cmvn.stats: checksums are equal
2019-11-13 23:15:18.629 13154-13179/org.kaldi.demo I/Assets: Skipping asset model-android/Gr.fst: checksums are equal
2019-11-13 23:15:18.630 13154-13179/org.kaldi.demo I/Assets: Skipping asset model-android/ivector/online_cmvn.conf: checksums are equal
2019-11-13 23:15:18.631 13154-13179/org.kaldi.demo I/Assets: Skipping asset model-android/ivector/final.ie: checksums are equal
2019-11-13 23:15:18.632 13154-13179/org.kaldi.demo I/Assets: Skipping asset model-android/final.mdl: checksums are equal
2019-11-13 23:15:18.633 13154-13154/org.kaldi.demo D/ViewRootImpl@4a06bb7[KaldiActivity]: setView = DecorView@fa9cf24[KaldiActivity] TM=true MM=false
2019-11-13 23:15:18.644 13154-13179/org.kaldi.demo D/!!!!: /storage/emulated/0/Android/data/org.kaldi.demo/files/sync
2019-11-13 23:15:18.649 13154-13154/org.kaldi.demo D/ViewRootImpl@4a06bb7[KaldiActivity]: dispatchAttachedToWindow
2019-11-13 23:15:18.656 13154-13179/org.kaldi.demo V/KaldiDemo: Sample rate is 16000
2019-11-13 23:15:18.702 13154-13154/org.kaldi.demo V/Surface: sf_framedrop debug : 0x4f4c, game : false, logging : 0
2019-11-13 23:15:18.705 13154-13154/org.kaldi.demo D/ViewRootImpl@4a06bb7[KaldiActivity]: Relayout returned: old=[0,0][0,0] new=[0,0][720,1280] result=0x7 surface={valid=true 3528894464} changed=true
2019-11-13 23:15:18.727 13154-13180/org.kaldi.demo I/OpenGLRenderer: Initialized EGL, version 1.4
2019-11-13 23:15:18.727 13154-13180/org.kaldi.demo D/OpenGLRenderer: Swap behavior 2
2019-11-13 23:15:18.734 13154-13180/org.kaldi.demo D/libGLESv1: STS_GLApi : DTS, ODTC are not allowed for Package : org.kaldi.demo
2019-11-13 23:15:18.735 13154-13180/org.kaldi.demo D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000,  [720x1280]-format:1
2019-11-13 23:15:18.736 13154-13180/org.kaldi.demo D/OpenGLRenderer: eglCreateWindowSurface = 0xd6d71f40
2019-11-13 23:15:18.751 13154-13179/org.kaldi.demo V/KaldiDemo: Computing derived variables for iVector extractor
2019-11-13 23:15:18.989 13154-13154/org.kaldi.demo D/ViewRootImpl@4a06bb7[KaldiActivity]: MSG_RESIZED_REPORT: frame=Rect(0, 0 - 720, 1280) ci=Rect(0, 48 - 0, 0) vi=Rect(0, 48 - 0, 0) or=1
2019-11-13 23:15:18.996 13154-13154/org.kaldi.demo D/ViewRootImpl@4a06bb7[KaldiActivity]: MSG_WINDOW_FOCUS_CHANGED 1
2019-11-13 23:15:19.004 13154-13154/org.kaldi.demo V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@146b990 nm : org.kaldi.demo ic=null
2019-11-13 23:15:19.005 13154-13154/org.kaldi.demo I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
2019-11-13 23:15:19.049 13154-13154/org.kaldi.demo V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@d071289 nm : org.kaldi.demo ic=null
2019-11-13 23:15:19.274 13154-13179/org.kaldi.demo V/KaldiDemo: Done.
2019-11-13 23:15:19.938 13154-13179/org.kaldi.demo V/KaldiDemo: Removed 1 orphan nodes.
2019-11-13 23:15:19.938 13154-13179/org.kaldi.demo V/KaldiDemo: Removing 2 orphan components.
2019-11-13 23:15:19.940 13154-13179/org.kaldi.demo V/KaldiDemo: Added 1 components, removed 2
2019-11-13 23:15:20.908 13154-13179/org.kaldi.demo V/KaldiDemo: Spent 0.497079 seconds in looped compilation.
2019-11-13 23:15:21.741 13154-13179/org.kaldi.demo V/KaldiDemo: Could not read symbol table from file /storage/emulated/0/Android/data/org.kaldi.demo/files/sync/model-android/words.txt
2019-11-13 23:15:21.744 13154-13179/org.kaldi.demo A/libc: /usr/local/google/buildbot/src/android/ndk-release-r20/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:73: abort_message: assertion "terminating with uncaught exception of type kaldi::KaldiFatalError: kaldi::KaldiFatalError" failed
2019-11-13 23:15:21.744 13154-13179/org.kaldi.demo A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 13179 (AsyncTask #1)

java.lang.UnsatisfiedLinkError

Hello,
I'm trying to execute the demo project on Android and after importing it in Android Studio when I try to run it on an emulator the application crashes with this error:

2020-01-08 15:02:44.322 12485-12485/org.kaldi.demo E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.kaldi.demo, PID: 12485
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/org.kaldi.demo-6-GsN2XIIBXKZfB0d0OXFg==/base.apk"],nativeLibraryDirectories=[/data/app/org.kaldi.demo-6-GsN2XIIBXKZfB0d0OXFg==/lib/x86, /system/lib, /system/product/lib]]] couldn't find "libkaldi_jni.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:1067)
at java.lang.Runtime.loadLibrary0(Runtime.java:1007)
at java.lang.System.loadLibrary(System.java:1667)
at org.kaldi.demo.KaldiActivity.(KaldiActivity.java:36)
at java.lang.Class.newInstance(Native Method)
at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95)
at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:41)
at android.app.Instrumentation.newActivity(Instrumentation.java:1243)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3182)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

Is there something I can do to resolve this problem?

Thank you very much

"Preparing the recognizer" never ends

Hey there,

first, thanks for the work. Unfortunately, I can not get past this error, which prevents the usage:

2019-11-29 11:02:41.878 9779-9796/org.kaldi.demo V/KaldiDemo: Could not read symbol table from file /storage/emulated/0/Android/data/org.kaldi.demo/files/sync/model-android/words.txt

自定义模型输入维度不匹配

您好,我初学kaldi,发现这个项目可以很快速使用Android应用kaldi,跑通了项目的示例。可是我用自己的训练模型,我没有找到mkgraph_lookahead.sh,使用egs/wsj/s5/utils/mkgraph_lookahead.sh转换之后得到的final.mdl和HCLG文件,在使用时提示我输入不匹配,如 此图。后来我修改了mfcc中的配置num-mel-bins=16, 又提示我如 此图, 请问我需要怎么解决呢或者您有什么推荐我使用的训练流程吗?谢谢

Record Audio while Recognition in progress

I would like to be able to record audio at the same time I'm doing recognition.
Is it possible to implement that ?

I've also done it on sphinx implementation side, but I would like to be able to do it in Kaldi.
The need is to be able to validate recognition against audio files.

Possible feature to get phones or do n-gram search / classification

Hi there,

I am super new to speech recognition (apologies for ignorance) but found this great repo and am wondering if it would be difficult to expand the API to allow for retrieval of phoneme matches or n-gram recognition instead of macthing against the entire dictionary? I am trying to create an application that listens for specific keywords / grammar structure and would be able to get much greater accuracy if the recognizer could limit possible recognitions to a more limited set of words / phrases. At the very least it might be nice to get the recognized phonemes so I could compare them to phoneme priors for the set of words I want to listen for. Would I need to create my own model for that? I was hoping they might already be available from the recognizer somehow. My apologies if this already exists and I just missed the appropriate docs.

更改模型问题

你好
我是初学者,请问如果我有自己用kaldi train好的模型,该如何更新模型,有要改那些文件,再麻烦教我一下如何修改,非常感谢!

error on emulator when creating new model

words.txt
disambig_tid.int
final.mdl
G.fst
HCLG.fst
mfcc.conf
word_boundary.int
and ivector
final.dubm
final.ie
final.mat
global_cmvn.stats
online_cmvn.conf
splice.conf
I have these files...i have train an nnet3 chain type model and when I put on model android it crashes...but all the models that have released and i have put them work fine...Maybe is it about G.fst and HCLG.fst? Or did i put some wrong files?

Demo app crashes in emulator

hello
Following the instructions I have succesfully build the kaldi-android-demo to android studio.
When i try to open the kaldi demo app,the app crashes. I restarted it but it is still the same. Can someone know what can it be to cause this? Is it a machine problem of should I have to edit my code?

different language

Hello I want to ask if kaldi-android demo supports models expect english on any other languages?

terminating with uncaught exception of type kaldi::KaldiFatalError: kaldi::KaldiFatalError

Hi,

I've integrated Kaldi in a Custom Android Service (not directly attached to an Activity), I can recognize some words but after some executions, I get the following crash dump

Emulator :

  • Target Android 10.0
  • Pixel 2 API 29
2020-04-14 13:44:22.028 31231-31231/com.reactnativebeeobsengineexample I/c.r.r.v.RecognizerListenerImpl: [main                ] onPartialResult : {
      "partial" : ""
    }
2020-04-14 13:44:22.168 1798-2537/? E/GnssHAL_GnssInterface: gnssSvStatusCb: a: input svInfo.flags is 8
2020-04-14 13:44:22.168 1798-2537/? E/GnssHAL_GnssInterface: gnssSvStatusCb: b: input svInfo.flags is 8
2020-04-14 13:44:22.413 31231-31819/com.reactnativebeeobsengineexample V/KaldiDemo: Assertion failed: (trans_id != 0 && static_cast<size_t>(trans_id) < id2state_.size())
2020-04-14 13:44:22.414 31231-31819/com.reactnativebeeobsengineexample A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 31819 (Thread-5), pid 31231 (bsengineexample)
2020-04-14 13:44:22.481 31825-31825/? I/crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
2020-04-14 13:44:22.481 1897-1897/? I//system/bin/tombstoned: received crash request for pid 31819
2020-04-14 13:44:22.481 31825-31825/? I/crash_dump64: performing dump of process 31231 (target tid = 31819)
2020-04-14 13:44:22.485 31825-31825/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2020-04-14 13:44:22.486 31825-31825/? A/DEBUG: Build fingerprint: 


'google/sdk_gphone_x86_64/generic_x86_64:10/QSR1.191030.002/5978551:userdebug/dev-keys'
2020-04-14 13:44:22.486 31825-31825/? A/DEBUG: Revision: '0'
2020-04-14 13:44:22.486 31825-31825/? A/DEBUG: ABI: 'x86_64'
2020-04-14 13:44:22.486 31825-31825/? A/DEBUG: Timestamp: 2020-04-14 11:44:22+0000
2020-04-14 13:44:22.486 31825-31825/? A/DEBUG: pid: 31231, tid: 31819, name: Thread-5  >>> com.reactnativebeeobsengineexample <<<
2020-04-14 13:44:22.486 31825-31825/? A/DEBUG: uid: 10133
2020-04-14 13:44:22.487 31825-31825/? A/DEBUG: signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
2020-04-14 13:44:22.487 31825-31825/? A/DEBUG:     rax 0000000000000000  rbx 00000000000079ff  rcx 000074e4834d53f8  rdx 0000000000000006
2020-04-14 13:44:22.487 31825-31825/? A/DEBUG:     r8  00000020417e4c40  r9  0000000000000000  r10 000074e37f9c09c0  r11 0000000000000246
2020-04-14 13:44:22.487 31825-31825/? A/DEBUG:     r12 0000000000000001  r13 000074e37f7efeb0  r14 000074e37f9c0a48  r15 0000000000007c4b
2020-04-14 13:44:22.487 31825-31825/? A/DEBUG:     rdi 00000000000079ff  rsi 0000000000007c4b
2020-04-14 13:44:22.487 31825-31825/? A/DEBUG:     rbp 000074e37f9c0ad0  rsp 000074e37f9c09b8  rip 000074e4834d53f8
2020-04-14 13:44:22.525 31825-31825/? A/DEBUG: backtrace:
2020-04-14 13:44:22.525 31825-31825/? A/DEBUG:       #00 pc 00000000000943f8  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+24) (BuildId: a08a19770d6696739c847e29c3f5f650)
2020-04-14 13:44:22.525 31825-31825/? A/DEBUG:       #01 pc 0000000000097146  /apex/com.android.runtime/lib64/bionic/libc.so (abort+182) (BuildId: a08a19770d6696739c847e29c3f5f650)
2020-04-14 13:44:22.525 31825-31825/? A/DEBUG:       #02 pc 00000000006cb35e  /data/app/com.reactnativebeeobsengineexample-B0jN8XOfWrADm2KyJvZl9Q==/lib/x86_64/libkaldi_jni.so (kaldi::KaldiAssertFailure_(char const*, char const*, int, char const*)+430) (BuildId: 11c2ec7c72d61e4eb5e7e8e509663f64d568df07)
2020-04-14 13:44:22.525 31825-31825/? A/DEBUG:       #03 pc 00000000005b727f  /data/app/com.reactnativebeeobsengineexample-B0jN8XOfWrADm2KyJvZl9Q==/lib/x86_64/libkaldi_jni.so (kaldi::TransitionModel::TransitionIdToPhone(int) const+79) (BuildId: 11c2ec7c72d61e4eb5e7e8e509663f64d568df07)
2020-04-14 13:44:22.525 31825-31825/? A/DEBUG:       #04 pc 00000000002eacaf  /data/app/com.reactnativebeeobsengineexample-B0jN8XOfWrADm2KyJvZl9Q==/lib/x86_64/libkaldi_jni.so (kaldi::OnlineSilenceWeighting::GetDeltaWeights(int, int, std::__ndk1::vector<std::__ndk1::pair<int, float>, std::__ndk1::allocator<std::__ndk1::pair<int, float>>>*)+767) (BuildId: 11c2ec7c72d61e4eb5e7e8e509663f64d568df07)
2020-04-14 13:44:22.525 31825-31825/? A/DEBUG:       #05 pc 000000000027ff2f  /data/app/com.reactnativebeeobsengineexample-B0jN8XOfWrADm2KyJvZl9Q==/lib/x86_64/libkaldi_jni.so (KaldiRecognizer::UpdateSilenceWeights()+175) (BuildId: 11c2ec7c72d61e4eb5e7e8e509663f64d568df07)
2020-04-14 13:44:22.525 31825-31825/? A/DEBUG:       #06 pc 0000000000280106  /data/app/com.reactnativebeeobsengineexample-B0jN8XOfWrADm2KyJvZl9Q==/lib/x86_64/libkaldi_jni.so (KaldiRecognizer::AcceptWaveform(char const*, int)+342) (BuildId: 11c2ec7c72d61e4eb5e7e8e509663f64d568df07)
2020-04-14 13:44:22.525 31825-31825/? A/DEBUG:       #07 pc 000000000027b2a2  /data/app/com.reactnativebeeobsengineexample-B0jN8XOfWrADm2KyJvZl9Q==/lib/x86_64/libkaldi_jni.so (Java_org_kaldi_voskJNI_KaldiRecognizer_1AcceptWaveform+50) (BuildId: 11c2ec7c72d61e4eb5e7e8e509663f64d568df07)
2020-04-14 13:44:22.525 31825-31825/? A/DEBUG:       #08 pc 0000000000174641  /apex/com.android.runtime/lib64/libart.so (art_quick_generic_jni_trampoline+209) (BuildId: 8bb3225e7c408f2ca23abac3db0417f2)
2020-04-14 13:44:22.525 31825-31825/? A/DEBUG:       #09 pc 00000000001696b6  /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_static_stub+806) (BuildId: 8bb3225e7c408f2ca23abac3db0417f2)
2020-04-14 13:44:22.525 31825-31825/? A/DEBUG:       #10 pc 0000000000179c61  /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+305) (BuildId: 8bb3225e7c408f2ca23abac3db0417f2)
2020-04-14 13:44:22.525 31825-31825/? A/DEBUG:       #11 pc 0000000000340ffc  /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+380) (BuildId: 8bb3225e7c408f2ca23abac3db0417f2)
2020-04-14 13:44:22.525 31825-31825/? A/DEBUG:       #12 pc 000000000033b20f  /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1151) (BuildId: 8bb3225e7c408f2ca23abac3db0417f2)
2020-04-14 13:44:22.525 31825-31825/? A/DEBUG:       #13 pc 000000000066c545  /apex/com.android.runtime/lib64/libart.so (MterpInvokeStatic+677) (BuildId: 8bb3225e7c408f2ca23abac3db0417f2)
2020-04-14 13:44:22.525 31825-31825/? A/DEBUG:       #14 pc 0000000000162999  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_static+25) (BuildId: 8bb3225e7c408f2ca23abac3db0417f2)
2020-04-14 13:44:22.525 31825-31825/? A/DEBUG:       #15 pc 00000000002b71e0  [anon:dalvik-classes.dex extracted in memory from /data/app/com.reactnativebeeobsengineexample-B0jN8XOfWrADm2KyJvZl9Q==/base.apk] (org.kaldi.KaldiRecognizer.AcceptWaveform+4)
2020-04-14 13:44:22.525 31825-31825/? A/DEBUG:       #16 pc 00000000006692dd  /apex/com.android.runtime/lib64/libart.so (MterpInvokeVirtual+1789) (BuildId: 8bb3225e7c408f2ca23abac3db0417f2)
2020-04-14 13:44:22.526 31825-31825/? A/DEBUG:       #17 pc 0000000000162819  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_virtual+25) (BuildId: 8bb3225e7c408f2ca23abac3db0417f2)
2020-04-14 13:44:22.526 31825-31825/? A/DEBUG:       #18 pc 00000000002b722a  [anon:dalvik-classes.dex extracted in memory from /data/app/com.reactnativebeeobsengineexample-B0jN8XOfWrADm2KyJvZl9Q==/base.apk] (org.kaldi.KaldiRecognizer.AcceptWaveform+46)
2020-04-14 13:44:22.526 31825-31825/? A/DEBUG:       #19 pc 00000000006692dd  /apex/com.android.runtime/lib64/libart.so (MterpInvokeVirtual+1789) (BuildId: 8bb3225e7c408f2ca23abac3db0417f2)
2020-04-14 13:44:22.526 31825-31825/? A/DEBUG:       #20 pc 0000000000162819  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_virtual+25) (BuildId: 8bb3225e7c408f2ca23abac3db0417f2)
2020-04-14 13:44:22.526 31825-31825/? A/DEBUG:       #21 pc 00000000002b769e  [anon:dalvik-classes.dex extracted in memory from /data/app/com.reactnativebeeobsengineexample-B0jN8XOfWrADm2KyJvZl9Q==/base.apk] (org.kaldi.SpeechRecognizer$RecognizerThread.run+210)
2020-04-14 13:44:22.526 31825-31825/? A/DEBUG:       #22 pc 000000000030dcad  /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.13960599661070883162+253) (BuildId: 8bb3225e7c408f2ca23abac3db0417f2)
2020-04-14 13:44:22.526 31825-31825/? A/DEBUG:       #23 pc 000000000065854a  /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1210) (BuildId: 8bb3225e7c408f2ca23abac3db0417f2)
2020-04-14 13:44:22.526 31825-31825/? A/DEBUG:       #24 pc 00000000001747cc  /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+140) (BuildId: 8bb3225e7c408f2ca23abac3db0417f2)
2020-04-14 13:44:22.526 31825-31825/? A/DEBUG:       #25 pc 0000000000169354  /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+756) (BuildId: 8bb3225e7c408f2ca23abac3db0417f2)
2020-04-14 13:44:22.526 31825-31825/? A/DEBUG:       #26 pc 0000000000179c50  /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+288) (BuildId: 8bb3225e7c408f2ca23abac3db0417f2)
2020-04-14 13:44:22.526 31825-31825/? A/DEBUG:       #27 pc 0000000000549d29  /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+89) (BuildId: 8bb3225e7c408f2ca23abac3db0417f2)
2020-04-14 13:44:22.527 31825-31825/? A/DEBUG:       #28 pc 000000000054afc5  /apex/com.android.runtime/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*)+437) (BuildId: 8bb3225e7c408f2ca23abac3db0417f2)
2020-04-14 13:44:22.527 31825-31825/? A/DEBUG:       #29 pc 00000000005a0a7e  /apex/com.android.runtime/lib64/libart.so (art::Thread::CreateCallback(void*)+1438) (BuildId: 8bb3225e7c408f2ca23abac3db0417f2)
2020-04-14 13:44:22.527 31825-31825/? A/DEBUG:       #30 pc 0000000000100fce  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+30) (BuildId: a08a19770d6696739c847e29c3f5f650)
2020-04-14 13:44:22.527 31825-31825/? A/DEBUG:       #31 pc 0000000000098fe7  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+55) (BuildId: a08a19770d6696739c847e29c3f5f650)
2020-04-14 13:44:22.790 1897-1897/? E//system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_17

Error extracting ivectors

# gmm-global-get-post --n=5 --min-post=0.025 extractor/final.dubm "ark,s,cs:apply-cmvn-online --spk2utt=ark:data/train/split1/1/split1/1/spk2utt --config=extractor/online_cmvn.conf extractor/global_cmvn.stats scp:data/train/split1/1/split1/1/feats.scp ark:- | splice-feats --left-context=3 --right-context=3 ark:- ark:- | transform-feats extractor/final.mat ark:- ark:- |" ark:- | ivector-extract --num-threads=1 --acoustic-weight=0.1 --compute-objf-change=true --max-count=100 --spk2utt=ark:data/train/split1/1/split1/1/spk2utt extractor/final.ie "ark,s,cs:splice-feats --left-context=3 --right-context=3 scp:data/train/split1/1/split1/1/feats.scp ark:- | transform-feats extractor/final.mat ark:- ark:- |" ark,s,cs:- ark,t:exp/nnet3/ivectors_eval2000/ivectors_spk.1.ark 
# Started at Tue Mar 17 00:44:23 EDT 2020
#
gmm-global-get-post --n=5 --min-post=0.025 extractor/final.dubm 'ark,s,cs:apply-cmvn-online --spk2utt=ark:data/train/split1/1/split1/1/spk2utt --config=extractor/online_cmvn.conf extractor/global_cmvn.stats scp:data/train/split1/1/split1/1/feats.scp ark:- | splice-feats --left-context=3 --right-context=3 ark:- ark:- | transform-feats extractor/final.mat ark:- ark:- |' ark:- 
ivector-extract --num-threads=1 --acoustic-weight=0.1 --compute-objf-change=true --max-count=100 --spk2utt=ark:data/train/split1/1/split1/1/spk2utt extractor/final.ie 'ark,s,cs:splice-feats --left-context=3 --right-context=3 scp:data/train/split1/1/split1/1/feats.scp ark:- | transform-feats extractor/final.mat ark:- ark:- |' ark,s,cs:- ark,t:exp/nnet3/ivectors_eval2000/ivectors_spk.1.ark 
splice-feats --left-context=3 --right-context=3 ark:- ark:- 
apply-cmvn-online --spk2utt=ark:data/train/split1/1/split1/1/spk2utt --config=extractor/online_cmvn.conf extractor/global_cmvn.stats scp:data/train/split1/1/split1/1/feats.scp ark:- 
transform-feats extractor/final.mat ark:- ark:- 
ASSERTION_FAILED (apply-cmvn-online[5.5]:SmoothOnlineCmvnStats():online-feature.cc:410) Assertion failed: (global_count > 0.0)

[ Stack-Trace: ]
/home/tamere/extended/kaldi/src/lib/libkaldi-base.so(kaldi::MessageLogger::LogMessage() const+0x793) [0x7f1670674183]
/home/tamere/extended/kaldi/src/lib/libkaldi-base.so(kaldi::KaldiAssertFailure_(char const*, char const*, int, char const*)+0x72) [0x7f1670674b84]
/home/tamere/extended/kaldi/src/lib/libkaldi-feat.so(kaldi::OnlineCmvn::SmoothOnlineCmvnStats(kaldi::MatrixBase<double> const&, kaldi::MatrixBase<double> const&, kaldi::OnlineCmvnOptions const&, kaldi::MatrixBase<double>*)+0x21b) [0x7f1670781201]
/home/tamere/extended/kaldi/src/lib/libkaldi-feat.so(kaldi::OnlineCmvn::GetFrame(int, kaldi::VectorBase<float>*)+0x12e) [0x7f167078270e]
apply-cmvn-online(main+0x6b1) [0x55d80387a52d]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7f167025f1e3]
apply-cmvn-online(_start+0x2e) [0x55d803879d8e]

LOG (ivector-extract[5.5]:ComputeDerivedVars():ivector-extractor.cc:183) Computing derived variables for iVector extractor
Aborted (core dumped)
LOG (transform-feats[5.5]:main():transform-feats.cc:161) Applied transform to 0 utterances; 0 had errors.
LOG (gmm-global-get-post[5.5]:main():gmm-global-get-post.cc:115) Done 0 files, 0 with errors, average UBM log-likelihood is -nan over 0 frames.
WARNING (gmm-global-get-post[5.5]:Close():kaldi-io.cc:515) Pipe apply-cmvn-online --spk2utt=ark:data/train/split1/1/split1/1/spk2utt --config=extractor/online_cmvn.conf extractor/global_cmvn.stats scp:data/train/split1/1/split1/1/feats.scp ark:- | splice-feats --left-context=3 --right-context=3 ark:- ark:- | transform-feats extractor/final.mat ark:- ark:- | had nonzero return status 256
ERROR (gmm-global-get-post[5.5]:~SequentialTableReaderArchiveImpl():util/kaldi-table-inl.h:678) TableReader: error detected closing archive 'apply-cmvn-online --spk2utt=ark:data/train/split1/1/split1/1/spk2utt --config=extractor/online_cmvn.conf extractor/global_cmvn.stats scp:data/train/split1/1/split1/1/feats.scp ark:- | splice-feats --left-context=3 --right-context=3 ark:- ark:- | transform-feats extractor/final.mat ark:- ark:- |'

[ Stack-Trace: ]
/home/tamere/extended/kaldi/src/lib/libkaldi-base.so(kaldi::MessageLogger::LogMessage() const+0x793) [0x7fa92c0b0183]
gmm-global-get-post(kaldi::MessageLogger::LogAndThrow::operator=(kaldi::MessageLogger const&)+0x25) [0x5632ceef829d]
gmm-global-get-post(kaldi::SequentialTableReaderArchiveImpl<kaldi::KaldiObjectHolder<kaldi::Matrix<float> > >::~SequentialTableReaderArchiveImpl()+0x124) [0x5632ceefcff8]
gmm-global-get-post(kaldi::SequentialTableReaderArchiveImpl<kaldi::KaldiObjectHolder<kaldi::Matrix<float> > >::~SequentialTableReaderArchiveImpl()+0xd) [0x5632ceefd31b]
gmm-global-get-post(kaldi::SequentialTableReader<kaldi::KaldiObjectHolder<kaldi::Matrix<float> > >::~SequentialTableReader()+0x16) [0x5632ceefe5e8]
gmm-global-get-post(main+0xd50) [0x5632ceef7a79]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7fa92bc9b1e3]
gmm-global-get-post(_start+0x2e) [0x5632ceef6c6e]

terminate called after throwing an instance of 'kaldi::KaldiFatalError'
  what():  kaldi::KaldiFatalError
LOG (ivector-extract[5.5]:ComputeDerivedVars():ivector-extractor.cc:204) Done.
splice-feats --left-context=3 --right-context=3 scp:data/train/split1/1/split1/1/feats.scp ark:- 
transform-feats extractor/final.mat ark:- ark:- 
WARNING (transform-feats[5.5]:main():transform-feats.cc:110) Transform matrix for utterance fred_120 has bad dimension 40x280 versus feat dim 91
WARNING (transform-feats[5.5]:main():transform-feats.cc:110) Transform matrix for utterance fred_134 has bad dimension 40x280 versus feat dim 91
WARNING (transform-feats[5.5]:main():transform-feats.cc:110) Transform matrix for utterance fred_178 has bad dimension 40x280 versus feat dim 91
WARNING (transform-feats[5.5]:main():transform-feats.cc:110) Transform matrix for utterance fred_257 has bad dimension 40x280 versus feat dim 91
WARNING (transform-feats[5.5]:main():transform-feats.cc:110) Transform matrix for utterance fred_286 has bad dimension 40x280 versus feat dim 91
WARNING (transform-feats[5.5]:main():transform-feats.cc:110) Transform matrix for utterance fred_379 has bad dimension 40x280 versus feat dim 91
WARNING (transform-feats[5.5]:main():transform-feats.cc:110) Transform matrix for utterance fred_613 has bad dimension 40x280 versus feat dim 91
WARNING (transform-feats[5.5]:main():transform-feats.cc:110) Transform matrix for utterance fred_684 has bad dimension 40x280 versus feat dim 91
WARNING (transform-feats[5.5]:main():transform-feats.cc:110) Transform matrix for utterance fred_819 has bad dimension 40x280 versus feat dim 91
LOG (transform-feats[5.5]:main():transform-feats.cc:161) Applied transform to 0 utterances; 9 had errors.
WARNING (ivector-extract[5.5]:RunPerSpeaker():ivector-extract.cc:123) No features present for utterance fred_120
WARNING (ivector-extract[5.5]:RunPerSpeaker():ivector-extract.cc:123) No features present for utterance fred_134
WARNING (ivector-extract[5.5]:RunPerSpeaker():ivector-extract.cc:123) No features present for utterance fred_178
WARNING (ivector-extract[5.5]:RunPerSpeaker():ivector-extract.cc:123) No features present for utterance fred_257
WARNING (ivector-extract[5.5]:RunPerSpeaker():ivector-extract.cc:123) No features present for utterance fred_286
WARNING (ivector-extract[5.5]:RunPerSpeaker():ivector-extract.cc:123) No features present for utterance fred_379
WARNING (ivector-extract[5.5]:RunPerSpeaker():ivector-extract.cc:123) No features present for utterance fred_613
WARNING (ivector-extract[5.5]:RunPerSpeaker():ivector-extract.cc:123) No features present for utterance fred_684
WARNING (ivector-extract[5.5]:RunPerSpeaker():ivector-extract.cc:123) No features present for utterance fred_819
WARNING (ivector-extract[5.5]:RunPerSpeaker():ivector-extract.cc:147) No stats accumulated for speaker fred
LOG (ivector-extract[5.5]:RunPerSpeaker():ivector-extract.cc:190) Done 0 speakers; 1 with errors.  0 utterances were processed, 9 with errors.
WARNING (ivector-extract[5.5]:Close():kaldi-io.cc:515) Pipe splice-feats --left-context=3 --right-context=3 scp:data/train/split1/1/split1/1/feats.scp ark:- | transform-feats extractor/final.mat ark:- ark:- | had nonzero return status 256
# Accounting: time=1 threads=1
# Ended (code 1) at Tue Mar 17 00:44:24 EDT 2020, elapsed time 1 seconds

Getting this error running the kaldi for dummies tutorial with added call to ivector copied from the aspire recipe, but not being able to compare those ivector files with the ones from other recipes, I don't know if they vary. I wasn't able to find my specific failed assertion on google. I know this is similar to error #28, which you haven't gotten a reply to your suggestion, I would prefer not needing ivector files honestly but kaldi will simply not start on android without vector files involved in the training.

Thank you

Waiting patiently for your excellent work

Playback Capture

Hi Nickolay,
First I really much appreciate you for such a great effort.

I am using your demo app for continuous speech recognition with Microphone. I experienced about 80% accuracy on Audio to Text transcribe from a video/audio playing in android device or outside. However in-person conversation, it shows much poor accuracy. How can I overcome this problem?

There are few other questions. Can you please entertain them?

  1. Is there a role of accent? How can an accent be used like North American English Accent?
  2. Is it possible to use audio input without a microphone. Suppose we capture audio from other apps internally without microphone, how can we put this captured data (audio buffers) as input to Kaldi Android App to get transcribed info back?

Kind regards,
Muhammad Rashid

Dummy instructions on own model training

I found...

"If you want to update the grammar or the acoustic model, check the script mkgraph_lookahead_arpa.sh from lookahead branch at our kaldi fork or from submitted pull request. Hopefully that pull request will be merged soon and graph can be compiled with kaldi master."

... but i am not getting that properly. Are there some easy dummy instructions how to train own ASR models and attach them to the android app? I would be willing to add german language if i figure out how to train.

Error in porting custom English model

When I am porting a custom English model trained on Librispeech, I get following error. Attaching logcat.

Model type : tdnn-chain trained using kaldi
Device : oneplus 7 pro

2020-04-25 22:21:18.136 1530-1570/? E/system_server: Invalid ID 0x00000000.
2020-04-25 22:21:18.142 1530-4161/? E/ScreenModeService: getAppToken AppWindowToken{2a39d07 token=Token{4390746 ActivityRecord{63ac721 u0 org.kaldi.demo/.KaldiActivity t1462}}}
2020-04-25 22:21:18.142 1530-4161/? E/ScreenModeService: setRefreshRate token AppWindowToken{2a39d07 token=Token{4390746 ActivityRecord{63ac721 u0 org.kaldi.demo/.KaldiActivity t1462}}} rate 0
2020-04-25 22:21:18.706 865-32387/? E/sensors-hal: ssc_conn_event_cb:490, event[0] msg_id=776, ts=10138385244184
2020-04-25 22:21:18.706 865-32387/? E/sensors-hal: handle_sns_client_event:65, device_orient_event: ts=528036342371484, type=0
2020-04-25 22:21:21.237 29912-29951/? E/bt_osi_wakelock: wakelock_acquire wakelock acquired
2020-04-25 22:21:21.239 29912-29952/? E/bt_osi_wakelock: wakelock_release wakelock released
2020-04-25 22:21:22.278 1530-5548/? E/TaskPersister: File error accessing recents directory (directory doesn't exist?).
2020-04-25 22:21:23.298 29912-29979/? E/HeadsetStateMachine: returning mCurrentState as Connected
2020-04-25 22:21:24.433 1129-1224/? E/statsd: Found dropped events: 1 error -19 last atom tag 83 from uid 10367
2020-04-25 22:21:24.488 1576-1576/org.kaldi.demo E/libc++abi: terminating with uncaught exception of type kaldi::KaldiFatalError: kaldi::KaldiFatalError
2020-04-25 22:21:24.489 1576-1576/org.kaldi.demo A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 1576 (org.kaldi.demo), pid 1576 (org.kaldi.demo)
2020-04-25 22:21:24.720 2572-2572/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2020-04-25 22:21:24.721 2572-2572/? A/DEBUG: Build fingerprint: 'OnePlus/OnePlus7Pro/OnePlus7Pro:10/QKQ1.190716.003/2003131900:user/release-keys'
2020-04-25 22:21:24.721 2572-2572/? A/DEBUG: Revision: '0'
2020-04-25 22:21:24.721 2572-2572/? A/DEBUG: ABI: 'arm64'
2020-04-25 22:21:24.722 2572-2572/? A/DEBUG: Timestamp: 2020-04-25 22:21:24+0530
2020-04-25 22:21:24.722 2572-2572/? A/DEBUG: pid: 1576, tid: 1576, name: org.kaldi.demo  >>> org.kaldi.demo <<<
2020-04-25 22:21:24.722 2572-2572/? A/DEBUG: uid: 10367
2020-04-25 22:21:24.722 2572-2572/? A/DEBUG: signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
2020-04-25 22:21:24.722 2572-2572/? A/DEBUG: Abort message: 'terminating with uncaught exception of type kaldi::KaldiFatalError: kaldi::KaldiFatalError'
2020-04-25 22:21:24.722 2572-2572/? A/DEBUG:     x0  0000000000000000  x1  0000000000000628  x2  0000000000000006  x3  0000007fd7fa06c0
2020-04-25 22:21:24.722 2572-2572/? A/DEBUG:     x4  fefeff799b35589d  x5  fefeff799b35589d  x6  fefeff799b35589d  x7  7f7f7f7fff7f7fff
2020-04-25 22:21:24.722 2572-2572/? A/DEBUG:     x8  00000000000000f0  x9  63163b6d27b065f7  x10 0000000000000001  x11 0000000000000000
2020-04-25 22:21:24.722 2572-2572/? A/DEBUG:     x12 fffffff0fffffbdf  x13 000000005ea46a8c  x14 001c743d1a548c40  x15 0000aeddd41436d5
2020-04-25 22:21:24.722 2572-2572/? A/DEBUG:     x16 0000007b8b4a6738  x17 0000007b8b484be0  x18 0000007b8e22a000  x19 0000000000000628
2020-04-25 22:21:24.722 2572-2572/? A/DEBUG:     x20 0000000000000628  x21 00000000ffffffff  x22 ffffff80ffffffc8  x23 0000007fd7fa0910
2020-04-25 22:21:24.722 2572-2572/? A/DEBUG:     x24 0000007fd7fa07f0  x25 0000007fd7fa0830  x26 0000007b088108b0  x27 0000000000000004
2020-04-25 22:21:24.722 2572-2572/? A/DEBUG:     x28 0000007fd7fa11c0  x29 0000007fd7fa0760
2020-04-25 22:21:24.722 2572-2572/? A/DEBUG:     sp  0000007fd7fa06a0  lr  0000007b8b436404  pc  0000007b8b436430
2020-04-25 22:21:25.038 2572-2572/? A/DEBUG: backtrace:
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #00 pc 0000000000073430  /apex/com.android.runtime/lib64/bionic/libc.so (abort+160) (BuildId: a2584ee8458a61d422edf24b4cd23b78)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #01 pc 00000000006e2a88  /data/app/org.kaldi.demo-PEKMOajau3hGBa71QABbeQ==/lib/arm64/libkaldi_jni.so (BuildId: a4cac2f11d9af48c319cf6857b5d2c7466cc271f)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #02 pc 00000000006e2be0  /data/app/org.kaldi.demo-PEKMOajau3hGBa71QABbeQ==/lib/arm64/libkaldi_jni.so (BuildId: a4cac2f11d9af48c319cf6857b5d2c7466cc271f)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #03 pc 00000000006dfc1c  /data/app/org.kaldi.demo-PEKMOajau3hGBa71QABbeQ==/lib/arm64/libkaldi_jni.so (BuildId: a4cac2f11d9af48c319cf6857b5d2c7466cc271f)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #04 pc 00000000006df320  /data/app/org.kaldi.demo-PEKMOajau3hGBa71QABbeQ==/lib/arm64/libkaldi_jni.so (BuildId: a4cac2f11d9af48c319cf6857b5d2c7466cc271f)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #05 pc 00000000006df2a0  /data/app/org.kaldi.demo-PEKMOajau3hGBa71QABbeQ==/lib/arm64/libkaldi_jni.so (__cxa_throw+120) (BuildId: a4cac2f11d9af48c319cf6857b5d2c7466cc271f)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #06 pc 0000000000258434  /data/app/org.kaldi.demo-PEKMOajau3hGBa71QABbeQ==/lib/arm64/libkaldi_jni.so (kaldi::MessageLogger::LogAndThrow::operator=(kaldi::MessageLogger const&)+112) (BuildId: a4cac2f11d9af48c319cf6857b5d2c7466cc271f)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #07 pc 00000000003fc728  /data/app/org.kaldi.demo-PEKMOajau3hGBa71QABbeQ==/lib/arm64/libkaldi_jni.so (kaldi::nnet3::DecodableNnetLoopedOnlineBase::DecodableNnetLoopedOnlineBase(kaldi::nnet3::DecodableNnetSimpleLoopedInfo const&, kaldi::OnlineFeatureInterface*, kaldi::OnlineFeatureInterface*)+480) (BuildId: a4cac2f11d9af48c319cf6857b5d2c7466cc271f)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #08 pc 00000000002c5074  /data/app/org.kaldi.demo-PEKMOajau3hGBa71QABbeQ==/lib/arm64/libkaldi_jni.so (kaldi::SingleUtteranceNnet3DecoderTpl<fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float>>>>::SingleUtteranceNnet3DecoderTpl(kaldi::LatticeFasterDecoderConfig const&, kaldi::TransitionModel const&, kaldi::nnet3::DecodableNnetSimpleLoopedInfo const&, fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float>>> const&, kaldi::OnlineNnet2FeaturePipeline*)+80) (BuildId: a4cac2f11d9af48c319cf6857b5d2c7466cc271f)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #09 pc 0000000000257f2c  /data/app/org.kaldi.demo-PEKMOajau3hGBa71QABbeQ==/lib/arm64/libkaldi_jni.so (KaldiRecognizer::KaldiRecognizer(Model&, float)+232) (BuildId: a4cac2f11d9af48c319cf6857b5d2c7466cc271f)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #10 pc 0000000000254f04  /data/app/org.kaldi.demo-PEKMOajau3hGBa71QABbeQ==/lib/arm64/libkaldi_jni.so (Java_org_kaldi_voskJNI_new_1KaldiRecognizer_1_1SWIG_10+48) (BuildId: a4cac2f11d9af48c319cf6857b5d2c7466cc271f)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #11 pc 0000000000140350  /apex/com.android.runtime/lib64/libart.so (art_quick_generic_jni_trampoline+144) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #12 pc 00000000001375b8  /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #13 pc 000000000014600c  /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+276) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #14 pc 00000000002e3948  /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+384) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #15 pc 00000000002deba8  /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+892) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #16 pc 00000000005a3c08  /apex/com.android.runtime/lib64/libart.so (MterpInvokeStatic+372) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #17 pc 0000000000131994  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #18 pc 0000000000001a08  [anon:dalvik-classes3.dex extracted in memory from /data/app/org.kaldi.demo-PEKMOajau3hGBa71QABbeQ==/base.apk!classes3.dex] (org.kaldi.KaldiRecognizer.<init>+8)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #19 pc 00000000005a3700  /apex/com.android.runtime/lib64/libart.so (MterpInvokeDirect+1100) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #20 pc 0000000000131914  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_direct+20) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #21 pc 0000000000002182  [anon:dalvik-classes3.dex extracted in memory from /data/app/org.kaldi.demo-PEKMOajau3hGBa71QABbeQ==/base.apk!classes3.dex] (org.kaldi.SpeechRecognizer.<init>+50)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #22 pc 00000000005a3700  /apex/com.android.runtime/lib64/libart.so (MterpInvokeDirect+1100) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #23 pc 0000000000131914  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_direct+20) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #24 pc 000000000001045a  [anon:dalvik-classes2.dex extracted in memory from /data/app/org.kaldi.demo-PEKMOajau3hGBa71QABbeQ==/base.apk!classes2.dex] (org.kaldi.demo.KaldiActivity.recognizeMicrophone+50)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #25 pc 00000000005a13f4  /apex/com.android.runtime/lib64/libart.so (MterpInvokeVirtual+1352) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #26 pc 0000000000131814  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #27 pc 000000000000fdac  [anon:dalvik-classes2.dex extracted in memory from /data/app/org.kaldi.demo-PEKMOajau3hGBa71QABbeQ==/base.apk!classes2.dex] (org.kaldi.demo.KaldiActivity$2.onClick+4)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #28 pc 00000000005a2c14  /apex/com.android.runtime/lib64/libart.so (MterpInvokeInterface+1788) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #29 pc 0000000000131a14  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #30 pc 00000000001b6f40  /system/framework/framework.jar (android.view.View.performClick+60)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #31 pc 00000000005a13f4  /apex/com.android.runtime/lib64/libart.so (MterpInvokeVirtual+1352) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #32 pc 0000000000131814  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #33 pc 00000000001b6f72  /system/framework/framework.jar (android.view.View.performClickInternal+6)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #34 pc 00000000005a3700  /apex/com.android.runtime/lib64/libart.so (MterpInvokeDirect+1100) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #35 pc 0000000000131914  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_direct+20) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #36 pc 00000000001b2894  /system/framework/framework.jar (android.view.View.access$3500)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #37 pc 00000000005a3ea4  /apex/com.android.runtime/lib64/libart.so (MterpInvokeStatic+1040) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #38 pc 0000000000131994  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #39 pc 00000000001904cc  /system/framework/framework.jar (android.view.View$PerformClick.run+16)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #40 pc 00000000005a2c14  /apex/com.android.runtime/lib64/libart.so (MterpInvokeInterface+1788) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #41 pc 0000000000131a14  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #42 pc 000000000030538c  /system/framework/framework.jar (android.os.Handler.handleCallback+4)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #43 pc 00000000005a3ea4  /apex/com.android.runtime/lib64/libart.so (MterpInvokeStatic+1040) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #44 pc 0000000000131994  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #45 pc 00000000003051f8  /system/framework/framework.jar (android.os.Handler.dispatchMessage+8)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #46 pc 00000000005a13f4  /apex/com.android.runtime/lib64/libart.so (MterpInvokeVirtual+1352) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #47 pc 0000000000131814  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #48 pc 000000000032a0ca  /system/framework/framework.jar (android.os.Looper.loop+466)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #49 pc 00000000005a3ea4  /apex/com.android.runtime/lib64/libart.so (MterpInvokeStatic+1040) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #50 pc 0000000000131994  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #51 pc 0000000000190970  /system/framework/framework.jar (android.app.ActivityThread.main+196)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #52 pc 00000000002b4c5c  /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.12938883504528282530+240) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #53 pc 000000000059269c  /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1032) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #54 pc 0000000000140468  /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #55 pc 00000000001375b8  /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #56 pc 000000000014600c  /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+276) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #57 pc 00000000004b103c  /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #58 pc 00000000004b2be0  /apex/com.android.runtime/lib64/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1480) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #59 pc 000000000043df14  /apex/com.android.runtime/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+52) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #60 pc 00000000000c2c34  /system/framework/arm64/boot.oat (art_jni_trampoline+180) (BuildId: 330b1a5f1a8a3b8f073c90dad4ea94e1f188a70d)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #61 pc 0000000000137334  /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #62 pc 0000000000145fec  /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+244) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #63 pc 00000000002e3948  /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+384) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #64 pc 00000000002deba8  /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+892) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #65 pc 00000000005a1134  /apex/com.android.runtime/lib64/libart.so (MterpInvokeVirtual+648) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #66 pc 0000000000131814  /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #67 pc 0000000000367562  /system/framework/framework.jar (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+22)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #68 pc 00000000002b4c5c  /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.12938883504528282530+240) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #69 pc 000000000059269c  /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1032) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.039 2572-2572/? A/DEBUG:       #70 pc 0000000000140468  /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.040 2572-2572/? A/DEBUG:       #71 pc 00000000009d2420  /system/framework/arm64/boot-framework.oat (com.android.internal.os.ZygoteInit.main+2256) (BuildId: 544d0c525eb0d8d51ee1041c9ba9fcdf22f2954a)
2020-04-25 22:21:25.040 2572-2572/? A/DEBUG:       #72 pc 00000000001375b8  /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.040 2572-2572/? A/DEBUG:       #73 pc 000000000014600c  /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+276) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.040 2572-2572/? A/DEBUG:       #74 pc 00000000004b103c  /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.040 2572-2572/? A/DEBUG:       #75 pc 00000000004b0c2c  /apex/com.android.runtime/lib64/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+408) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.040 2572-2572/? A/DEBUG:       #76 pc 00000000003bb718  /apex/com.android.runtime/lib64/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+624) (BuildId: ced0e918261ca872f5cff4cdba80b1a9)
2020-04-25 22:21:25.040 2572-2572/? A/DEBUG:       #77 pc 00000000000c099c  /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+116) (BuildId: a42bc7456294f626bfa72bc94e68241f)
2020-04-25 22:21:25.040 2572-2572/? A/DEBUG:       #78 pc 00000000000c3900  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+988) (BuildId: a42bc7456294f626bfa72bc94e68241f)
2020-04-25 22:21:25.040 2572-2572/? A/DEBUG:       #79 pc 00000000000035b0  /system/bin/app_process64 (main+1376) (BuildId: d23f7f711e9d93214484f019017fb1a7)

words.txt

你好,大神兼容问题已经解决了,感谢你,但是碰到如下问题。
V/KaldiDemo: Could not read symbol table from file /storage/emulated/0/Android/data/org.kaldi.demo/files/sync/model-android/words.txt
/storage/emulated/0/Android/data/org.kaldi.demo/files/sync/model-android/words.txt
这是什么原因阿

Is it possible to implement pause method in order to release the recorder ?

Hi,

I would like a pause() method in order to be able to launch quicker again without analyzing and integrating the model object again.
Is it possible to do that ?

It seems that when I'm trying to stop() and start() the recognizer, native layer is crashing. Maybe because Ican't use any reference asap I've called stop() on the recognizer.

Regards

Voice separation on multiple inputs via microphone

Hi Nickolay,
Here is a scenario, suppose an audio is playing in a user's Andorid device and meanwhile an announcement occurs outside, now microphone is capturing multiple inputs. How can we recognise and separate these two sources (audio playing in a user's device and announcement outside)?

The latency at beginning when the demo start to work is larger

Hi Nickolay,
I built a version for Android. Everything was fine but only one problem that the latency at first 2-3 seconds is larger. After starting the demo and speaking some words, having to wait for 2 or 3 seconds to get results on the screen. But after some words appear on screen then the demo is seem working in real time. Could i fix this?

KaldiFatalError while loading other models

D/!!!!: /storage/emulated/0/Android/data/org.kaldi.demo/files/sync V/KaldiDemo: Cannot open config file: /storage/emulated/0/Android/data/org.kaldi.demo/files/sync/ru/0.3/mfcc.conf E/libc++abi: terminating with uncaught exception of type kaldi::KaldiFatalError: kaldi::KaldiFatalError

Timestamp: 2020-03-02 11:52:20+0530 pid: 3820, tid: 3859, name: AsyncTask #1 >>> org.kaldi.demo <<< uid: 10157 signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr -------- Abort message: 'terminating with uncaught exception of type kaldi::KaldiFatalError: kaldi::KaldiFatalError' x0 0000000000000000 x1 0000000000000f13 x2 0000000000000006 x3 00000072f6ddc1e0 x4 fefeff7197cad49d x5 fefeff7197cad49d x6 fefeff7197cad49d x7 7f7f7f7fffffffff x8 00000000000000f0 x9 f66b9465304d9f32 x10 0000000000000001 x11 0000000000000000 x12 fffffff0fffffbdf x13 7272456c61746146 x14 0000007298c6713c x15 0000000000000000 x16 0000007384b608c0 x17 0000007384b3c900 x18 000000729a9f8000 x19 0000000000000eec x20 0000000000000f13 x21 00000000ffffffff x22 ffffff80ffffffc8 x23 00000072f6ddc430 x24 00000072f6ddc310 x25 00000072f6ddc350 x26 00000072f6ddf020 x27 0000007298d91ca8 x28 00000072f6ddcac8 x29 00000072f6ddc280 sp 00000072f6ddc1c0 lr 0000007384aee0c4 pc 0000007384aee0f0

Trying to load Russian model. But i am getting this FatalError, any idea ??

Fatal Error When Using Different Model

Hi,
I have been trying to use the tdnn_f German model from https://goofy.zamia.org/asr/.

I copied the respective files from the tar according to https://github.com/alphacep/vosk-server/blob/master/docker/Dockerfile.kaldi-de. The app launches but as soon as I want to initiate recognizing (either via microphone or file) I get a crash.

This is console output:
E/SpannableStringBuilder: SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length I/Assets: Copying asset model-android/ivector/final.dubm to /storage/emulated/0/Android/data/org.kaldi.demo/files/sync/model-android/ivector/final.dubm I/Assets: Copying asset model-android/ivector/splice.conf to /storage/emulated/0/Android/data/org.kaldi.demo/files/sync/model-android/ivector/splice.conf I/Assets: Copying asset model-android/ivector/final.mat to /storage/emulated/0/Android/data/org.kaldi.demo/files/sync/model-android/ivector/final.mat I/Assets: Copying asset model-android/mfcc.conf to /storage/emulated/0/Android/data/org.kaldi.demo/files/sync/model-android/mfcc.conf I/Assets: Copying asset model-android/words.txt to /storage/emulated/0/Android/data/org.kaldi.demo/files/sync/model-android/words.txt I/Assets: Copying asset model-android/word_boundary.int to /storage/emulated/0/Android/data/org.kaldi.demo/files/sync/model-android/word_boundary.int I/Assets: Copying asset model-android/ivector/global_cmvn.stats to /storage/emulated/0/Android/data/org.kaldi.demo/files/sync/model-android/ivector/global_cmvn.stats I/Assets: Copying asset model-android/ivector/online_cmvn.conf to /storage/emulated/0/Android/data/org.kaldi.demo/files/sync/model-android/ivector/online_cmvn.conf I/Assets: Copying asset model-android/mfcc_hires.conf to /storage/emulated/0/Android/data/org.kaldi.demo/files/sync/model-android/mfcc_hires.conf I/Assets: Copying asset model-android/ivector/final.ie to /storage/emulated/0/Android/data/org.kaldi.demo/files/sync/model-android/ivector/final.ie I/org.kaldi.demo: ProcessProfilingInfo new_methods=26 is saved saved_to_disk=1 resolve_classes_delay=8000 I/Assets: Copying asset model-android/HCLG.fst to /storage/emulated/0/Android/data/org.kaldi.demo/files/sync/model-android/HCLG.fst I/Assets: Copying asset model-android/final.mdl to /storage/emulated/0/Android/data/org.kaldi.demo/files/sync/model-android/final.mdl D/!!!!: /storage/emulated/0/Android/data/org.kaldi.demo/files/sync V/KaldiDemo: Computing derived variables for iVector extractor V/KaldiDemo: Done. V/KaldiDemo: Removed 1 orphan nodes. Removing 2 orphan components. Added 1 components, removed 2 V/KaldiDemo: Spent 0.0701852 seconds in looped compilation. V/KaldiDemo: Dimension mismatch: source features have dimension 91 and LDA #cols is 280 E/libc++abi: terminating with uncaught exception of type kaldi::KaldiFatalError: kaldi::KaldiFatalError A/libc: Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 24275 (AsyncTask #2), pid 23206 (org.kaldi.demo)

Full logcat attached. Any help is appreciated!
logcat.txt

SpeechRecognizer defined word list

Hello,

is it possible to give the SpeechRecognizer a specific word list. I already built my own model which is working. But I would like to further reduce the recognizable words dynamically based on the context.

Kind regards

语音模型

请问支持中文吗?能否直接使用cvte的中文语音模型?

Doesn't work on x86 emulator

First of all, great repo. Second of all, I had a few problems getting it to run on emulator (works fine on device). FYI I had to modify the project's build.gradle version to:
classpath 'com.android.tools.build:gradle:3.5.2' to get it to build at all- if you wish I will raise a PR for this.

Here is the output for x86 emulator:

11/10 17:53:09: Launching 'Unnamed' on Pixel 3a XL API 28.
$ adb shell am start -n "org.kaldi.demo/org.kaldi.demo.KaldiActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D
Waiting for application to come online: org.kaldi.demo.test | org.kaldi.demo
Waiting for application to come online: org.kaldi.demo.test | org.kaldi.demo
Waiting for application to come online: org.kaldi.demo.test | org.kaldi.demo
Connecting to org.kaldi.demo
Waiting for application to start debug server
Waiting for application to come online: org.kaldi.demo.test | org.kaldi.demo
Connecting to org.kaldi.demo
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
I/System.out: Debugger has connected
    waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
Connected to the target VM, address: 'localhost:8606', transport: 'socket'
I/chatty: uid=10091(org.kaldi.demo) identical 3 lines
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/chatty: uid=10091(org.kaldi.demo) identical 1 line
I/System.out: waiting for debugger to settle...
I/System.out: debugger has settled (1451)
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
    Process: org.kaldi.demo, PID: 19763
    java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/org.kaldi.demo-SKbwCrrRmi-p28GOnMedrQ==/base.apk"],nativeLibraryDirectories=[/data/app/org.kaldi.demo-SKbwCrrRmi-p28GOnMedrQ==/lib/x86, /system/lib]]] couldn't find "libkaldi_jni.so"
        at java.lang.Runtime.loadLibrary0(Runtime.java:1012)
        at java.lang.System.loadLibrary(System.java:1669)
        at org.kaldi.demo.KaldiActivity.<clinit>(KaldiActivity.java:36)
        at java.lang.Class.newInstance(Native Method)
        at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:69)
        at android.support.v4.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:43)
        at android.app.Instrumentation.newActivity(Instrumentation.java:1215)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2831)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6669)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Disconnected from the target VM, address: 'localhost:8606', transport: 'socket'

Looks like libkaldi_jni.so is missing from inside aars? I haven't looked but would building https://github.com/alphacep/kaldi-android make this work?

The demo doesn't work with other model

Hi Nickolay,
I imported this project, built the apk file and run it on a Pie Android device. Everything was fine with the default kaldi model included in this respo. I further replaced this model by my own developed model (for Vietnamese), rebuilt the apk file and run on the same device. After the demo initialized if i touch "Recognize File" or "Recognize Microphone" button the demo will disappear (like core dump or something else). My model was trained using CNN+TDNN config with Kaldi version-5.5, the total size at final is 100M. So do you have any suggestion or idea about this issue?

Errors opening HCLG.fst

I cannot start the application after i tried to port the aar to another application body.

--------- beginning of crash

2019-12-11 12:31:31.551 22204-22321/eu.test.sampleapp V/KaldiDemo: Sample rate is 16000
2019-12-11 12:31:31.605 22204-22321/eu.test.sampleapp V/KaldiDemo: Computing derived variables for iVector extractor
2019-12-11 12:31:32.136 22204-22321/eu.test.sampleapp V/KaldiDemo: Done.
2019-12-11 12:31:33.200 22204-22321/eu.test.sampleapp V/KaldiDemo: Removed 1 orphan nodes.
2019-12-11 12:31:33.200 22204-22321/eu.test.sampleapp V/KaldiDemo: Removing 2 orphan components.
2019-12-11 12:31:33.205 22204-22321/eu.test.sampleapp V/KaldiDemo: Added 1 components, removed 2
2019-12-11 12:31:35.147 22204-22321/eu.test.sampleapp V/KaldiDemo: Spent 1.02403 seconds in looped compilation.
2019-12-11 12:31:35.147 22204-22321/eu.test.sampleapp V/KaldiDemo: Error opening input stream /storage/emulated/0/Android/data/eu.test.sampleapp/files/sync/model-android/HCLG.fst

How do I use German tuda-de model in kaldi-android-demo?

In vosk-api docs it's said that tuda-de model is compatible with vosk-api. I tried to run kaldi-android-demo and everything worked for me, but that was simple english model. I need to make some experiments on german language recognition. I have local kaldi server and I've made everything from docs in vosk-api project too. Also I've both pretrained tuda-de models and built one from their sources myself. But what I can't figure out is how to make android-demo working with tuda-de model. Just copying tuda-de pretrained model files instead of kaldi-android-demo/models/src/main/assets/sync/model-android/ files is not working for me too.
As I see you have few models in Release with proper lookahead, maybe I need to uptade tuda-de graph some how too?
Any chances you can describe a bit more in details how to use this android-demo with German tuda-de model, please?

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.