Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speech Sample Project not working #281

Closed
anthonybaker opened this issue Dec 21, 2016 · 2 comments
Closed

Speech Sample Project not working #281

anthonybaker opened this issue Dec 21, 2016 · 2 comments
Labels
🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@anthonybaker
Copy link

anthonybaker commented Dec 21, 2016

The Speech Sample Project is not working. I cloned the repo, and setup the Speech Recognition Sample following the instructions.
https://github.com/GoogleCloudPlatform/nodejs-docs-samples/tree/master/speech

When I try to run the command:

node recognize.js --help

I get the following error:

const Speech = require('@google-cloud/speech');
^^^^^
SyntaxError: Use of const in strict mode.
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3

I tried passing the harmony flag:

node --harmony recognize.js --help

But then, I got another error:

   .then((results) => {
                     ^
SyntaxError: Unexpected token >
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3

My node version is:
v7.3.0

I would expect the sample code to run without issues. I haven't touched the recognize.js file, apart fro adding my project id.

I'd appreciate the help.

Many thanks
-Anthony

@jmdobry
Copy link
Member

jmdobry commented Dec 21, 2016

The two errors your posted are thrown when you're using an older version of Node.js that only supports ES2015 features behind a flag. Are you sure your version of Node.js is v7.3.0.

Can you post here the output of:

node -v
node recognize.js --help

@fhinkel
Copy link
Contributor

fhinkel commented Nov 8, 2018

Closed due to inactivity. Feel free to reopen if needed.

@fhinkel fhinkel closed this as completed Nov 8, 2018
@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Apr 7, 2020
telpirion pushed a commit that referenced this issue Nov 9, 2022
ace-n pushed a commit that referenced this issue Nov 11, 2022
ace-n pushed a commit that referenced this issue Nov 11, 2022
ace-n pushed a commit that referenced this issue Nov 14, 2022
ace-n pushed a commit that referenced this issue Nov 15, 2022
ace-n pushed a commit that referenced this issue Nov 15, 2022
ace-n pushed a commit that referenced this issue Nov 17, 2022
ace-n pushed a commit that referenced this issue Nov 17, 2022
ahrarmonsur pushed a commit that referenced this issue Nov 17, 2022
kweinmeister pushed a commit that referenced this issue Nov 18, 2022
pattishin pushed a commit that referenced this issue Nov 18, 2022
🤖 I have created a release *beep* *boop*
---


## [1.19.0](googleapis/nodejs-ai-platform@v1.18.0...v1.19.0) (2022-03-24)


### Features

* add data_item_schema_uri, annotation_schema_uri, explanation_specs to ModelEvaluationExplanationSpec in aiplatform v1 model_evaluation.proto ([b769264](googleapis/nodejs-ai-platform@b769264))
* add ImportModelEvaluation in aiplatform v1 model_service.proto ([#280](googleapis/nodejs-ai-platform#280)) ([b769264](googleapis/nodejs-ai-platform@b769264))
* add ImportModelEvaluation in aiplatform v1beta1 model_service.proto ([b769264](googleapis/nodejs-ai-platform@b769264))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
pattishin pushed a commit that referenced this issue Nov 22, 2022
🤖 I have created a release *beep* *boop*
---


## [1.19.0](googleapis/nodejs-ai-platform@v1.18.0...v1.19.0) (2022-03-24)


### Features

* add data_item_schema_uri, annotation_schema_uri, explanation_specs to ModelEvaluationExplanationSpec in aiplatform v1 model_evaluation.proto ([b769264](googleapis/nodejs-ai-platform@b769264))
* add ImportModelEvaluation in aiplatform v1 model_service.proto ([#280](googleapis/nodejs-ai-platform#280)) ([b769264](googleapis/nodejs-ai-platform@b769264))
* add ImportModelEvaluation in aiplatform v1beta1 model_service.proto ([b769264](googleapis/nodejs-ai-platform@b769264))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

4 participants