Skip to content

Instantly share code, notes, and snippets.

@GreeeenApple
Created April 17, 2015 13:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GreeeenApple/c11c88b5473081a0dd46 to your computer and use it in GitHub Desktop.
Save GreeeenApple/c11c88b5473081a0dd46 to your computer and use it in GitHub Desktop.
# -*- 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