Skip to content

Instantly share code, notes, and snippets.

@Quasimondo
Quasimondo / gist:ad6e3bc3e0e29db42ee9f3bfcf057853
Last active February 26, 2025 13:02
Stream WAV Files as Bluetooth Mic Input from Raspberry Pi Zero W

Stream WAV Files as Bluetooth Mic Input from Raspberry Pi Zero W

Author: Mario Klingemann

Description

This guide configures a Raspberry Pi Zero W to stream WAV files (8kHz, mono PCM) to a phone via Bluetooth Hands-Free Profile (HFP), simulating a microphone for calls. Tested on Raspbian Bullseye with a Pixel 8 Pro and Pixel 6 Pro, it should work with similar setups.

Note: due to restrictions of Android it seems that headset microphones are not allowed to use certain features like voice assistant or voice typing on the keyboard. This seems to be an ongoing nuisance and I have not found a solution for it.

Note: this might not work on a Raspberry Zero 2 W, since it is using a different bluetooth chip which seems to have certain quirks.

@jph00
jph00 / AliasSampling.ipynb
Created January 21, 2018 17:53
Fast weighted sampling using the alias method in numba
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@oliveratgithub
oliveratgithub / emojis.json
Last active February 26, 2025 21:10
Emoji-list with emojis, names, shortcodes, unicode and html entities [massive list]
{
"emojis": [
{"emoji": "👩‍👩‍👧‍👧", "name": "family: woman, woman, girl, girl", "shortname": ":woman_woman_girl_girl:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F467", "html": "👩‍👩‍👧‍👧", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👧‍👦", "name": "family: woman, woman, girl, boy", "shortname": ":woman_woman_girl_boy:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F466", "html": "👩‍👩‍👧‍👦", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👦‍👦", "name": "family: woman, woman, boy, boy", "shortname": ":woman_woman_boy_boy:", "unicode": "1F469 200D 1F469 200D 1F466 200D 1F466", "html": "👩‍👩‍👦‍👦", "category": "People & Body (family)", "order": ""},
{"emoji": "👨‍👩‍👧‍👧", "name": "family: man, woman, girl, girl", "shortname": ":man_woman_girl_girl:", "unicode": "1F468 200D 1F469 200D 1F467 200D 1F467", "html": "👨‍👩&z
@kastnerkyle
kastnerkyle / minimal_beamsearch.py
Last active October 16, 2021 18:49
Not-so-minimal anymore (check the early commits) beam search example
# Author: Kyle Kastner
# License: BSD 3-Clause
# See core implementations here http://geekyisawesome.blogspot.ca/2016/10/using-beam-search-to-generate-most.html
# Also includes a reduction of the post by Yoav Goldberg to a script
# markov_lm.py
# https://gist.github.com/yoavg/d76121dfde2618422139
# These datasets can be a lot of fun...
#
# https://github.com/frnsys/texts
@swayson
swayson / netrw quick reference.md
Created April 25, 2017 10:48 — forked from t-mart/netrw quick reference.md
A quick reference for Vim's built-in netrw file selector.
Map Action
<F1> Causes Netrw to issue help
<cr> Netrw will enter the directory or read the file
<del> Netrw will attempt to remove the file/directory
- Makes Netrw go up one directory
a Toggles between normal display, hiding (suppress display of files matching g:netrw_list_hide) showing (display only files which match g:netrw_list_hide)
c Make browsing directory the current directory
C Setting the editing window
d Make a directory
@aparrish
aparrish / understanding-word-vectors.ipynb
Last active February 20, 2025 02:47
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dalenunns
dalenunns / SAResources.md
Last active January 28, 2025 16:56
List of SA Resources
@deehzee
deehzee / autoreload.md
Last active December 1, 2021 19:48
Auto reload of modules in jupyter notebook

Module autoreload

To auto-reload modules in jupyter notebook (so that changes in files *.py doesn't require manual reloading):

# for auto-reloading external modules
# see http://stackoverflow.com/questions/1907993/autoreload-of-modules-in-ipython
%load_ext autoreload
%autoreload 2
@dwilkie
dwilkie / docker-cheat-sheat.md
Last active May 12, 2024 14:08
Docker Cheat Sheet

Build docker image

$ cd /path/to/Dockerfile
$ sudo docker build .

View running processes

@jakevdp
jakevdp / Altair-Code-Gen.ipynb
Created August 10, 2016 02:43
Simple example of code generation with Altair
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.