Commit 18dc24b5 authored by Quentin Aristote's avatar Quentin Aristote
Browse files

first generations

parent e1fe89d1
......@@ -52,6 +52,38 @@ flycheck_*.el
/network-security.data
### Git ###
# Created by git for backups. To disable backups in Git:
# $ git config --global mergetool.keepBackup false
*.orig
# Created by git when using merge tools for conflicts
*.BACKUP.*
*.BASE.*
*.LOCAL.*
*.REMOTE.*
*_BACKUP_*.txt
*_BASE_*.txt
*_LOCAL_*.txt
*_REMOTE_*.txt
# machine-specific gitignore file
.gitignore
### JupyterNotebooks ###
# gitignore template for Jupyter Notebooks
# website: http://jupyter.org/
.ipynb_checkpoints
*/.ipynb_checkpoints/*
# IPython
profile_default/
ipython_config.py
# Remove previous ipynb_checkpoints
# git rm -r .ipynb_checkpoints/
### Linux ###
# temporary files which can be created if a process still has a handle open of a deleted file
......@@ -189,7 +221,4 @@ env.bak/
venv.bak/
pip-selfcheck.json
# End of https://www.gitignore.io/api/linux,python,virtualenv,emacs
# Project-specific
results
\ No newline at end of file
# End of https://www.gitignore.io/api/linux,python,virtualenv,emacs
\ No newline at end of file
This diff is collapsed.
{
"cells": [
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"autoscroll": false,
"collapsed": false,
"ein.hycell": false,
"ein.tags": "worksheet-0",
"slideshow": {
"slide_type": "-"
}
},
"outputs": [],
"source": [
"import librosa\n",
"import numpy as np"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"autoscroll": false,
"collapsed": false,
"ein.hycell": false,
"ein.tags": "worksheet-0",
"slideshow": {
"slide_type": "-"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(128, 2400)\n"
]
}
],
"source": [
"spectrogram = np.load('test3.npy')[0]\n",
"print(spectrogram.shape)\n",
"audio = librosa.feature.inverse.mel_to_audio(spectrogram, sr = 16000, n_fft = 400, hop_length = 200, win_length = 400)\n",
"librosa.output.write_wav('test3.wav', audio, 16000)"
]
}
],
"metadata": {
"kernelspec": {
"argv": [
"/usr/bin/python3",
"-m",
"ipykernel_launcher",
"-f",
"{connection_file}"
],
"display_name": "Python 3",
"env": null,
"interrupt_mode": "signal",
"language": "python",
"metadata": null,
"name": "python3"
},
"name": "spectrogram_to_sound.ipynb"
},
"nbformat": 4,
"nbformat_minor": 2
}
%% Cell type:code id: tags:
``` python
import librosa
import numpy as np
```
%% Cell type:code id: tags:
``` python
spectrogram = np.load('test3.npy')[0]
print(spectrogram.shape)
audio = librosa.feature.inverse.mel_to_audio(spectrogram, sr = 16000, n_fft = 400, hop_length = 200, win_length = 400)
librosa.output.write_wav('test3.wav', audio, 16000)
```
%%%% Output: stream
(128, 2400)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment