Created
April 17, 2015 13:24
-
-
Save GreeeenApple/c11c88b5473081a0dd46 to your computer and use it in GitHub Desktop.
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: utf-8 -*- | |
import wave | |
INFILE = "beatefll.dll" | |
OUTFILE = "beatefll.wav" | |
f = open(INFILE, "rb") | |
wv = wave.open(OUTFILE, "wb") | |
data = f.read() | |
wv.setnchannels(1) # チャンネル数 | |
wv.setsampwidth(len(data) / (1024*1024)) # バイト数 | |
wv.setframerate(4430) # サンプリングレート | |
wv.writeframes(data) | |
f.close() | |
wv.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment