T
T
timur1022018-11-15 16:35:00
Python
timur102, 2018-11-15 16:35:00

Why wav file is not correct?

I have a sound.dat file (obviously it contains all the sounds). I opened it with python

>>> k[:300]
b'RIFFK9=\x00WAVEfmt B\x00\x00\x00\xff\xff\x02\x00\x80\xbb\x00\x00\xa3:\x00\x00\x00\x00\x00\x000\x00\x00\x00\x03\x00\x00\x00\x00\xc4\xc3\x00\xd9\x00\x00\x00\xf58=\x00\x00\x00\xc0\x02\x00\x00\x00\x00\xd9\x00\x00\x00\xcb\x01\xc0\x02\xd0>\x00\x00\[email protected]\x00\x00\x18\xcbi\xec\x08\x0bdata\xf58=\x00\xd7\x00)&\x9c\x80B\n*\xac\xc0B\x0b.\xbc\x00C\x0c>\xfc\x00D\x10B\x0cAD\x11F\x1c\x81D\x12J,\xc1\x84k\xa1\x896\x1ai\xa5\x99v\x1aj\xa9\xa9\xb6\x1ak\xad\x81\x16\x10\x08\[email protected]\xa0\x00\n\x0cd\x00\xc0\x01B\x82\x14\x00PX`\xe8\x10!\x02\xc4(00..-\x82\x10\x99!\x12\x11\x8bAbB5PTL\x07\x00\x8b\x0b\x0c\xf9\x00\x90\xa1\xb1\x91vq\x01]\x06\xb8\xa0\x8b\xbb\x0e\x84\x10\x84 \x04\xb18\x80\x02\x12pp\xc2\rO\xbc\xe1\t78A\xa7\xa8\xd4\x81\x00\x00\x00\xc0\x00\x00\x0f\x00\x00\xc9\x06\x10\x11\x11\xcd\x1cG\x87\xc7\x07H\x88\xc8\x08I\x89\xc9\t\x8a\x00\x00\x00\x00\x06\x00\x1f\x00\x00I\n\x10\x11\x11\xcd\x1cG\x87\xc7\x07H\x88\xc8\x08I\x89\xc9\tJ \x80'

I immediately realized that this is a wav file.
Therefore,
open('test.wav','wb').write(k[:400])
But it was not possible to reproduce, the wrong format. What is wrong?5bed7674f154c665649327.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2018-11-15
@timur102

this can only be done with single-channel
, you most likely have two or more channel

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question