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

Added metadata event based on mic info #23

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

xavicolomer
Copy link

@xavicolomer xavicolomer commented Nov 19, 2017

Added metadata information on Mic information

This will provide information about Volume, timestamp, in, out, etc...

Debug Info

In:0.00% 00:00:18.20 [00:00:00.00] Out:291k  [!=====|=====!] Hd:0.0 Clip:8
In:0.00% 00:00:18.30 [00:00:00.00] Out:292k  [-=====|=====-] Hd:0.0 Clip:8
In:0.00% 00:00:18.41 [00:00:00.00] Out:294k  [ -====|====- ] Hd:0.0 Clip:8
In:0.00% 00:00:18.52 [00:00:00.00] Out:295k  [     -|-     ] Hd:0.0 Clip:8
In:0.00% 00:00:18.62 [00:00:00.00] Out:297k  [      |      ] Hd:0.0 Clip:8
In:0.00% 00:00:18.73 [00:00:00.00] Out:298k  [      |      ] Hd:0.0 Clip:8

Parsed Metadata:

{ in: 0,
  timestamp: 18200,
  timestamp2: 0,
  out: 291,
  volume: 14,
  hd: 0,
  clip: 8 }
{ in: 0,
  timestamp: 18300,
  timestamp2: 0,
  out: 292,
  volume: 11,
  hd: 0,
  clip: 8 }
{ in: 0,
  timestamp: 18410,
  timestamp2: 0,
  out: 294,
  volume: 9,
  hd: 0,
  clip: 8 }
{ in: 0,
  timestamp: 18520,
  timestamp2: 0,
  out: 295,
  volume: 1,
  hd: 0,
  clip: 8 }
{ in: 0,
  timestamp: 18620,
  timestamp2: 0,
  out: 297,
  volume: 0,
  hd: 0,
  clip: 8 }
{ in: 0,
  timestamp: 18730,
  timestamp2: 0,
  out: 298,
  volume: 0,
  hd: 0,
  clip: 8 }

@xavicolomer xavicolomer changed the title Added metadata information on Mic information Added metadata event based on mic info Nov 19, 2017
@martinheidegger
Copy link

Isn't the volume different left and right? If you want to return stereo signals?

@@ -51,6 +51,11 @@ micInputStream.on('data', function(data) {
console.log("Recieved Input Stream: " + data.length);
});

micInputStream.on('metadata', (metadata) => {
console.log('metadata', metadata);
//metadata { in: 0, timestamp: 22890, timestamp2: 0, out: 365, volume: 0, hd: 0, clip: 8 }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the commented line

if(debug) {
audioProcessOptions.stdio[2] = 'pipe';
}
audioProcessOptions.stdio[2] = 'pipe';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are you removing this from within the debug flag?

@sadrasabouri
Copy link

@xavicolomer are you going to work on this PR?
I think this is actually a nice feature for mic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants