I'm trying to write a transcription script in nodejs to deployed to google cloud function. here is the code
I am using node v17.5.0
const client = new speech.SpeechClient();
const [response] = await client.recognize(request);
const transcription = response.results
but I keep getting this error
160:30 error Parsing error: Unexpected token client
I have made multiple attempts including modifying .eslinrc.js file and still can't solve the problem.
what is causing this and how can i fix it?