This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Concatenate wav files into one evenly spaced wav file | |
# Requires sox and PySox https://github.com/rabitt/pysox | |
# License: Public domain | |
import sox, os | |
def combine_files(folder, files, out_filename, sample_rate, channels, bit_depth): | |
combine = sox.Combiner() | |
combine.convert(sample_rate, channels, bit_depth) | |
out_files = [f"{folder}/{file}" for file in files] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
import os | |
from xml.etree import ElementTree | |
TEMP = './tmp.svg' | |
def rebrand(fname, brand): | |
svg = ElementTree.parse(fname) | |
for e in svg.iterfind(".//{http://www.w3.org/2000/svg}rect[@id='background']"): | |
e.set('style', 'fill:url(#%s);' % (brand,)) |