Showing the changes to python (1 of 1 file). Show all
Unified · Split
| @@ -16,9 +16,9 @@ def record_sink(sink_path): · 15 unmodified lines | ||
| 16 | 16 | while total_frames < duration * s.sample_rate: |
| 17 | 17 | vec = s.read(hop_size) |
| 18 | 18 | # mix down to mono |
| 19 | − mono_vec = vec.sum(-1) | |
| 19 | + mono_vec = vec.sum(-1) / float(s.input_channels) | |
| 20 | 20 | g(mono_vec, hop_size) |
| 21 | − total_frames += hop_size | |
| 21 | + total_frames += hop_size | |
| 22 | 22 | s.stop() |
| 23 | 23 | |
| 24 | 24 | if __name__ == '__main__': |