I'm new at using google cloud API so please forgive me if I ask any silly question. I want to try develop android app by Xamarin c# to do OCR for Thai language, so my idea is to and I want to get OCR result from my photo. This's my json request
{"requests": [
{"image":{"content":"3QGzdykwB2MZPcpx...."},
"imageContext": {"languageHints":["th"]},
"features": [{"type":"DOCUMENT_TEXT_DETECTION"}]}]}
But the result that I got is
"error": {
"code": 14,
"message": "Service temporarily unavailable. Error processing features."}
What wrong with this? Anyone please give some suggestion. Thank you.
Since you have not provided the source code,let me assume that you are using the GoogleCloudPlatform/java-docs-samples
The main reason for the above exception is that the face annotations in the below code is null. You can just update the following code as your requirement
if (response.getFaceAnnotations() == null) {
throw new IOException(
response.getError() != null
? response.getError().getMessage()
: "Unknown error getting image annotations");
}