Serial port player – serialplayer
This software lets us play audio through serial port.
Hardware requirement: (below values are for USB-to-serial chip)
For laptop, i used this hardware:-
Software requirement:
[Illustration of project]
Raw audio data => serialportplayer => serial port => low pass filter => speaker(s).
Processing:
The software collects raw audio data and processes it according to serial port data transfer speed. The processed data is then output through serial port's TX pin. The processing includes oversampling and modulation (sigma-delta is recommended but current version of program doesn't uses it purely).
Raw data:
The data is raw audio. This raw audio data is extracted from audio files using audacity software as -
Please note down the samplerate of the original audio file and use it during serial play.
Using serialportplayer:
start your shell – e.g. Konsole, xterm
execute su command and give root's password.
Run serial port player as:- ./tplay OR ./serialportplayer
e.g. ./tplay humdum.raw 16000
if your system can't run the binary you can compile it from source:
cc –o serialplayer serialplayer.c
The following where the sources using which i accomplished the project:
Any interested person must read about 1 bit audio and sigma-delta modulation.
Please connect 1k resistor to TX pin and capacitor in parallel to TX and GND pins. These values are for USB-to-Serial adapter. Use appropriate values for normal serial port at back of desktop pcs.
Download link: This link has tplay source and binary of ttyUSB, it uses USB-to-Serial device as serial port.