Skip to content

Instantly share code, notes, and snippets.

@ericbolo
ericbolo / gist:128a24f7b3c5b280da0be526cf947651
Last active April 24, 2018 17:37
Running Python projects in a virtual environments
Virtual environments allow you to install dependencies without conflicting with your current installs.
## Installing
[sudo] pip install virtualenv
sudo /usr/bin/easy_install virtualenv
"" Running
If a module was installed with sudo pip install, the user may not have permissions to access the module,
resulting in 'No module called...' errors.
Quick get around: run py script with sudo
@ericbolo
ericbolo / raspberry-dist-flavour.md
Created July 23, 2016 19:43
Finding out flavor of raspbian dist

Run the command:

cat /etc/os-release

@ericbolo
ericbolo / raspberry-usb-soundcard.md
Last active October 11, 2016 09:42
Setting up a USB sound card as default device on a Raspberry PI 3 (Raspbian Jessie)

If you don't need analog audio then prevent the module from loading and set the USB headset as the default device.

Disable analog audio. Open /boot/config.txt and comment out dtparam=audio=on.

Set the USB audio device to the default device. Open /lib/modprobe.d/aliases.conf and comment out the line options snd-usb-audio index=-2

Reboot

@ericbolo
ericbolo / rpi-bluletooth-receiver.md
Last active December 4, 2017 13:08
Bluetooth audio receiver with Rapsberry PI 3 (Raspbian Jessie)

Introduction

This walks you through setting up your Raspberry PI 3 (Raspbian Jessie) as a bluetooth audio receiver.

Credits https://www.raspberrypi.org/forums/viewtopic.php?t=68779. Parts of this tutorial did not work for me, so I'm noting my fixes here. Also, I added instructions for setting up a custom USB sound card for better quality.

Set up USB sound card on Raspberry PI

@ericbolo
ericbolo / rpi-jack-audio-output-to-input.md
Last active April 29, 2024 18:41
Bridging audio input (mic) to audio output (headphones) with JACK on Raspberry PI (Raspbian Jessie)

Introduction

This walks you through installing JACK, connecting a USB sound card, and copying the audio on the input port onto the output port. The result: you will hear what you say played back immediately from the headphones.

Installation

sudo pip install setuptools
sudo apt-get install python-dev

sudo apt-get install libffi-dev

@ericbolo
ericbolo / linux-unzip-untar
Created July 30, 2016 13:39
Unzip and untar a compressed file with one command
tar -zxvf myfile.tar.gz
@ericbolo
ericbolo / route-mic-to-headphones.md
Last active February 28, 2023 12:08
Routing mic to audio output for monitoring (ALSA + PulseAudio)
@ericbolo
ericbolo / pulseaudio-volume-meter.md
Created August 4, 2016 11:53
Visualize volume of sound devices with Pulse Audio and the pavumeter command

Introduction

This shows you how to see the live volume of sound devices on Linux. I've tested this on Raspbian Jessie.

Steps

Make sure PulseAudio is running

pulseaudio -D
@ericbolo
ericbolo / attenuator-cable.md
Last active August 28, 2016 15:56
Attenuator cable: stereo jack audio output to mono mic TSR jack.

Introduction

In the context of a speech-to-text/IoT project, I needed to capture the audio output of one device and feed it to the mic of my raspberry PI. This gist is stricly concerned with the hardware aspect. Since I wanted to capture speech, not music, I used only one channel of the stereo audio

Checklist

  • One 1 microfaraday capacitor
  • One 1 kilo ohm potentiometer