This file contains hidden or 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
| # Copywrite Gabriel Bassett 2018 | |
| # Not licensed for reuse | |
| import copy | |
| import operator | |
| import uuid | |
| import networkx as nx | |
| import logging | |
| import pprint | |
| import simplejson as json |
This file contains hidden or 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
| from keras import backend as K, initializers, regularizers, constraints | |
| from keras.engine.topology import Layer | |
| def dot_product(x, kernel): | |
| """ | |
| Wrapper for dot product operation, in order to be compatible with both | |
| Theano and Tensorflow | |
| Args: |
This file contains hidden or 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
| ____________________________________________________________________________________________________ | |
| Layer (type) Output Shape Param # Connected to | |
| ==================================================================================================== | |
| input_1 (InputLayer) (None, 32, 10) 0 | |
| ____________________________________________________________________________________________________ | |
| lstm_1 (LSTM) (None, 32, 10) 840 input_1[0][0] | |
| ____________________________________________________________________________________________________ | |
| add_1 (Add) (None, 32, 10) 0 input_1[0][0] | |
| lstm_1[0][0] | |
| ____________________________________________________________________________________________________ |
This file contains hidden or 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
| ffmpeg -i input.mp3 -acodec pcm_s16le -ac 1 -ar 16000 output.wav | |
| # To convert all mp3 files in a directory in Linux: | |
| for f in *.mp3; do ffmpeg -i "$f" -acodec pcm_s16le -ac 1 -ar 16000 "${f%.mp3}.wav"; done | |
| # Or Windows: | |
| for /r %i in (*) do ffmpeg -i %i -acodec pcm_s16le -ac 1 -ar 16000 %i.wav |