The documentation http://docs.python.org/library/wave.html says
Wave_read.readframes(n)
Reads and returns at most n frames of audio, as a string of bytes.
I want to see these string in hex or just number for knowing then value when no sound is there or plus, minus sound is there
I tried
import wave
target = wave.open('t2.wav')
length = target.getnframes()
section = target.readframes(2205)
print section[0:2]
this code print string looks like + and when I run the code,
print int(section[0:2])
Raises
Traceback (most recent call last):
File "D:/py/pitch2.py", line 5, in <module>
print int(section[0:2])
ValueError: invalid literal for int() with base 10: '\x10'
how to solve this?
or