Skip to content

Instantly share code, notes, and snippets.

@hpcslag
Last active August 13, 2019 11:44
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 hpcslag/a1e52da79583ab1dc8ad71412f02c1c2 to your computer and use it in GitHub Desktop.
Save hpcslag/a1e52da79583ab1dc8ad71412f02c1c2 to your computer and use it in GitHub Desktop.
FIx ram problem
soundbinarary = bytearray()
with open("test.m4a", 'rb') as f:
while True:
#for i in range(44):
# f.read(1) #do not thing jsut pop out
character = f.read(1)
if not character:
break
soundbinarary+=character
print(soundbinarary)
with open("test1.m4a", 'wb') as s:
s.write(soundbinarary)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment