Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Syed-Hassaan/8e38380d133204e9c759f0b64153700e to your computer and use it in GitHub Desktop.
Save Syed-Hassaan/8e38380d133204e9c759f0b64153700e to your computer and use it in GitHub Desktop.
Perform Foundational Data, ML, and AI Tasks in Google Cloud: Challenge Lab
## Task 1.
gcloud auth list
gsutil cp gs://cloud-training/gsp323/lab.csv .
gsutil cp gs://cloud-training/gsp323/lab.schema .
cat lab.schema
## Task 4.
export API_KEY= yourapikey
nano request.json
{
"config": {
"encoding":"FLAC",
"languageCode": "en-US"
},
"audio": {
"uri":"gs://cloud-training/gsp323/task4.flac"
}
}
curl -s -X POST -H "Content-Type: application/json" --data-binary @request.json "https://speech.googleapis.com/v1/speech:recognize?key=${API_KEY}" > result.json
gsutil cp result.json gs://PROJECT-marking/task4-gcs.result
cat result.json
## All Done :D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment