It’s utterly disappointing of course as we only got a few words out of it, but still something (I guess!). Once we have this id we can query the result of the process by calling GET operations endpoint.įantastic! Some results. This is a unique identifier assigned by Google to the job they created for us. The solution is using speech:longrunningrecognize endpoint which only returns a JSON with 1 value: name. For audio longer than 1 min use LongRunningRecognize with a ‘uri’ parameter.” This is the error I got after posting a 03:55 audio. I uploaded it to the Google Storage bucket I created, gave public access to it and tried the API.Īpparently, speech:recognize endpoint only supports audio up to a minute. Now I was ready to call the API with my shiny single-channel FLAC file. So make sure to customize it and enter 1 as channel count: The important bit here is is that by default VLC converts to stereo audio with 2 channels but Google doesn’t support it which is explained in this documentation:Īll encodings support only 1 channel (mono) audio In the Choose Profile section, select Audio - FLAC. Probably can be done in a number of ways but VLC is quite straightforward to do it:Ĭlick File –> Convert & Stream, drag and drop the video Since all I need is audio I extracted it from video file using VLC. In Window -> Media Information dialog it shows the full path of the raw video file and I copied that path into a browser and downloaded the video. I simply used VLC to open the YouTube video. To download videos from youtube you can refer to this TechAdvisor article. This is just for experimental purposes and I deleted the video after I’m done testing it so should be fine I guess. Since I couldn’t find a way to download FLAC version of the song I decided to download the official vide from Rammstein’s YouTube channel. My goal is to extract lyrics of a Rammstein song and translate them to English. OK, now that I have a free trial at my disposal and have everything setup, let’s create some storage, upload some files and put it to a real test. But I’ll of course try anyway :-) Test Case: Get lyrics for a Rammstein song and translate So no way of uploading a random MP3 and get text out of it. Gcloud auth application-default print-access-token Export GOOGLE_APPLICATION_CREDENTIALS="/Path/To/Credentials/Json/File"
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |