![]() If for some reason you cannot use NumPy, you can still do all this, but it will be a bit more work.įor reading/writing sound files, I recommend the soundfile module (full disclosure: I'm a co-author).įor playing/recording sounds, I recommend the sounddevice module (full disclosure: I'm its main author). You should use NumPy to manipulate sounds, it's much easier than handling plain Python buffers. This is my personal (and of course biased) recommendation: There are several questions and answers to both topics here on SO. Reading/writing WAV files (or other audio files) You should clearly separate those two concerns: How to play Wav sound samples from memory ![]() ![]() Stream = p.open(format = p.get_format_from_width(f.getsampwidth()), An example here on my Linux it works: #!usr/bin/env pythonį = wave.open(r"/usr/share/sounds/alsa/Rear_Center.wav","rb")
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |