diff --git a/google-cloud-datastore/README.md b/google-cloud-datastore/README.md index 09721ce7c3d8..fdd7b43607a1 100644 --- a/google-cloud-datastore/README.md +++ b/google-cloud-datastore/README.md @@ -12,9 +12,6 @@ Java idiomatic client for [Google Cloud Datastore](https://cloud.google.com/data - [Homepage](https://googlecloudplatform.github.io/google-cloud-java/) - [API Documentation](https://googlecloudplatform.github.io/google-cloud-java/apidocs/index.html?com/google/cloud/datastore/package-summary.html) -> Note: This client is a work-in-progress, and may occasionally -> make backwards-incompatible changes. - Quickstart ---------- If you are using Maven, add this to your pom.xml file @@ -170,9 +167,7 @@ Versioning This library follows [Semantic Versioning](http://semver.org/). -It is currently in major version zero (``0.y.z``), which means that anything -may change at any time and the public API should not be considered -stable. +It is currently in major version one (``1.y.z``), which means that the public API should be considered stable. Contributing ------------ diff --git a/google-cloud-examples/src/main/java/com/google/cloud/examples/language/snippets/AnalyzeSentiment.java b/google-cloud-examples/src/main/java/com/google/cloud/examples/language/snippets/AnalyzeSentiment.java new file mode 100644 index 000000000000..72b5519ed9dd --- /dev/null +++ b/google-cloud-examples/src/main/java/com/google/cloud/examples/language/snippets/AnalyzeSentiment.java @@ -0,0 +1,53 @@ +/* + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * EDITING INSTRUCTIONS + * This file is referenced in READMEs. Any change to this file should be reflected in + * the project's READMEs. + */ + +package com.google.cloud.examples.language.snippets; + +import com.google.cloud.language.spi.v1.LanguageServiceClient; + +import com.google.cloud.language.v1.Document; +import com.google.cloud.language.v1.Document.Type; +import com.google.cloud.language.v1.Sentiment; + +/** + * A snippet for Google Cloud Speech API showing how to analyze text message sentiment. + */ +public class AnalyzeSentiment { + + public static void main(String... args) throws Exception { + // Instantiates a client + LanguageServiceClient language = LanguageServiceClient.create(); + + // The text to analyze + String[] texts = {"I love this!", "I hate this!"}; + for (String text : texts) { + Document doc = Document.newBuilder().setContent(text).setType(Type.PLAIN_TEXT).build(); + // Detects the sentiment of the text + Sentiment sentiment = language.analyzeSentiment(doc).getDocumentSentiment(); + + System.out.printf("Text: \"%s\"%n", text); + System.out.printf( + "Sentiment: score = %s, magnitude = %s%n", + sentiment.getScore(), sentiment.getMagnitude()); + } + } +} diff --git a/google-cloud-examples/src/main/java/com/google/cloud/examples/speech/snippets/RecognizeSpeech.java b/google-cloud-examples/src/main/java/com/google/cloud/examples/speech/snippets/RecognizeSpeech.java new file mode 100644 index 000000000000..405cdf8b5666 --- /dev/null +++ b/google-cloud-examples/src/main/java/com/google/cloud/examples/speech/snippets/RecognizeSpeech.java @@ -0,0 +1,77 @@ +/* + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * EDITING INSTRUCTIONS + * This file is referenced in READMEs. Any change to this file should be reflected in + * the project's READMEs. + */ + +package com.google.cloud.examples.speech.snippets; + +import com.google.cloud.speech.spi.v1.SpeechClient; +import com.google.cloud.speech.v1.RecognitionAudio; +import com.google.cloud.speech.v1.RecognitionConfig; +import com.google.cloud.speech.v1.RecognitionConfig.AudioEncoding; +import com.google.cloud.speech.v1.RecognizeResponse; +import com.google.cloud.speech.v1.SpeechRecognitionAlternative; +import com.google.cloud.speech.v1.SpeechRecognitionResult; +import com.google.protobuf.ByteString; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.List; + +/** + * A snippet for Google Natural Language API showing how to convert houman speech from an audio file + * into a text form. + */ +public class RecognizeSpeech { + public static void main(String... args) throws Exception { + // Instantiates a client + SpeechClient speech = SpeechClient.create(); + + // The path to the audio file to transcribe + String fileName = "your/speech/audio/file.raw"; // for example "./resources/audio.raw"; + + // Reads the audio file into memory + Path path = Paths.get(fileName); + byte[] data = Files.readAllBytes(path); + ByteString audioBytes = ByteString.copyFrom(data); + + // Builds the sync recognize request + RecognitionConfig config = RecognitionConfig.newBuilder() + .setEncoding(AudioEncoding.LINEAR16) + .setSampleRateHertz(16000) + .setLanguageCode("en-US") + .build(); + RecognitionAudio audio = RecognitionAudio.newBuilder() + .setContent(audioBytes) + .build(); + + // Performs speech recognition on the audio file + RecognizeResponse response = speech.recognize(config, audio); + List results = response.getResultsList(); + + for (SpeechRecognitionResult result: results) { + List alternatives = result.getAlternativesList(); + for (SpeechRecognitionAlternative alternative: alternatives) { + System.out.printf("Transcription: %s%n", alternative.getTranscript()); + } + } + speech.close(); + } +} diff --git a/google-cloud-examples/src/main/java/com/google/cloud/examples/vision/snippets/AnnotateImage.java b/google-cloud-examples/src/main/java/com/google/cloud/examples/vision/snippets/AnnotateImage.java new file mode 100644 index 000000000000..5ac74457fa9f --- /dev/null +++ b/google-cloud-examples/src/main/java/com/google/cloud/examples/vision/snippets/AnnotateImage.java @@ -0,0 +1,84 @@ +/* + * Copyright 2017 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * EDITING INSTRUCTIONS + * This file is referenced in READMEs. Any change to this file should be reflected in + * the project's READMEs. + */ + +package com.google.cloud.examples.vision.snippets; +import com.google.cloud.vision.spi.v1.ImageAnnotatorClient; +import com.google.cloud.vision.v1.AnnotateImageRequest; +import com.google.cloud.vision.v1.AnnotateImageResponse; +import com.google.cloud.vision.v1.BatchAnnotateImagesResponse; +import com.google.cloud.vision.v1.EntityAnnotation; +import com.google.cloud.vision.v1.Feature; +import com.google.cloud.vision.v1.Feature.Type; +import com.google.cloud.vision.v1.Image; +import com.google.protobuf.ByteString; +import com.google.protobuf.Descriptors.FieldDescriptor; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * A snippet for Google Cloud Vision API demonstrating how to determine what is shown on a picture. + */ +public class AnnotateImage { + public static void main(String... args) throws Exception { + // Instantiates a client + ImageAnnotatorClient vision = ImageAnnotatorClient.create(); + + // The path to the image file to annotate + String fileName = "your/image/path.jpg"; // for example "./resources/wakeupcat.jpg"; + + // Reads the image file into memory + Path path = Paths.get(fileName); + byte[] data = Files.readAllBytes(path); + ByteString imgBytes = ByteString.copyFrom(data); + + // Builds the image annotation request + List requests = new ArrayList<>(); + Image img = Image.newBuilder().setContent(imgBytes).build(); + Feature feat = Feature.newBuilder().setType(Type.LABEL_DETECTION).build(); + AnnotateImageRequest request = AnnotateImageRequest.newBuilder() + .addFeatures(feat) + .setImage(img) + .build(); + requests.add(request); + + // Performs label detection on the image file + BatchAnnotateImagesResponse response = vision.batchAnnotateImages(requests); + List responses = response.getResponsesList(); + + for (AnnotateImageResponse res : responses) { + if (res.hasError()) { + System.out.printf("Error: %s\n", res.getError().getMessage()); + return; + } + + for (EntityAnnotation annotation : res.getLabelAnnotationsList()) { + for (Map.Entry entry : annotation.getAllFields().entrySet()) { + System.out.printf("%s : %s\n", entry.getKey(), entry.getValue()); + } + } + } + } +} diff --git a/google-cloud-language/README.md b/google-cloud-language/README.md new file mode 100644 index 000000000000..b4a18b7a800a --- /dev/null +++ b/google-cloud-language/README.md @@ -0,0 +1,98 @@ +Google Cloud Java Client for Natural Language +====================================== + +Java idiomatic client for [Google Cloud Natural Language](https://cloud.google.com/natural-language/). + +[![Build Status](https://travis-ci.org/GoogleCloudPlatform/google-cloud-java.svg?branch=master)](https://travis-ci.org/GoogleCloudPlatform/google-cloud-java) +[![Coverage Status](https://coveralls.io/repos/GoogleCloudPlatform/google-cloud-java/badge.svg?branch=master)](https://coveralls.io/r/GoogleCloudPlatform/google-cloud-java?branch=master) +[![Maven](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-language.svg)](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-language.svg) +[![Codacy Badge](https://api.codacy.com/project/badge/grade/9da006ad7c3a4fe1abd142e77c003917)](https://www.codacy.com/app/mziccard/google-cloud-java) +[![Dependency Status](https://www.versioneye.com/user/projects/58fe4c8d6ac171426c414772/badge.svg?style=flat)](https://www.versioneye.com/user/projects/58fe4c8d6ac171426c414772) + +- [Homepage](https://googlecloudplatform.github.io/google-cloud-java/) +- [API Documentation][language-api] + +> Note: This client is a work-in-progress, and may occasionally +> make backwards-incompatible changes. + +Quickstart +---------- +If you are using Maven, add this to your pom.xml file +```xml + + com.google.cloud + google-cloud-language + 0.17.1-beta + +``` +If you are using Gradle, add this to your dependencies +```Groovy +compile 'com.google.cloud:google-cloud-language:0.17.1-beta' +``` +If you are using SBT, add this to your dependencies +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-language" % "0.17.1-beta" +``` + +Authentication +-------------- + +See the [Authentication](https://github.com/GoogleCloudPlatform/google-cloud-java#authentication) section in the base directory's README. + +About Google Cloud Natural Language +---------------------------- + +Google [Cloud Natural Language API][cloud-language-docs] provides natural language understanding technologies to developers, including sentiment analysis, entity analysis, and syntax analysis. This API is part of the larger Cloud Machine Learning API family. + +See the ``google-cloud`` API [natural language documentation][language-api] to learn how to use this Cloud Natural Language API Client Library. + +Getting Started +--------------- +#### Prerequisites +You will need a [Google Developers Console](https://console.developers.google.com/) project with the Natural Language API enabled. [Follow these instructions](https://cloud.google.com/docs/authentication#preparation) to get your project set up. You will also need to set up the local development environment by [installing the Google Cloud SDK](https://cloud.google.com/sdk/) and running the following commands in command line: `gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. + +#### Installation and setup +You'll need to obtain the `google-cloud-language` library. See the [Quickstart](#quickstart) section to add `google-cloud-language` as a dependency in your code. + +#### Complete source code + +In [AnalyzeSentiment.java](../google-cloud-examples/src/main/java/com/google/cloud/examples/language/snippets/AnalyzeSentiment.java) we put a quick start example, which shows how you can use Google Natural Language API to automatically analyze a sentiment of a text message. + +Troubleshooting +--------------- + +To get help, follow the instructions in the [shared Troubleshooting document](https://github.com/GoogleCloudPlatform/gcloud-common/blob/master/troubleshooting/readme.md#troubleshooting). + +Java Versions +------------- + +Java 7 or above is required for using this client. + +Versioning +---------- + +This library follows [Semantic Versioning](http://semver.org/). + +It is currently in major version zero (``0.y.z``), which means that anything may change at any time and the public API should not be considered stable. + +Contributing +------------ + +Contributions to this library are always welcome and highly encouraged. + +See `google-cloud`'s [CONTRIBUTING] documentation and the [shared documentation](https://github.com/GoogleCloudPlatform/gcloud-common/blob/master/contributing/readme.md#how-to-contribute-to-gcloud) for more information on how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more information. + +License +------- + +Apache 2.0 - See [LICENSE] for more information. + + +[CONTRIBUTING]:https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/CONTRIBUTING.md +[code-of-conduct]:https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[LICENSE]: https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/LICENSE +[cloud-platform]: https://cloud.google.com/ +[cloud-language-docs]: https://cloud.google.com/natural-language/docs +[language-api]: https://googlecloudplatform.github.io/google-cloud-java/apidocs/index.html?com/google/cloud/language/spi/v1/package-summary.html diff --git a/google-cloud-logging/README.md b/google-cloud-logging/README.md index b5ac3c9a1a49..8b97a333cb94 100644 --- a/google-cloud-logging/README.md +++ b/google-cloud-logging/README.md @@ -12,9 +12,6 @@ Java idiomatic client for [Stackdriver Logging][stackdriver-logging]. - [Homepage](https://googlecloudplatform.github.io/google-cloud-java/) - [API Documentation](https://googlecloudplatform.github.io/google-cloud-java/apidocs) -> Note: This client is a work-in-progress, and may occasionally -> make backwards-incompatible changes. - Quickstart ---------- @@ -184,9 +181,7 @@ Versioning This library follows [Semantic Versioning](http://semver.org/). -It is currently in major version zero (``0.y.z``), which means that anything -may change at any time and the public API should not be considered -stable. +It is currently in major version one (``1.y.z``), which means that the public API should be considered stable. Contributing ------------ diff --git a/google-cloud-speech/README.md b/google-cloud-speech/README.md new file mode 100644 index 000000000000..41e1e8d032b6 --- /dev/null +++ b/google-cloud-speech/README.md @@ -0,0 +1,102 @@ +Google Cloud Java Client for Speech +====================================== + +Java idiomatic client for [Google Cloud Speech](https://cloud.google.com/speech/). + +[![Build Status](https://travis-ci.org/GoogleCloudPlatform/google-cloud-java.svg?branch=master)](https://travis-ci.org/GoogleCloudPlatform/google-cloud-java) +[![Coverage Status](https://coveralls.io/repos/GoogleCloudPlatform/google-cloud-java/badge.svg?branch=master)](https://coveralls.io/r/GoogleCloudPlatform/google-cloud-java?branch=master) +[![Maven](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-speech.svg)](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-speech.svg) +[![Codacy Badge](https://api.codacy.com/project/badge/grade/9da006ad7c3a4fe1abd142e77c003917)](https://www.codacy.com/app/mziccard/google-cloud-java) +[![Dependency Status](https://www.versioneye.com/user/projects/58fe4c8d6ac171426c414772/badge.svg?style=flat)](https://www.versioneye.com/user/projects/58fe4c8d6ac171426c414772) + +- [Homepage](https://googlecloudplatform.github.io/google-cloud-java/) +- [API Documentation][speech-api] + +> Note: This client is a work-in-progress, and may occasionally +> make backwards-incompatible changes. + +Quickstart +---------- +If you are using Maven, add this to your pom.xml file +```xml + + com.google.cloud + google-cloud-speech + 0.17.1-alpha + +``` +If you are using Gradle, add this to your dependencies +```Groovy +compile 'com.google.cloud:google-cloud-speech:0.17.1-alpha' +``` +If you are using SBT, add this to your dependencies +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-speech" % "0.17.1-alpha" +``` + +Authentication +-------------- + +See the [Authentication](https://github.com/GoogleCloudPlatform/google-cloud-java#authentication) section in the base directory's README. + +About Google Cloud Speech +---------------------------- + +Google [Cloud Speech API][cloud-speech-docs] enables easy integration of Google speech recognition technologies into developer applications. Send audio and receive a text transcription from the Cloud Speech API service. + +See the ``google-cloud`` API [speech documentation][speech-api] to learn how to use this Cloud Speech API Client Library. + +Getting Started +--------------- +#### Prerequisites +You will need a [Google Developers Console](https://console.developers.google.com/) project with the Speech API enabled. [Follow these instructions](https://cloud.google.com/docs/authentication#preparation) to get your project set up. You will also need to set up the local development environment by [installing the Google Cloud SDK](https://cloud.google.com/sdk/) and running the following commands in command line: `gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. + +#### Installation and setup +You'll need to obtain the `google-cloud-speech` library. See the [Quickstart](#quickstart) section to add `google-cloud-speech` as a dependency in your code. + +#### Complete source code + +In [RecognizeSpeech.java](../google-cloud-examples/src/main/java/com/google/cloud/examples/speech/snippets/RecognizeSpeech.java) we put a quick start example, which shows how you can use Goolge Speech API to automatically recognize speech. This sample will transcript houman speech from an audio file to a text form. + +For an example audio file please check the [audio.raw](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/speech/cloud-client/resources/audio.raw) from the samples repository. +Note, to play the file on Unix-like system you may use the following command: `play -t raw -r 16k -e signed -b 16 -c 1 audio.raw` + + +Troubleshooting +--------------- + +To get help, follow the instructions in the [shared Troubleshooting document](https://github.com/GoogleCloudPlatform/gcloud-common/blob/master/troubleshooting/readme.md#troubleshooting). + +Java Versions +------------- + +Java 7 or above is required for using this client. + +Versioning +---------- + +This library follows [Semantic Versioning](http://semver.org/). + +It is currently in major version zero (``0.y.z``), which means that anything may change at any time and the public API should not be considered stable. + +Contributing +------------ + +Contributions to this library are always welcome and highly encouraged. + +See `google-cloud`'s [CONTRIBUTING] documentation and the [shared documentation](https://github.com/GoogleCloudPlatform/gcloud-common/blob/master/contributing/readme.md#how-to-contribute-to-gcloud) for more information on how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more information. + +License +------- + +Apache 2.0 - See [LICENSE] for more information. + + +[CONTRIBUTING]:https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/CONTRIBUTING.md +[code-of-conduct]:https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[LICENSE]: https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/LICENSE +[cloud-platform]: https://cloud.google.com/ +[cloud-speech-docs]: https://cloud.google.com/speech/docs +[speech-api]: https://googlecloudplatform.github.io/google-cloud-java/apidocs/index.html?com/google/cloud/speech/spi/v1/package-summary.html diff --git a/google-cloud-storage/README.md b/google-cloud-storage/README.md index 4e79278127ea..e0538a4fd1d2 100644 --- a/google-cloud-storage/README.md +++ b/google-cloud-storage/README.md @@ -12,9 +12,6 @@ Java idiomatic client for [Google Cloud Storage](https://cloud.google.com/storag - [Homepage](https://googlecloudplatform.github.io/google-cloud-java/) - [API Documentation](https://googlecloudplatform.github.io/google-cloud-java/apidocs/index.html?com/google/cloud/storage/package-summary.html) -> Note: This client is a work-in-progress, and may occasionally -> make backwards-incompatible changes. - Quickstart ---------- If you are using Maven, add this to your pom.xml file @@ -171,9 +168,7 @@ Versioning This library follows [Semantic Versioning](http://semver.org/). -It is currently in major version zero (``0.y.z``), which means that anything -may change at any time and the public API should not be considered -stable. +It is currently in major version one (``1.y.z``), which means that the public API should be considered stable. Contributing ------------ diff --git a/google-cloud-vision/README.md b/google-cloud-vision/README.md new file mode 100644 index 000000000000..68b407e90337 --- /dev/null +++ b/google-cloud-vision/README.md @@ -0,0 +1,100 @@ +Google Cloud Java Client for Vision +====================================== + +Java idiomatic client for [Google Cloud Vision](https://cloud.google.com/vision/). + +[![Build Status](https://travis-ci.org/GoogleCloudPlatform/google-cloud-java.svg?branch=master)](https://travis-ci.org/GoogleCloudPlatform/google-cloud-java) +[![Coverage Status](https://coveralls.io/repos/GoogleCloudPlatform/google-cloud-java/badge.svg?branch=master)](https://coveralls.io/r/GoogleCloudPlatform/google-cloud-java?branch=master) +[![Maven](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-vision.svg)](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-vision.svg) +[![Codacy Badge](https://api.codacy.com/project/badge/grade/9da006ad7c3a4fe1abd142e77c003917)](https://www.codacy.com/app/mziccard/google-cloud-java) +[![Dependency Status](https://www.versioneye.com/user/projects/58fe4c8d6ac171426c414772/badge.svg?style=flat)](https://www.versioneye.com/user/projects/58fe4c8d6ac171426c414772) + +- [Homepage](https://googlecloudplatform.github.io/google-cloud-java/) +- [API Documentation][vision-api] + +> Note: This client is a work-in-progress, and may occasionally +> make backwards-incompatible changes. + +Quickstart +---------- +If you are using Maven, add this to your pom.xml file +```xml + + com.google.cloud + google-cloud-vision + 0.17.1-beta + +``` +If you are using Gradle, add this to your dependencies +```Groovy +compile 'com.google.cloud:google-cloud-vision:0.17.1-beta' +``` +If you are using SBT, add this to your dependencies +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-vision" % "0.17.1-beta" +``` + +Authentication +-------------- + +See the [Authentication](https://github.com/GoogleCloudPlatform/google-cloud-java#authentication) section in the base directory's README. + +About Google Cloud Vision +---------------------------- + +Google [Cloud Vision API][cloud-vision-docs] allows developers to easily integrate vision detection features within applications, including image labeling, face and landmark detection, optical character recognition (OCR), and tagging of explicit content. + +See the ``google-cloud`` API [vision documentation][vision-api] to learn how to use this Cloud Vision API Client Library. + +Getting Started +--------------- +#### Prerequisites +You will need a [Google Developers Console](https://console.developers.google.com/) project with the Vision API enabled. [Follow these instructions](https://cloud.google.com/docs/authentication#preparation) to get your project set up. You will also need to set up the local development environment by [installing the Google Cloud SDK](https://cloud.google.com/sdk/) and running the following commands in command line: `gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. + +#### Installation and setup +You'll need to obtain the `google-cloud-vision` library. See the [Quickstart](#quickstart) section to add `google-cloud-vision` as a dependency in your code. + +#### Complete source code + +In [AnnotateImage.java](../google-cloud-examples/src/main/java/com/google/cloud/examples/vision/snippets/AnnotateImage.java) we put a quick start example, which shows how you can use Goolge Vision API to automatically annotate an immage (like "cat", "whiskers", "mammal" for a picture of a cat). + +For an example picture file please check the [wakeupcat.jpg](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/vision/cloud-client/resources/wakeupcat.jpg) from the samples repository. + +Troubleshooting +--------------- + +To get help, follow the instructions in the [shared Troubleshooting document](https://github.com/GoogleCloudPlatform/gcloud-common/blob/master/troubleshooting/readme.md#troubleshooting). + +Java Versions +------------- + +Java 7 or above is required for using this client. + +Versioning +---------- + +This library follows [Semantic Versioning](http://semver.org/). + +It is currently in major version zero (``0.y.z``), which means that anything may change at any time and the public API should not be considered stable. + +Contributing +------------ + +Contributions to this library are always welcome and highly encouraged. + +See `google-cloud`'s [CONTRIBUTING] documentation and the [shared documentation](https://github.com/GoogleCloudPlatform/gcloud-common/blob/master/contributing/readme.md#how-to-contribute-to-gcloud) for more information on how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more information. + +License +------- + +Apache 2.0 - See [LICENSE] for more information. + + +[CONTRIBUTING]:https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/CONTRIBUTING.md +[code-of-conduct]:https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[LICENSE]: https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/LICENSE +[cloud-platform]: https://cloud.google.com/ +[cloud-vision-docs]: https://cloud.google.com/vision/docs +[vision-api]: https://googlecloudplatform.github.io/google-cloud-java/apidocs/index.html?com/google/cloud/vision/spi/v1/package-summary.html