vicwomg / pikaraoke

Youtube-based Karaoke machine for Raspberry Pi, OSX, Windows, and Linux
531 stars 137 forks source link

Select hat as input and have hdmi as output #144

Open sromo006 opened 3 years ago

sromo006 commented 3 years ago

I have a hifiberry hat and want to use that for input. I cant seem to get pikaraoke to get the input. What do i need to add when launching to get the input changed?

vicwomg commented 3 years ago

Piping audio input to HDMI output is possible, as it is with a USB microphone device, but my guess is that you're not going to find the latency usable

First find out the card/device number of your audio input, by running arecord

pi@pikaraoke:~ $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 2: Device [USB PnP Audio Device], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

In this example, my USB microphone is Card 2 and Device 0. Therefore my device is "hw:2,0" which I plug into this arecord's -D parameter, and then pipe audio to playback.

arecord -D hw:2,0 -f CD -c 1 -- | aplay

You'll be able to hear your mic through your TV, but it will be delayed by almost 1s.

For now, this is why I do not recommend this sort of setup.