Skip to content

Instantly share code, notes, and snippets.


Ollin Boer Bohan madebyollin

View GitHub Profile
madebyollin /
Last active Jul 12, 2022
Converts an epub or text file to audiobook via Google Cloud TTS
#!/usr/bin/env python3
To use:
1. install/set-up the google cloud api and dependencies listed on
2. install pandoc and pypandoc, also tqdm
3. create and download a service_account.json ("Service account key") from
4. run GOOGLE_APPLICATION_CREDENTIALS=service_account.json python book_name.epub
import re
import sys
madebyollin / compressor.js
Created Aug 24, 2018
Snippet to add an audio compressor to all videos on the current page
View compressor.js
function addCompressor(el) {
var AudioContext = window.AudioContext || window.webkitAudioContext;
var context = new AudioContext();
var source = context.createMediaElementSource(el);
var compressor = context.createDynamicsCompressor();
var makeupGain = context.createGain();
// Set compressor params here
compressor.threshold.value = -40;
compressor.knee.value = 40;
#!/usr/bin/env python
import numpy as np
import cv2
from scipy.signal import convolve2d
from skimage import color, data, restoration
import console
# read input
frame = cv2.imread("input.jpg").astype(np.float32) / 255.0
#!/usr/bin/env python
filename = "output.txt"
with open(filename, 'w') as fout:
x = 0
for x in range(5):
fout.write(""" def function_number{}(): \n