I try to download and run the offline voice recognization demo from this link - http://cmusphinx.sourceforge.net/2011/05/building-pocketsphinx-on-android/ . I m successfully install and run this demo project on device, but when i push and hold the button and when i release the button, it try to convert into text. The textfield "Your text goes here" becomes empty but it is not displaying the any result, i.e. Text of What we speak.
Please any one who run this demo successfully, help me with better suggestion.
Thanks in advance.
In my experience, the text field stays blank when there is some error in the configuration for the native pocket sphinx code. Any errors encountered by PocketSphinx should be printed to the log file. Figure out where your PocketSphinx log file is; it is set using the setLogfile(String path) function. One of the things that happens to me quite often is a mismatch between the words in the dictionary and the words in the language model/grammar. Since you probably haven't edited those, I'd say it could be a wrong path to one of them. The log file will tell you about anything that couldn't be loaded.
Related
I am locked with Android Studio.
As I was developing my first android app, I sometime pushed the "Run 'app'" button to test and see how the app was working. With no problem up to this point, but then I tried to use Image Asset Studio to make my own icon. And now when I try to use the "Run 'app'" button to test, all I can see is the image below keeping coming back and the app is no longer started. I guess I did something wrong on the way; though I have no idea what. Can anyone think of what I should do to get back on my feet and have the app working again? I haven't changed any part of the code since it was last working.
And hereafter is a second screenshot showing an error:
Running the find command on the project directory, for the file ic_launcher.webp, I get this result.
I suppose some of the files shouldn't be there.
MyMac$ find AndroidStudioProjects/MyApp -name ic_launcher.webp
AndroidStudioProjects/MyApp/app/src/main/res/mipmap-mdpi/ic_launcher.webp
AndroidStudioProjects/MyApp/app/src/main/res/mipmap-hdpi/ic_launcher.webp
AndroidStudioProjects/MyApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
AndroidStudioProjects/MyApp/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
AndroidStudioProjects/MyApp/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
MyMac$
But for comparison if I run the same command on the directory for a project where this issue does not appear. I find even more of the ic_launcher.webp file, so I must be missing some detail.
MyMac$ find AndroidStudioProjects/MyOtherApp -name ic_launcher.webp
AndroidStudioProjects/MyOtherApp/app/build/intermediates/packaged_res/debug/mipmap-xxxhdpi-v4/ic_launcher.webp
AndroidStudioProjects/MyOtherApp/app/build/intermediates/packaged_res/debug/mipmap-hdpi-v4/ic_launcher.webp
AndroidStudioProjects/MyOtherApp/app/build/intermediates/packaged_res/debug/mipmap-xhdpi-v4/ic_launcher.webp
AndroidStudioProjects/MyOtherApp/app/build/intermediates/packaged_res/debug/mipmap-mdpi-v4/ic_launcher.webp
AndroidStudioProjects/MyOtherApp/app/build/intermediates/packaged_res/debug/mipmap-xxhdpi-v4/ic_launcher.webp
AndroidStudioProjects/MyOtherApp/app/src/main/res/mipmap-mdpi/ic_launcher.webp
AndroidStudioProjects/MyOtherApp/app/src/main/res/mipmap-hdpi/ic_launcher.webp
AndroidStudioProjects/MyOtherApp/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
AndroidStudioProjects/MyOtherApp/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
AndroidStudioProjects/MyOtherApp/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
MyMac$
If you print in log (fileName:lineNumber) you get a nice link in Android Monitor that gets you to that code line when you click on it. This however does not seem to work for my cpp files. Is there a way to achieve this for c++ files?
Edit
I already know how to create string (fileName:lineNumber), but when it is printed in Android Monitor it is not a clickable link. The question is how to make clickable.
To appear as a clickable link in the Android studio Logcat window, (filename.cpp:filenumber) should be associated at least with one file that is part of your AS project:
You can see that some system logs are resolved to clickable links, while the others are not.
In the example above, Socket.java is part of public API, while PlaneSocketImpl.java is not, therefore AS does not show a link for the latter.
I have an XML file that I want to extract data from using XQuery.
So far, the only library I found that allows such thing is MXQuery but the project seems to be abandonned.
Is there any other way to make XQuery work on Android ?
I have started building an XQuery app months ago. You would enter a query directly in the app and have it evaluated there. I was thinking it could become almost like an IDE, with one big query text field filling the screen, and then you click run and it shows the XML result.
Unfortunately urgent matters have happened and I have not gotten further than setting up the compiler for an empty project directory :( (huge annoyance, I set it up with ant and Sherlock-activity, and then those became deprecated and I had to start over with gradle and ActionbarActivity)
Earlier I made a command line tool that seems to run on Android, but you need a terminal emulator app. (afair I have fixed the memory issue mentioned in the later comments)
I also made an app for public libraries to automatically renew all books that you have lend from the library. It keeps a history of lend books and you can search that history, e.g. to get a list of all books that you have lend about a certain topic. Or find the book that you have lend the most often. The twist is you search with XQuery. Normal people enter $books[title = "foo"], but you can write serialize(<foo>bar</foo>) or doc("file:///whatever")/foo to run any XQuery on any local file inside the app. However, the entire query has to fit in one line, is not saved and the app is in German. (it will ask for the username/password of your public library account, but accepts an empty username, too).
How can i know which java file is used at the current time at that current interface. I know we can do this with a logcat when we know the source code , we can make everything log.i and stuff. but what happens when we don't know the source code or while assessing a black box android app
If you don't have access to the files how you supposed to know which file you are getting?
The best way to achieve what you want is to use a decompiler in your APK and do a debug.
http://www.decompileandroid.com/
I monitor an EditText using textwatcher i store every key press in a log file I want to view the data i put into the log file after running the application,but still couldn't find it how. appreciate the kindness in helping me :)
Assuming you're talking about the standard Android logcat (done in code something like this Log.d(TAG, "onCreate() Restoring previous state");) when you say you 'store every key press in a log file', it should show up in the Android pane of Android studio (ALT+F6) as:
If on the other hand, you're using some custom code for logging it would be implementation dependent (the file might even simply be stored on the test device).
Click on android studio View(ALT+V)->Tool Windows->Android Monitor
OR
Press ALT+6
If the value don't display yet than restart your android studio If you want only text written in logcat than just copy it