Skip to content

Instantly share code, notes, and snippets.

#[cfg(test)]
mod tests {
use super::*;
use windows::Win32::Media::timeGetTime;
use windows::Win32::Media::timeGetDevCaps;
use windows::Win32::Media::timeBeginPeriod;
use windows::Win32::Media::TIMECAPS;
use windows::Win32::Media::TIMERR_NOERROR;
use std::mem;
#[tokio::test]
@xnorpx
xnorpx / DFT_ANN.py
Created September 16, 2020 23:26 — forked from endolith/DFT_ANN.py
Training neural network to implement discrete Fourier transform (DFT/FFT)
"""
Train a neural network to implement the discrete Fourier transform
"""
from keras.models import Sequential
from keras.layers import Dense
import numpy as np
import matplotlib.pyplot as plt
N = 32
batch = 10000
// only tested with 1 channel wav file
const { OpusEncoder } = require('@discordjs/opus');
let fs = require('fs');
wav_file = fs.readFileSync('somefile.wav');
const WaveFile = require('wavefile').WaveFile;
let wav = new WaveFile(wav_file);
import os
import sys
import logging
import itertools
from ruamel.yaml import YAML # Github actions needs yaml 1.2
build_settings = ['disable_intrinsics', 'fixed_point', 'custom_modes']
platforms = ['win', 'linux', 'mac', 'ios', 'android']
archs = ['x86', 'x86_64', 'armv7', 'arm64']