![]() You can either upload your audio file directly via the Google Cloud Shell (search for the three-dotted “More” menu in the Shell and select “Upload file”), alternatively audio content can be integrated with Cloud Storage. Via the built-in Editor in Cloud Shell create a JSON file (call it for instance ‘request.json’). Google Cloud Shell is a command line environment running in the cloud. To activate your Cloud Shell, inspect the upper right-hand corner of your Google Cloud Platform Console and click the icon called “Activate Shell”. Nevertheless, in the box below we will provide the basic structure of the request. If you enter audio data which is not Base64 encoded, the Google Cloud Shell will give you an error 400 stating that Base64 decoding failed for your (wav-)file. JSON eventually does not support binary data which is why you will have to transform your binary audio file into text using Base64 encoding (also refer to this documentation from the Google Website for more information). To make your REST request (via the Google Cloud Shell) however JSON is used. Audio data (such as our exemplary file in wav-format) is binary data. However, your audio file will need some pre-processing. In principle (and in a very similar procedure) this can be achieved for the Speech-to-Text API. For both Google’s Translation API as well as Google’s Natural-Language API, in this review we demonstrate an example for a simple API call via the Google Cloud Shell. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |