Handwriting recognition in android studio - android

I need to recognize some text written on a postit. The text has no meaning, it is a succession of letters written in block capitals.
I inquired and discovered that it is a problem of localization of handwriting and then of recognition of the handwriting. There is google OCR, but those models only recognize English language phrases.
I leave you an example image:enter image description here
I would like that, for each postit, the text is recognized, so for the first postit: "769213" for the second "ALHSFP"

The Cloud Vision API is able to detect more than just "English language phrases". Try Google Translate; it can translate directly from camera input; Lens might also use the same. You could as well use TensorFlow Lite on Android. Keras is required for training models (won't run on Android).
For example:
https://cloud.google.com/vision/docs/handwriting
https://towardsdatascience.com/build-a-handwritten-text-recognition-system-using-tensorflow-2326a3487cd5
https://keras.io/examples/vision/handwriting_recognition/
The mere difference is, that the one requires a network connection, while the other doesn't.

Related

Using SSOCR for 7-Segment Display in Android

I am trying to recognize the digital numbers in Android. I used OpenCV for image processing and OCR engine for Tessreact. But result is still poor.
I found about SSOCR form this. Therefore I would like to use SSOCR (Seven Segment Optical Character Recognition) in Android. It is written in C. Anyone suggests me the way how can I use SSOCR in my Android application OR is there any better way to recognize the digital numbers with tessreact.

Nuance Mobile always returns zero results if I enable Grammar Recognition Mode

I have an iOS and an Android app that do Speech to Text recognition using Nuance Mobile SDK. Both apps work perfectly when using a Nuance sandbox appID.
However, when if I upload a phrase file, the Nuance server always returns zero results, as I can verify in the "didFinishWithResults" methods on both android and ios.
This is the phrase file I upload as a custom vocabulary to Nuance:
<phrases>
<phrase>two on to</phrase>
<phrase>bet 1 3 for</phrase>
<phrase>...and some other phrases.</phrase>
</phrases>
My Nuance custom dictionary is set to:
Topic:WebSearch
Grammar recognition mode: YES (<== Apps work perfectly when set to NO)
Vocabulary Weight: 90
Nuance's documentation claims that:
It is important to note that custom vocabularies are different than the constrained speech
recognition grammars many developers are familiar with. Using constrained grammars results in
high accuracy of words that are in the grammar and low (or no) recognition of words or phrases
that are not in the grammar. With custom vocabularies our large language models are still used
and the vocabulary simply adjusts the recognition probabilities of that large model. As a result,
using a vocabulary will not change your results as much as a conventional grammar would. For
example, you can expect to still get word results that are not in the vocabulary or “out of
grammar.” The grammar recognition mode feature makes the vocabulary act much more like a
traditional recognition grammar but as we are still using the underlying language model even
then you may get “out of grammar” results.
.....So my question is, What am I doing wrong to always get zero results from Nuance ASR when the custom vocabulary's grammar recognition mode is set to YES?
Nuance's customer support is totally useless, they probably outsource a bunch of people with just an FAQ in hand that have no idea about anything.
I hope somebody can help me out on this one.

Handwriting Recognition to database

I'm working on some language learning software and I want to use Windows and Samsung's existing handwriting recognition with in my program for the user to make calls to a database (a list of commands) that I'm going to create. I have the slightest idea on where to begin or even how this would work. I would really appreciate the help. Thanks in advance.
Samsung provides Pen as part of their Mobile SDK. I haven't used it myself but the documentation says it contains a text recognition engine. However, it seems you not only get the recognition engine but have to use the whole package.

Android Speech to Text - offline constant recognition

Doing some research I have found some different speech to text API's for Android.
Pocket Sphinx
Android Native API
I have the following requirements:
Must be able to support offline speech recognition (I'm not sure
if the Android API can do this)
Must be able to detect and
respond immediately to every word said. I would rather this than
detecting an entire sentence. I could split the returned sentence
into and array though and get each word.
The detection needs to
be processing in the backgound (no popups or anything as the Android
API seems to do)
Can someone recommend an API that is capable of my requirements.
Pocketsphinx meets all your requirements. What you call the "Android Native API" is basically a set of interface definitions and it does not contain the notion of offline/online.
You can also implement these interfaces using Pocketsphinx, since it supports things like partial results, confidence scores, n-best results etc. This way the implementation becomes available to any Android app. Maybe somebody has done it already, but I'm not aware of it.

Speech recognition language model

I would like to integrate speech recognition into my Android application.
I am aware google provides two language models (free form for dictation and web search for short phrases).
However, my app will have a finite number of possible words (maybe a few thousand). Is it possible to specify the vocabularly; limiting it to these words, in the hope of achieving more accurate results?
My immediate thoughts would be to use the web search language model and then check the results of this against my vocabulary.
Any thoughts appreciated.
I think your intuition is correct and you've answered your own question.
The built in speech recognition provided by google only supports the dictation and search language models. See http://developer.android.com/reference/android/speech/RecognizerIntent.html
You can get back results using these recognizer models and then classify or filter the results to find what best matches your limited vocabulary. There are different techniques to do this and they can range from simple parsing to complex statistical models.
The only other alternative I've seen is to use some other speech recognition on a server that can accept your dedicated language model. Though this is costly and complex and used by commercial speech companies like VLingo or Dragon or Microsoft's Bing.
You can use Opensource models like Voxforge or cheap ones like Lumenvox.
Some have been ported to android. I forgot by whom.
I answered pretty much the same question before - please check here: Building openears compatible language model
and here:
typically you need very large text corpora to generate useful language models.
If you just have a small amount of training data, your language model will be over-fitted, which means that it will not generalize.

Categories

Resources