model.js
670 Bytes
const express = require('express');
const speech = require('@google-cloud/speech');
const app = express();
app.use(express.json());
const project_id = "ace-sight-314313"
const port = `https://speech.googleapis.com/v1p1beta1/projects/${project_id}/locations/global/phraseSets`
const usage = `curl -X POST -H "Authorization: Bearer $(gcloud auth-impersonate-service-account=$SA_EMAIL print-access-token)" -H` + '"Content-Type: application/json; charset=utf-8"' +
`"https://speech.googleapis.com/v1p1beta1/projects/${project_id}/locations/global/phraseSets"` +
'-d "{"phraseSetId": "test-phrase-set-1"}"'
app.post('', function(req, res){
res.send(usage)
})