Last active
March 2, 2018 15:47
-
-
Save intrd/b34697b89bd8d323756531fb5465ad47 to your computer and use it in GitHub Desktop.
Python script to plot WAV file into a image stego300-simone_entao_e_natal @ 3dsctf-2k16
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
## Python script to plot WAV file into a image stego300-simone_entao_e_natal @ 3dsctf-2k16 | |
# @author intrd - http://dann.com.br/ | |
# @license Creative Commons Attribution-ShareAlike 4.0 International License - http://creativecommons.org/licenses/by-sa/4.0/ | |
from scipy.io import wavfile | |
from matplotlib import pyplot as plt | |
import numpy as np | |
samplerate, data = wavfile.read('sim.wav') | |
#print a #to print freq values | |
plt.figure(figsize=(20, 4)) | |
plt.fill_between(data[:,1], data[:,0], color='k') | |
plt.savefig('plot.png', dpi=100) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment