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
# from vscode_audio import * | |
# Audio(audio_numpy_array, sr=SR) | |
import IPython.display | |
import numpy as np | |
import json | |
def Audio(audio: np.ndarray, sr: int): | |
""" | |
Use instead of IPython.display.Audio as a workaround for VS Code. |
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
{ | |
35: "Acoustic Bass Drum", | |
36: "Bass Drum 1", | |
37: "Side Stick", | |
38: "Acoustic Snare", | |
39: "Hand Clap", | |
40: "Electric Snare", | |
41: "Low Floor Tom", | |
42: "Closed Hi Hat", | |
43: "High Floor Tom", |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
from subprocess import call | |
import shutil | |
def export_as_mp3(export_path, y, sr, bitrate='192k'): | |
tmp_input_path = "/tmp/___mp3___.wav" | |
tmp_output_path = "/tmp/___mp3___.mp3" | |
librosa.output.write_wav(tmp_input_path, y, sr) | |
call(["ffmpeg", "-i", tmp_input_path, "-b:a", str(bitrate), tmp_output_path]) | |
shutil.move(tmp_output_path, export_path) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
[ | |
{ | |
"lng" : "4.1428327560425", | |
"lat" : "52.01150069904", | |
"country" : "Netherlands", | |
"name" : "'s-Gravenzande" | |
}, | |
{ | |
"lng" : "3.3628463745118", | |
"lat" : "51.370923071145", |
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
# coding: utf8 | |
## based on this article: http://qiita.com/mokemokechicken/items/937a82cfdc31e9a6ca12 | |
import numpy as np | |
from keras.models import Sequential | |
from keras.engine.topology import Input, Container | |
from keras.engine.training import Model | |
from keras.layers.core import Dense |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder