Giter Club home page Giter Club logo

node-red-contrib-mic's People

Contributors

mattvador avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mnark dani7b

node-red-contrib-mic's Issues

Please, give us some example flow!

I know this could be an huge request... but I think this is a great "enhancement" about the possibility to use this fantastic component!

Thank you.

Crash after started using the node on windows

Hello Guys,

I detected a bug which leads to a crash of node-red. Everytime I click on the start button of the mic-node or send a "start" as payload node-red crashes.
I installed sox and set it as env-variable. A colleague told me that he solved the problem with installing Sox but this works not for me.
Here are the logs of the crash:

23 Mar 12:01:14 - [info]

Welcome to Node-RED

23 Mar 12:01:14 - [info] Node-RED version: v0.16.2
23 Mar 12:01:14 - [info] Node.js version: v6.10.0
23 Mar 12:01:14 - [info] Windows_NT 6.1.7601 x64 LE
23 Mar 12:01:16 - [info] Loading palette nodes
23 Mar 12:01:19 - [warn] ------------------------------------------------------
23 Mar 12:01:19 - [warn] [rpi-gpio] Info : Ignoring Raspberry Pi specific node
23 Mar 12:01:19 - [warn] [tail] Not currently supported on Windows.
23 Mar 12:01:19 - [warn] [microphone] Error: microphone already registered
23 Mar 12:01:19 - [warn] ------------------------------------------------------
23 Mar 12:01:19 - [info] Settings file : \Users\ASt.node-red\settings.js
23 Mar 12:01:19 - [info] User directory : \Users\AStr.node-red
23 Mar 12:01:19 - [info] Flows file : \Users\AStrang.node-red\anditest
23 Mar 12:01:19 - [info] Server now running at http://127.0.0.1:1880/
23 Mar 12:01:19 - [info] Starting flows
23 Mar 12:01:19 - [info] Started flows
23 Mar 12:01:27 - [info] [Mic:TestMic] Event input: start
23 Mar 12:01:27 - [info] [Mic:TestMic] Stream event startComplete
23 Mar 12:01:27 - [error] [wav-filewriter:test] No compatible status found in ms
gIn.
23 Mar 12:01:27 - [red] Uncaught Exception:
23 Mar 12:01:27 - Error: spawn rec ENOENT
at exports._errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)

Any ideas so far?

Needs more documentation

This node needs more documentation of the options that are provided in the node. The Node Help does not explain what ANY of the options are for.

The node is not working on Windows

The node appear to not work on Windows (see attached flow).

SOX is working: I'm able to record on the command line using the following command
rec test.wav

I'm also able to successfully record using the "working" flow provided. When I start it, it will produce a "test.wav" file that skip the initial silence and stop recording after 5 second of silence.
`rec test.wav silence 1 00:01 0.1% 1 00:05 0.1%"

However, when the same command (at least I think I set all the parameters in the correct way) is issued using your node, it will issue a "msg.payload: isSilence" and stops recording immediately.

Testing Flow

[{"id":"1b84bae8.7c9985","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"cfb56183.362e38","type":"Mic","z":"1b84bae8.7c9985","name":"Record","outputPayloadType":"stream","endian":"little","bitwidth":"16","encoding":"signed-integer","channels":"1","device":"default","rate":"22050","silenceTimeout":"1 00:01 0.1% 1 00:05 0.1%","exitOnSilence":"true","debug":"false","active":true,"x":429,"y":131,"wires":[["8973ef57.0b587","113d012d.3d0ed7"]]},{"id":"113d012d.3d0ed7","type":"file","z":"1b84bae8.7c9985","name":"Output file","filename":"z:\libri\byosh\experiments\test.raw","appendNewline":false,"createDir":true,"overwriteFile":"true","x":650,"y":226,"wires":[]},{"id":"8973ef57.0b587","type":"debug","z":"1b84bae8.7c9985","name":"","active":true,"console":"false","complete":"payload","x":1077,"y":236,"wires":[]},{"id":"4028bd6e.c367cc","type":"trigger","z":"1b84bae8.7c9985","op1":"start","op2":"stop","op1type":"str","op2type":"str","duration":"10","extend":false,"units":"s","reset":"","name":"start-stop","x":195,"y":190,"wires":[["cfb56183.362e38"]]},{"id":"d69a816f.15cbc8","type":"inject","z":"1b84bae8.7c9985","name":"Start test","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"x":104,"y":61,"wires":[["4028bd6e.c367cc"]]},{"id":"99979c46.ae80f","type":"inject","z":"1b84bae8.7c9985","name":"Start","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"x":174,"y":407,"wires":[["1af7e417.7179d4"]]},{"id":"1af7e417.7179d4","type":"exec","z":"1b84bae8.7c9985","command":"rec z:\libri\byosh\experiments\test.wav silence 1 00:01 0.1% 1 00:05 0.1%","addpay":false,"append":"","useSpawn":"true","timer":"60","oldrc":false,"name":"Record","x":616,"y":410.5,"wires":[["8973ef57.0b587"],[],["8973ef57.0b587"]]},{"id":"1e850018.5360b8","type":"inject","z":"1b84bae8.7c9985","name":"Stop","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"x":172,"y":524,"wires":[["8ed69269.77669"]]},{"id":"8ed69269.77669","type":"change","z":"1b84bae8.7c9985","name":"","rules":[{"t":"set","p":"kill","pt":"msg","to":"SIGTERM","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":397,"y":530,"wires":[["1af7e417.7179d4"]]},{"id":"bfee75bf.9f0688","type":"comment","z":"1b84bae8.7c9985","name":"Not Working","info":"","x":89,"y":31,"wires":[]},{"id":"e3648c86.d8189","type":"comment","z":"1b84bae8.7c9985","name":"Working","info":"","x":151,"y":375,"wires":[]}]

The node red crash when apply the flow include mic. maybe i use it a wrong way. pls help me

-- flow ---

[{"id":"5bc85df0.cb7054","type":"Mic","z":"d2f2d81d.a7ac98","name":"麦克风","outputPayloadType":"stream","endian":"little","bitwidth":"16","encoding":"signed-integer","channels":"1","device":"plughw:1,0","rate":"22050","silenceTimeout":0,"exitOnSilence":false,"debug":false,"active":true,"x":595.5,"y":178,"wires":[["c53422cc.b2d75","87eda3ca.a0e5f"]]},{"id":"c53422cc.b2d75","type":"ui_audio","z":"d2f2d81d.a7ac98","name":"音频输出","group":"91445def.c9f6a","voice":"en-US","always":"","x":825.5,"y":168,"wires":[]},{"id":"87eda3ca.a0e5f","type":"debug","z":"d2f2d81d.a7ac98","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":809.5,"y":258,"wires":[]},{"id":"d6a83a92.776ab8","type":"inject","z":"d2f2d81d.a7ac98","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":388.5,"y":167,"wires":[["5bc85df0.cb7054"]]},{"id":"91445def.c9f6a","type":"ui_group","z":"","name":"Default","tab":"28405f75.1ff78","disp":true,"width":"6","collapse":false},{"id":"28405f75.1ff78","type":"ui_tab","z":"","name":"Home","icon":"dashboard"}]

---version ---

  • node red
    0.18.6

  • node
    root@ubuntu:~# node -v
    v8.11.2

---- errors ----

30 May 20:38:29 - [info] Starting flows
30 May 20:38:29 - [info] Started flows
30 May 20:38:29 - [info] [Mic:麦克风] Event input: 1527683909861
30 May 20:38:29 - [info] [Mic:麦克风] Stream event startComplete
30 May 20:38:29 - [red] Uncaught Exception:
30 May 20:38:29 - Error: spawn arecord ENOENT
at _errnoException (util.js:992:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.