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

[python] Voice-communication in python?

Started by pjuke Jun 12, 2010 at 5:51 AM 0 replies 1.1k views
Original Post
pjuke
pjuke
Hello!
I'm currently in a project where I need to write a VoIP program like Ventrilo/Teamspeak/Mumble. I'm very familiar with python and I really like it and it would be great if I could use that as my language to develop it.

But the question is.
Is there a good idea? To use python I mean.

Second, do you know any good library for manage audio in/out and encoding?

I've found THIS speex-wrapper and also found pyAudio to be a good wrapper of PortAudio, also pyMedia has got some nice features, such as mux/demuxer.

But I don't know if it's a good idea, so I want to hear your tips/ideas/feedbacks!

Thank you in advance!
pjuke
pjuke
OK, so I've played around today and noticed something/got some problems.

Speex got three "modes"; narrow-band, wide-band and ultra wide-band. Each band accept X numer of samples; 160, 320 and 640. So speex can only encode 640 samples at time at its maximum.

Now as I said, I'm using pyAudio (PortAudio), and I've got some questions (in general) about sampling and encoding the audiostream:

I'm using ultra wide-band for now, which allows me to grab 640 samples of my inputstream. Now this works fine as long as I just let me program idle and do its thing, but as soon as I fire something up on my computer (it could be Firefox or anything), I can hear my audiostream kind of gets interrupted by the computer. It kind of gets cut for a short time and theres some static noise. If you check the size on that buffer meanwhile, you can se it shoots into the air and sometimes even overflows and crashes :/

So I don't know if its just a bad wrapper or something? I mean, the audiostream has to be completely independet from other software on my computer, otherwise it wont work, obviously. I could run that loop in another thread tho, but hey, how shold that help for not being interrupted by other software on the computer?

So... does anyone have any experience in this?

Topic Locked

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

Sign in to reply to this topic.