Commit ea684b44 authored by Quentin Aristote's avatar Quentin Aristote
Browse files

changed filenmame

parent 299606f3
......@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 4,
"metadata": {
"autoscroll": false,
"collapsed": false,
......@@ -20,7 +20,24 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 5,
"metadata": {
"autoscroll": false,
"collapsed": false,
"ein.hycell": false,
"ein.tags": "worksheet-0",
"slideshow": {
"slide_type": "-"
}
},
"outputs": [],
"source": [
"name = 'gen'"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"autoscroll": false,
"collapsed": false,
......@@ -35,15 +52,15 @@
"name": "stdout",
"output_type": "stream",
"text": [
"(128, 2400)\n"
"(128, 2401)\n"
]
}
],
"source": [
"spectrogram = np.load('test3.npy')[0]\n",
"spectrogram = np.load('spectrograms/' + name + '.npy')\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)"
"librosa.output.write_wav('sounds/' + name + '.wav', audio, 16000)"
]
}
],
......
%% Cell type:code id: tags:
``` python
import librosa
import numpy as np
```
%% Cell type:code id: tags:
``` python
spectrogram = np.load('test3.npy')[0]
name = 'gen'
```
%% Cell type:code id: tags:
``` python
spectrogram = np.load('spectrograms/' + name + '.npy')
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)
librosa.output.write_wav('sounds/' + name + '.wav', audio, 16000)
```
%%%% Output: stream
(128, 2400)
(128, 2401)
......
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