I mentioned at the end if it was possible to create a real time
audio oscilloscope and the answer seems to be YES. WOW!!!
Now I would like some help from the Linux geeks on here...
The code below is STANDARD Python, (2.5.2), and records
sound from the mic input at the moment.
Only a default Python install is required - no special
It takes about 8 seconds to record then after that it
immediately plays back the recording.
Would you give it a test. You might need to raise your
voice into the mic but hey that is no big deal.
Name the code below as record.py and save in the Python`s Lib drawer. As soon as you "import record[RETURN/ENTER]"
talk loudly into the mic for about 8 seconds or so.
So please humour me and give it a test as I could make
a calibrated audioscope from it. Reply back on here...
ENSURE that the sound card is NOT in use by another
- Code: Select all
# Test code for record and playback.
# import sys
# import os
# Record from my laptop`s mic.
# Note sample rate unknown at the moment, (8KHz?).
# Shout into the mic` for test purposes.
# Playback from the sound card.
I forgot to add:-
If it doesn`t seem to work properly after "import"(ing) rerun
the code as "record.main()[RETURN/ENTER]" and all will be
well. I forgot that it can take a little time for the "pyc" bytecode to be generated on the VERY first attempt...