Skip to main content
GameDev.net gamedev.net
🔒 Locked

[python] Encode a pyAudio stream?

Started by pjuke Jun 9, 2010 at 7:52 AM 0 replies 2.3k views
Original Post
pjuke
pjuke
Hello folks!
I'm writing a small VoIP chatprogram in python an Im stuck with some problems.

First of all im using pyAudio which is a PortAudio wrapper for python (if you didn't know). I'm currently reading chunks with the size of 2048 of the stream, and I wan't to send those over the network.

Then I found this speex-wrapper for python (yay). BUT. There's a problem. Speex seems only to be able to encode 320 bytes of data at time?? Therefore, if I want to use speex, I have to chunk up my data in the size of 320 bytes, and that will clog up my audio-buffer.

Because i've tried to encode chunks of 2048 in size, but speex only encodes a tiny bit of it and the sound gets all wierd and so. But maybe there's just a bad wrapper? It's found over here: http://www.voicechatter.org/forum/viewtopic.php?f=10&t=563 (random hax since the original pyspeex os outdated).


SO I'm looking for a way to encode my audiostream to be able to send it over the network!

Thanks in advance! (:

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.