In this recipe, we will demonstrate how to read in an audio file and convert it to speech. We will use the audio.linear16 audio file created in the Converting text to speech using the Google Cloud Text-to- Speech API recipe as input to the example.
Converting speech to text using the Google Cloud Speech-to-Text API
Getting ready
To prepare, we need to follow these steps:
- Create a new Java Maven project
- Add the following dependency to the POM:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-speech</artifactId>
<version>0.61.0-beta</version>
</dependency>
- Add the GOOGLE_APPLICATION_CREDENTIALS environmental variable with a value that, is the...