ashishbajaj99 / mic

A simple stream wrapper for arecord (Linux (including Raspbian)) and sox (Mac, Windows). Returns a Passthrough stream object so that stream control like pause(), resume(), pipe(), etc. are all available.
MIT License
103 stars 61 forks source link

Added metadata event based on mic info #23

Open xavicolomer opened 6 years ago

xavicolomer commented 6 years ago

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 }
martinheidegger commented 5 years ago

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

sadrasabouri commented 3 years ago

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