Skip to content

Instantly share code, notes, and snippets.

View mrconter1's full-sized avatar

Rasmus Lindahl mrconter1

  • ABB Robotics
  • Sweden
View GitHub Profile
@notalentgeek
notalentgeek / pitch_volume_detection_pyaudio.py
Last active February 24, 2025 22:22
A simple proof of concept to extract pitch and volume of streamed audio from microphone with PyAudio.
# This is a simple demonstration on how to stream
# audio from microphone and then extract the pitch
# and volume directly with help of PyAudio and Aubio
# Python libraries. The PyAudio is used to interface
# the computer microphone. While the Aubio is used as
# a pitch detection object. There is also NumPy
# as well to convert format between PyAudio into
# the Aubio.
import aubio
import numpy as num