0

On my pi, I want to use my microphone in the terminal, as if it were a sound file. If it is not clear what I want to do, I am trying to broadcast sound as an fm radio signal. The command that I use looks like this:

sudo ./fm_transmitter -f frequency -r filename

Were it says "filename" I want the microphone to be specified. Is there any were to do this?

0

The Github page for the library you're using includes an example on how to pipe audio from a USB sound card (you don't indicate in your question what interface you're using) into the FM application:

USB sound-card

To use a USB sound-card type this:

arecord -D hw:1,0 -c1 -d 0 -r 22050 -f S16_LE | sudo ./fm_transmitter -f 100.6 -

Some devices have problems with this command (there is a warning in the terminal like buffer overflow and after a few seconds - the transmitting gets slow and will stop), then you can use the following:

arecord -D plughw:1,0 -c1 -d 0 -r 22050 -f S16_LE | sudo ./fm_transmitter -f 100.6 -

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.