Skip to content

Unable to run recognize.JS  #332

Description

@danishnazir

Hi there !
Whenever i try to execute the recognize.JS file i get the following error
command: node recognize listen
Result:Listening, press Ctrl+C to stop. events.js:141 throw er; // Unhandled 'error' event ^ Error: spawn rec ENOENT at exports._errnoException (util.js:870:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32) at onErrorNT (internal/child_process.js:344:16) at nextTickCallbackWith2Args (node.js:442:9) at process._tickCallback (node.js:356:17) at Function.Module.runMain (module.js:443:11) at startup (node.js:139:18) at node.js:968:3

Activity

  1. MarcPorciuncula commented on Apr 19, 2017

    @MarcPorciuncula

    I got around this by setting recordProgram to 'sox' in the options passed to record.start()

    eg.

    record.start({
        sampleRateHertz: sampleRateHertz,
        threshold: 0,
        recordProgram: 'sox'
      }).pipe(recognizeStream);
    
  2. danishnazir commented on Apr 23, 2017

    @danishnazir
    Author

    @MarcoThePoro Now i get this error
    Error: spawn sox ENOENT at exports._errnoException (util.js:870:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32) at onErrorNT (internal/child_process.js:344:16) at nextTickCallbackWith2Args (node.js:442:9) at process._tickCallback (node.js:356:17) at Function.Module.runMain (module.js:443:11) at startup (node.js:139:18) at node.js:968:3

  3. MarcPorciuncula commented on Apr 23, 2017

    @MarcPorciuncula
  4. danishnazir commented on Apr 23, 2017

    @danishnazir
    Author

    Hi there yes i have installed it and now that problem is resolved thanks

  5. danishnazir commented on Apr 23, 2017

    @danishnazir
    Author

    Hi @MarcoThePoro i have been able to successfully compile it but whenever i run it using the listen option it says Listening, press Ctrl+C to stop. but after this it automatically stop with no error messages! any ideas?

  6. MarcPorciuncula commented on Apr 23, 2017

    @MarcPorciuncula
  7. danishnazir commented on Apr 24, 2017

    @danishnazir
    Author

    @MarcoThePoro oh i see i am amazed to see that no one from google is helping us in solving this problem i mean where they? i am thoroughly disappointed!!

  8. jmdobry commented on Apr 24, 2017

    @jmdobry
    Member

    @danishnazir Can you provide extensive details so we can reproduce the behavior you're experiencing? OS, Node version, @google-cloud/speech version, sox version, node-record-lpcm16 version, etc.

  9. danishnazir commented on Apr 25, 2017

    @danishnazir
    Author

    Here are the details
    sox:v14.4.2
    node:v4.4.4
    @google-cloud/speech: same version as here in github repo as i am cloning
    node-record-lpcm16:same version as here in github repo as i am cloning
    @jmdobry

  10. jmdobry commented on Apr 25, 2017

    @jmdobry
    Member

    We just updated this repo yesterday, so you might want to try re-cloning it and re-installing dependencies. You might also try upgrading Node.js to say, 6.10.1

  11. danishnazir commented on Apr 25, 2017

    @danishnazir
    Author

    Hi @jmdobry i just reclonned the repo and upgraded my node setup but still same issue

  12. jmdobry commented on Apr 25, 2017

    @jmdobry
    Member

    Can you try changing the options (found here) passed to record.start()? In particular, what happens if you change the silence option to "10.0", or what happens if you change the recordProgram option to "sox"?

  13. danishnazir commented on Apr 28, 2017

    @danishnazir
    Author

    @jmdobry still the same problem!! Including the extra perimeters didn't help me!

      record.start({
        sampleRate: sampleRate,
        threshold: 0,
        recordProgram: 'sox',
        silence: 10.0  
      }).pipe(recognizeStream);
  14. jmdobry commented on Apr 28, 2017

    @jmdobry
    Member

    I think the value for silence is supposed to be a string, and did you try different values for recordProgram and threshold?

  15. danishnazir commented on Apr 28, 2017

    @danishnazir
    Author

    i tried using string too!! and no i havent manipulated the threshold yet

  16. 14 remaining items

  17. added a commit that references this issue on Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🚨This issue needs some love.triage meI really want to be triaged.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions