speech to text download function - node.js

Hi can you guys please give me a code to write download function after uploading my audio file for converting to transcript.txt. I need code like I uploaded my audio file into server I see only upload button I can create download button, Can you tell me how to write a code for download function to download that uploaded and converted file from server directly in my web page.
Thank you in advance

What I think you are looking for is the text result from your uploaded audio file? It's in the returned JSON from your upload.
See the API documentation for more specifics.

Related

My base64 audio file is not the same as the one google cloud speech send

I want to translate an audio file to text via google google cloud speech api.
I record an audio file of type :
audio/x-flac type with codecs=opus.
My audio file transcribed to base64 gives this (I only put the beginning):
GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQRChYECGFOAZwH/////////FUmpZpkq17GDD0JATYCGQ2hyb21lV0GGQ2hyb21lFlSua7+uvdeBAXPFh6ZbkBme7LiDgQKGhkFfT1BVU2Oik09wdXNIZWFkAQEAAIC7AAAAAADhjbWERzuAAJ+BAWJkgSAfQ7Z1Af/////////ngQCjjIEAAID7A//+//7//qOMgQA7gPsD//7//v/+o4yBAHeA+wP//v/+//6jjIEAs4D7A//+//7//qOMgQDvgPsD//7//v/+o4yBASuA+wP//v/+//6jQOmBAWiA+4MCAv/+//5+Gjf43iuAMUp0LKWeBuKWw5OP5gEM9j8POpNh6x2zmKmvvjYztj563NneRFMpQuTaVo6Zmkee3gftByFW4mgqYrsH4JQBFm3muCMtGwBRKxLBqdm0Sz3VOaS5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcBGsaNXRSQmfKpNmHAEaVZ120Ho0faji/1DFqduipx5F9Kj2eUmcLGdgvb0QKsY2vitpqZ32XiZ4r4t75RKoMSlBsSKMP5ZjnbOvhJtib9B0b/FLyiGoQQIMEfCOYO2Db+AFUP6AxoUqNBqIEBo4D7g4qXYizKyF771oN3hbF/FQwqgbt5cnU1Aev4S9h0wbwTJuNCyd4PnjBBo2hvEEx29FIzFZZd7AUIhGG/f9YS5C+wIdnjl6i6EsufNN/eETxOZZqSheXcLLzn9G+TO4EeLIodZiZoxAYCF/pud8orEKG24zWYi6bNcg+moXt8/rpXbaLkqJeIoGzQRPFkd738ClvMW+yNUDmuKY1xmXdvtj4XoPwEdVtZHPxa6tABIZEWobIxh5CdCY495Ij9mqi1jFsnHLiYNP48NzvnoCfbAh/a3M13Mijct5n4+zGskka3y4WVAwYvQixFBQkhX1SyH5BcW1d8dvHv8lPxshJ6C9xCKdspDqFeLFrl9IU9y9l9lYF1p7XyZvXfqaz7bzDWV1ZsxhEVMwkVIiyUHch2E+omwR5JjY0+HmiXQAbnzAoP/+AJPZU6tSRENx5y8rRviuK76d/saDudaUZJ/aVG3t6J/kOPKlBg1g5LTr5sXnww/7PqbmH+eGfOBydu4eyfa7jbLmdE6AfYeO3kHs3hn6/nlwDKvYpStvWUHdeRdWe2zdKjQYeBAd+A+4OA
When I use the example of google on this link:
https://cloud.google.com/speech-to-text/
When I upload my audio file and I look the request sent I see that their content is not the same:
UklGRqTjBQBXQVZFZm10IBAAAAABAAEAgLsAAAB3AQACABAAZGF0YYDjBQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
The google example works. Mine doesn't work.
Is the encoding different? if so, what is the encoding?
I use base64.exe for transcribe my audio file to base64.
Thanks
I found the solution.
I was using the js MediaRecorder library to generate my flac audio file but it is not compatible for google cloud speech. When you upload it on the example of google cloud speech it modifies the file to make it compatible.
So I changed the library to generate my file, I used recorder-js.
https://www.npmjs.com/package/recorder-js
It is working now.

Angular 5 Download file from dropbox and Upload it to AWS s3

I am currently using dropbox file picker to download the file. I got the download link after selection of file using dropbox picker.
Is there any possibility that we can save it inside bytestream in browser and upload it to server(Node.JS) using http post call ?
Or Is there any alternative to this scenario ?
Any help would be appreciated.
Instead of downloading and reuploading the file on the browser, I would have this step to be processed on the server side.
You can use Dropbox and S3 sdk's and follow the steps below:
Make a call to the server that will send IDs of the list of files available in Dropbox.
Let the user select a file in the angular app and send the selected file's resource identifier back to the server.
Download the file and then re-upload it to the S3 on the server side.
Display the result/status back to the user.
Is there any reason you want this to be done in the frontend?

Bug with uploading using youtube API?

I'm uploading videos using youtube API v3.
All was Ok until I copied and renamed my video file via node js:
fs.createReadStream(old_path).pipe(fs.createWriteStream(new_path));
After it, after uploading, in my video manager page (https://www.youtube.com/my_video) I have error: "Upload failed: can't process file". But in my app i recieved video ID in response. I've uploaded that file several times with the same result. But luckily I have original (not renamed) file in my backup, and I uploaded it successfully.
By the way, when I tried to upload the renamed file manually (through the browser), it was successful.
p.s. When I use
fs.writeFileSync(new_path, fs.readFileSync(old_path));
for copying and rename files, uploading also was successful.
I tried to do it with a bunch of files, with same results.
Here is the reference post 1 and reference post 2 from YouTube help forum where the user has encountered the same issue.
The same issue was cited in the SO post as well.
Where the recommendation are the same as what I have given.
It's possible there's issues with the video file on the conversion
side of things.
Another reason maybe is the file format.
Currently the supported formats are listed below:
.MOV
.MPEG4
MP4
.AVI
.WMV
.MPEGPS
.FLV
3GPP
WebM
Try to check Recommended upload encoding settings for your videos on youtube as well.

How to upload image directly to S3 with NodeJS

went on NPMJS but could't find any libraries useful. It looks like nearly all of them requires it first to be stored on the server then upload to S3. Any chance the file can be uploaded directly to S3?
These two links are good sources of uploads to S3.
http://blog.katworksgames.com/2014/01/26/nodejs-deploying-files-to-aws-s3/
http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-examples.html
This blog post explains in detail how you can solve this problem:
https://www.terlici.com/2015/05/23/uploading-files-S3.html
You need to create a signed URL first and after that a user can upload a file directly to S3.

CSV/Text file upload using node js

I need to create a function to upload CSV/txt file into mongodb using mean stack.
The function should be like i will upload a file. First it will check whether its in text/csv format than it will upload that to mongodb.
I searched on internet and couldnt find any good material. Anyone have any idea, Please share
I used angular-file-upload and wrote my own handler using multiparty for express.

Resources