We are going to make a request as follows:
Field | Value |
HTTP method | POST |
URL | https://speech.googleapis.com/v1/speech:recognize?key=API_KEY |
Request body |
// SNIPP SNIPP |
Note that the content property under the audio property is the base64 encoded version of the audio. In the same Audio folder, you should find a file named arvind_sample_recording_base64.txt. This is the base64 version of the same audio. You can use an online service such as https://www.browserling.com/tools/image-to-base64 or https://www.base64-image.de/ for converting your own audio to a base64 string.
Neither Packt Publishing nor the author are endorsing the previous links. Please use them at your own risk.