Reputation: 19
I'm currently trying to implement Google's TTS in my Java project. I've successfully completed the steps up until 'Install the client library' seen here:
https://cloud.google.com/text-to-speech/docs/quickstart-client-libraries#install_the_client_library
What am I supposed to do with the file it shows under java?
Thanks, I'm completely lost at this point.
Upvotes: 1
Views: 1108
Reputation: 40366
"packages", "libraries" and other so-called dependencies including Google Client Libraries are commonly provided through developer productivity tools that include package management. This is true across most programming languages.
For Java, you have many choices (including doing-it-yourself) but I recommend you investigate Maven (used here) and Gradle another commonly used tool.
There is an overhead to learning how to use these tools but it should pay dividends in the long run. Suffice to say that, just for package management, these tools will get you the correct package|library and the correct version and deploy the package into your code correctly for you.
In this case, you can find the librarygoogle-cloud-texttospeech
(version: 0.80.0-beta
) here:
https://mvnrepository.com/artifact/com.google.cloud/google-cloud-texttospeech
This page references the "jar" file that will be copied by (e.g. Maven) into your project. If you know how to do this manually, you can do so: http://central.maven.org/maven2/com/google/cloud/google-cloud-texttospeech/0.81.0-beta/google-cloud-texttospeech-0.81.0-beta.jar
The Maven page also links to the Google's sources. If you'd prefer, you could clone and references the sources directly too (though you're better place working from the distributed jar file): https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-texttospeech
I wrote overviews for several languages, here's the one for Java: https://medium.com/google-cloud/getting-started-w-java-on-gcp-9c068638140f
Hopefully that gets you progressed!
Upvotes: 1