hi Yvonne,
You think I'd need to install pywin32 for this to work? If yes then 64 bit or 32 bit duh :-/
Cheers,
Murali
hi Yvonne,
You think I'd need to install pywin32 for this to work? If yes then 64 bit or 32 bit duh :-/
Cheers,
Murali
hi,
I managed to get the audio working from within Lianja. I spent a whole night figuring that out :-)
Here is a solution in case anyone is interested in playing (cross-platform!) sounds from Lianja. Initially I tried pyglet which seemed good but I had some issues getting it to work. I settled for PyAudio which can be found here: http://people.csail.mit.edu/hubert/pyaudio/
I used PyAudio for Python 2.7 found on that page
md5sum: 3bb90b71f294d2bcf89f0cdb035c31e7
And here is the code (Courtesy: Guz Alexander) that plays the sound
Code:import pyaudio import wave chunk = 1024 wf = wave.open('thesong.wav', 'rb') p = pyaudio.PyAudio() stream = p.open( format = p.get_format_from_width(wf.getsampwidth()), channels = wf.getnchannels(), rate = wf.getframerate(), output = True) data = wf.readframes(chunk) while data != '': stream.write(data) data = wf.readframes(chunk) stream.close() p.terminate()
Cheers,
Murali
Helpful for all. Thanks for sharing that Murali. That's what a community is all about, everyone helps each other.
Principal developer of Lianja, Recital and other products
Follow me on:
Twitter: http://twitter.com/lianjaInc
Facebook: http://www.facebook.com/LianjaInc
LinkedIn: http://www.linkedin.com/in/barrymavin
Yup, most welcome.
Cheers,
Murali
Excellent!
thanks,
Hank
You are welcome :-)
Cheers,
Murali
Bookmarks