So when I submit a .docx file through google classroom it gets converted into a file with mimetype application/vnd.openxmlformats-officedocument.wordprocessingml.document and stored in the Classroom folder of the teacher's google drive.
I want to read the contents of this file so I can do analysis on them, but cannot find a suitable way to do this.
Initially, I tried using the google docs api
GET https://docs.googleapis.com/v1/documents/{documentId}
This threw an error that the mimetype was incorrect.
The google drive api for files/get allows me to get a download url for the document, but unfortunately this requires in browser authentication so I cannot make this work programmatically.
How shall I proceed to read the contents of this file?
I believe some possible solutions are converting the application/vnd.openxmlformats-officedocument.wordprocessingml.document mimetype into the standard google docs mimetype, or having a download url that doesnt require authentication, but I do not know how to do either of these!
Thanks in advance!
My website currently creates a word document for users (docx format) and sends it to them as a downloadable so they can save it to their computer.
What I would like to know is if an Open in Google Doc "Button/Feature" exists. So instead of downloading the docx, the user could open it directly into their Google Drive and/or Google Doc account.
Is this possible?
Thanks,
We have old gdata libraries for Document List API and there is a method for Attchments. We are changing it to Drive API but we are ot finding anything related to attachments in Drive API. Do we have to use Files.insert instead? Please advise.
I'm trying to use the Google Speech API v2 (at address https://www.google.com/speech-api/v2/recognize?...)
I need to use my Api Key, but when I use it I get error 403 Forbidden
When I use an API key that was on the example project I downloaded it is working fine.
I saw that at the Google Developers Console I can enable a lot of api options, but didn't find any Speech-API option. Is there anything else I need to enable to get access to this API using my key?
Thank you!
Instructions are here : http://www.chromium.org/developers/how-tos/api-keys
!! Do not forget to activate the API "Speech API" in "APIs" under "APIS & AUTH" !!
According to chromium that there is no quota for google speech to text APIs anymore.so you will not found it in your google cloud project console
I am not sure this API is available to everyone, but here is a github project that provides a valid key. You should try with this key.
https://github.com/gillesdemey/google-speech-v2
This is an old post, but hopefully it will help someone.
I couldn't find the Speech API listed under the popular APIs on https://console.developers.google.com/ either. You have to search for the Speech API using the "Search all 100 + APIs" search field.
In order to use the service you need to:
get a developer key (see above answers for instructions)
send a mono flac audio file to http://www.google.com/speech-api/v2/recognize (Google doesn't accept stereo audio anymore)
specify your audio file's sampling rate (e.g. 16000, 44100, etc.) and Content-Type as audio/x-flac in your HTTP header
specify values for key, client and lang parameters in the url
Here is a wget example with full parameters and header:
wget -q --post-file file.flac --header="Content-Type: audio/x-flac; rate=16000" -O - "http://www.google.com/speech-api/v2/recognize?client=chromium&lang=en_US&key=AIzaSyAcalCzUvPmmJ7CZBFOEWx2Z1ZSn4Vs1gg"
Note that the free service is limited to 50 requests/day for a developer key.
This repository offers a shell script to use the API from the command line (including voice recording).
We were using an Iframe, then we started to use the API for Google Drive. We want to allow users to create a Google Doc from within our system w/o leaving our application. Does anyone know if this is possible?
Insert a new file with one of the Google Docs mimeTypes and wait for the response.
POST https://developers.google.com/drive/v2/reference/files/insert
{ "mimeType": "application/vnd.google-apps.document" }
Once response arrives, it'll contain an attribute called embedLink. Use embed link on iframe.
All available Google Docs mime types are on https://developers.google.com/drive/mime-types