Skip to content

Instantly share code, notes, and snippets.

View cogmeta's full-sized avatar
💭
Happy! Always

Cogmeta cogmeta

💭
Happy! Always
View GitHub Profile
@nealrs
nealrs / contractions.py
Created May 31, 2015 01:33
Expand common (and some very uncommon) english contractions
"""
this code is not mine! i shamelessly copied it from http://stackoverflow.com/questions/19790188/expanding-english-language-contractions-in-python
all credits go to alko and arturomp @ stack overflow.
basically, it's a big find/replace.
"""
import re
cList = {
"ain't": "am not",
@kazuki
kazuki / rnnoise.py
Created November 25, 2017 01:39
Python Bindings for RNNoise(https://github.com/xiph/rnnoise/)
from ctypes import byref, c_float, c_void_p, CDLL
class RNNoise(object):
def __init__(self):
self._native = CDLL('./librnnoise.so')
self._native.rnnoise_process_frame.restype = c_float
self._native.rnnoise_process_frame.argtypes = (
c_void_p, c_void_p, c_void_p)
self._native.rnnoise_create.restype = c_void_p