Products > Programming

Microphone input data

(1/3) > >>

yalect:
Hi,
I would like to ask you if I can program or find a simple or small application (.exe) that can read the Microphone digital input data directlly and monitor it on label or display as decimal numbers?.

  thank you.

Nominal Animal:
What OS (operating system) are you using?

yalect:
Thank you
windows7, no problem if is there an application for andriod too?.

Nominal Animal:
I would not know.  I did post an example for Linux and PulseAudio back in 2021, as getting audio data (microphone or line-in) in Linux is rather easy.

Unfortunately, I don't currently have any other OSes or development environments installed on my workstations right now, and can only help with Linux development (having lots of experience there).  (While Tux is my mascot, I'm not a zealot, and often help others with even proprietary stuff.)


If Python is an option, using pyAudio and the PortAudio v19 library, and the built-in Python wave module for uncompressed PCM .wav files, would work on basically all platforms, including Windows, for numerical/mathematical manipulation of audio data as arrays of numbers, PCM samples.

Alternatively, if you could install both Python 3.8.20 (or 3.8.10) and Qt 5 (= PySide2) including QtMultimedia module, it would be easy to create a simple graphical cross-platform application to cater for your needs.  The Python code is the same on all architectures, so I could help you with this.

The latest Python version that supports Windows 7 is 3.8.20, but there are no official binary installers for it (one would need to compile it from the sources).  The last version with official installers for Windows 7 is 3.8.10.  After installing Python, you open Terminal, and run "pip install pyside2" (or "pip3 install pyside2") to install Qt5 support for Python.

(In case you wonder, "PySide2" is the name of the official Python bindings to Qt 5.  Another set of equivalent bindings is "PyQt5".)

In other threads here, I've shown others how to use Python 3 and Qt 5 to create simple graphical interface tools.  The Qt 5 API is documented here, and it's quite straightforward and easy to implement – although it does have its pitfalls and downsides.

If you want to manipulate the audio data numerically, you'll definitely also want to install SciPy ("pip install scipy") or NumPy, as they implement the math operations in native machine language operations (and thus do not suffer from Python being an interpreted language).  Especially useful for doing FFTs and such.  Note that one second of monophonic sound typically consists of 44100 or 48000 numbers between -32768 and +32767, inclusive (16-bit 44.1kHz or 48kHz sampling).

Again, while I could show the Python code needed (as long as I understood a bit better what you are actually trying to achieve), I don't have Windows and cannot help much with installing Python itself on Windows.

Also, I am unsure on how well Python 3 + Qt 5 work under WSL2.  I do know of quite a few real-world differences between WSL2 and real Linux installations (Virtual Machines running Linux do run fine under Windows), but I just don't know if WSL2 would be a viable option here.

Postal2:

--- Quote ---"Repeater" is a program for those who want to hear their voice in real time. The main task of the program is to redirect the sound stream from the microphone to the computer speakers.
--- End quote ---

Use this program's buffer.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod